Expense Tracker MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Expense Tracker MCPLog a $12 coffee purchase from today."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Expense Tracker MCP
A personal expense tracking server built with FastMCP that exposes tools and resources via the Model Context Protocol (MCP). Connect it to any MCP-compatible AI client (Claude Desktop, Cursor, etc.) to log, query, and summarize your spending through natural language.
Features
Add expenses — record date, amount, category, optional subcategory, and a free-text note
List expenses — retrieve all entries within any date range
Summarize spending — aggregate totals by category, optionally filtered to a single category
Category reference — a live-reloadable resource (
expense://categories) exposes all valid categories and subcategories so the AI always suggests valid values
Related MCP server: Trackor
Tech Stack
Component | Technology |
MCP framework | FastMCP ≥ 3.1 |
Database | SQLite (file-based, zero config) |
Runtime | Python ≥ 3.12 |
Project Structure
expense-tracker-mcp/
├── main.py # MCP server — tools & resource definitions
├── categories.json # Category / subcategory taxonomy (editable at runtime)
├── expenses.db # SQLite database (auto-created on first run)
├── pyproject.toml # Project metadata & dependencies
└── README.mdGetting Started
1. Clone and install dependencies
git clone <repo-url>
cd expense-tracker-mcp
uv sync2. Run the server
uv run python main.pyThe server starts and listens for MCP connections. The expenses.db SQLite file is created automatically next to main.py on the first run.
3. Connect to an MCP client
Claude Desktop
Add the following block to your claude_desktop_config.json:
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/expense-tracker-mcp", "python", "main.py"]
}
}
}Cursor / other clients
Follow your client's MCP configuration guide, pointing the command at the same Python executable and main.py.
MCP Tools
add_expense
Add a new expense entry.
Parameter | Type | Required | Description |
|
| Yes | ISO 8601 date, e.g. |
|
| Yes | Expense amount (positive value) |
|
| Yes | Top-level category (see categories below) |
|
| No | Subcategory within the category |
|
| No | Free-text description |
Returns: { "status": "ok", "id": <inserted row id> }
list_expenses
Retrieve all expenses within a date range (inclusive).
Parameter | Type | Required | Description |
|
| Yes | ISO 8601 start date |
|
| Yes | ISO 8601 end date |
Returns: Array of expense objects with fields id, date, amount, category, subcategory, note.
summarize
Aggregate total spending by category within a date range.
Parameter | Type | Required | Description |
|
| Yes | ISO 8601 start date |
|
| Yes | ISO 8601 end date |
|
| No | Filter to a single category |
Returns: Array of { "category": "...", "total_amount": <number> } objects, ordered alphabetically.
MCP Resource
expense://categories
Returns the full categories.json file as application/json. The file is read from disk on every request, so you can add or rename categories without restarting the server. The AI uses this resource to suggest valid category and subcategory values when logging expenses.
Categories
The taxonomy ships with 18 top-level categories:
Category | Example Subcategories |
| groceries, dining_out, delivery_fees |
| fuel, public_transport, cab_ride_hailing |
| rent, repairs_service, furnishing |
| electricity, internet_broadband, mobile_phone |
| medicines, doctor_consultation, fitness_gym |
| books, courses, online_subscriptions |
| school_fees, daycare, toys_games |
| movies_events, streaming_subscriptions, games_apps |
| clothing, electronics_gadgets, home_decor |
| saas_tools, cloud_ai, music_video |
| salon_spa, grooming, cosmetics |
| gifts_personal, charity_donation, festivals |
| bank_charges, interest, brokerage |
| hosting_domains, marketing_ads, contractor_payments |
| flights, hotels, visa_passport |
| household_supplies, cleaning_supplies, small_repairs |
| food, vet, grooming |
| income_tax, gst, filing_fees |
Every category also accepts "other" as a catch-all subcategory. Edit categories.json freely to add your own.
Example Prompts
Once connected to an AI client:
Add an expense: ₹450 on groceries todayList all my expenses for February 2026Summarize my spending between 2026-01-01 and 2026-03-09How much did I spend on food and transport this month?Development
Inspect with MCP Inspector
FastMCP 3.x ships with an interactive inspector. Launch it with:
uv run fastmcp dev inspector main.pyThis opens the MCP Inspector UI in your browser so you can call tools and browse resources interactively without a full AI client.
Reset the database
The schema is initialised automatically via init_db() on first run. To wipe all data:
rm expenses.dbAvailable Tools
1 tooladd_expenseC
Add a new expense entry to the database.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| note | No | ||
| amount | Yes | ||
| category | Yes | ||
| subcategory | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states it adds a new entry, which implies mutation, but fails to disclose any additional behavior such as constraints, error handling, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, making it concise. However, it is too minimal and does not provide enough information, so it is not optimally structured for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters (3 required) and no output schema, the description is severely incomplete. It does not explain parameter roles, constraints, or return values, leaving the agent without essential context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description does not mention any parameters, and the schema has 0% description coverage. Therefore, it adds no meaning beyond the raw schema, failing to compensate for the lack of parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Add a new expense entry to the database,' which clearly identifies the action (add) and resource (expense entry). However, it does not differentiate from any sibling tools since no siblings are provided.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool or any prerequisites. The description lacks any context about alternatives or appropriate scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.0- First observed
add_expense
TDQS
Scored across 1 tool
With only one tool, there is no risk of confusion between tools. The tool's purpose is clear and unambiguous.
The single tool name follows a clear verb_noun pattern (add_expense), which is consistent and predictable.
An expense tracker server with only one tool (add) is severely underscoped. Essential operations like list, update, and delete are missing, making the tool surface too thin for practical use.
The tool set covers only the create operation. Without read, update, or delete capabilities, agents cannot manage expenses effectively, resulting in dead-end workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- ManiloOAuthapp.ledgy.api
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
- ManiloOAuthapp.manilo
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
Personal finance ledger for AI agents — query spending, track bills, forecast cash flow.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage personal expenses through natural language conversations. Supports adding, searching, and analyzing transactions with automatic categorization and financial insights.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables users to track and manage personal expenses through natural language, including adding entries, filtering by date/category, viewing statistics, and exporting data in JSON or CSV format.3-
- FlicenseNot gradedqualityDmaintenanceEnables users to track expenses by adding, listing, and summarizing them with category support through natural language.-
- FlicenseNot gradedqualityBmaintenanceEnables managing personal expenses, budgets, and financial summaries through natural language, with tools for adding, listing, updating, deleting expenses, setting budgets and credits, and generating dashboards.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vinzette/expense-tracker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server