- Home
- MCP servers
- Expense
Expense
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"omkar4141-dbserver_mcp": {
"command": "/home/omkar/.local/bin/uv",
"args": [
"run",
"fastmcp",
"run",
"/full/path/to/main.py"
]
}
}
}You set up a small MCP server that exposes expense-management tools via a FastMCP backend and a lightweight client. The server stores data in SQLite and is driven by an LLM that decides when to call tools, enabling natural-language queries like adding an expense or listing all expenses. This guide walks you through practical usage, installation steps, and important notes so you can run and use this MCP server effectively.
How to use
You interact with the MCP server through a client that connects to the server using a local stdio channel. The LLM decides when to call tools such as adding an expense, querying the total, or listing all expenses. Use natural language to describe what you want, and the system will translate that into tool calls and database operations.
How to install
Prerequisites you need before starting:
• Python 3.10+
• Ollama
• Llama 3.2 model
• uv (Python package runner)
Install the model and dependencies using the following commands in order. Each command should be run separately in your terminal.
ollama pull llama3.2:3b
uv add fastmcp langchain langchain-mcp-adapters langchain-ollama
How to run the client and server
This section shows how to run the client that connects to the MCP server. Update the client configuration to point at your local runtime, then start the client.
In the client configuration, you will see a snippet similar to the following. Use the values shown here as placeholders and replace them with your actual paths if needed.
"command": "/home/omkar/.local/bin/uv",
"args": [
"run",
"fastmcp",
"run",
"/full/path/to/main.py"
]
Additional usage notes
Run the client with the provided command to start the interaction pipeline. The client connects to the MCP server via stdio and triggers tools like add_expense, get_total, and get_all_expenses based on the LLM’s interpretation of your natural language input.
Tools exposed by MCP server
The server exposes tools to manage expenses stored in SQLite. The primary tools are add_expense, get_total, and get_all_expenses. Use natural language queries to perform actions such as adding a new expense, viewing the total spent, or listing all expenses.
Available tools
add_expense
Adds a new expense entry with fields such as amount, category, and description.
get_total
Returns the total sum of all recorded expenses.
get_all_expenses
Returns a list of all recorded expenses from the SQLite database.