ExpenseTracker
ExpenseIQ is an MCP server for personal expense tracking that lets you manage expenses, analyze spending, set budgets, and export data.
Add expenses with date, amount, category, subcategory, note, payment method, tags, and recurring flag
List expenses by date range with filters like category, subcategory, payment method, amount range, tag, and pagination
Get, edit, and delete expenses by ID
Search expenses by note and tags
Summarize expenses grouped by category, subcategory, month, or day with totals and averages
View monthly trends across the last N months
Get category breakdowns by subcategory
Set and monitor monthly budgets per category with over-budget utilization status
Export expenses as CSV for spreadsheets
Read resources like category mappings and live spending stats
Use the monthly report prompt for structured analysis
Click on "Deploy 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., "@ExpenseTracker What's my budget status for this month?"
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.
๐ฐ ExpenseIQ (MCP Server)
A production-grade Model Context Protocol (MCP) server for personal expense tracking โ powered by SQLite, designed for Claude Desktop, and ready for remote deployment.
Live Server URL: https://expenseiq.fastmcp.app/mcp
โจ Feature Highlights
Feature | Description |
15 Tools | Add, list, edit, delete, search, summarize, trend, budget, breakdown โ plus editable categories |
Fully Async | Non-blocking I/O using |
Budget Tracking | Set monthly limits per category, get over-budget warnings with utilization % |
Trend Analysis | Month-over-month spending trends for the last N months |
CSV Export | Export filtered expenses as CSV โ paste directly into Google Sheets / Excel |
Smart Search | Full-text search across notes and tags |
Editable Categories | Pre-seeded with 100+ subcategories, fully editable via |
Input Validation | Category, date, amount, and payment method validation on every operation |
Currency: โน INR | All responses include |
Prompt Templates | Built-in |
Pagination | Large result sets with |
Related MCP server: expense-mcp
๐๏ธ Architecture
graph LR
A["Claude Desktop / MCP Inspector"] -->|MCP Protocol| B["FastMCP Server"]
B --> C["main.py โ 12 Tools + 2 Resources + 1 Prompt"]
C --> D["db.py โ SQLite"]
C --> E["categories.json"]
D --> F["expenses.db"]๐ Quick Start
Prerequisites
Python 3.13+
uv โ fast Python package manager
Node.js / npx โ for MCP Inspector (optional)
Claude Desktop โ to use the server as an AI assistant
1. Clone & Install
git clone https://github.com/Aricode2005/expense-tracker-mcp.git
cd expense-tracker-mcp
uv sync2. Test with MCP Inspector
npx @modelcontextprotocol/inspector uv run main.pyThis opens a web UI where you can interactively call all 12 tools, read resources, and test prompts.
3. Install in Claude Desktop
Open your Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add this entry:
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\Users\\aritr\\Downloads\\AgenticAI\\MCP\\epense_tracker-mcp",
"main.py"
]
}
}
}๐ก Replace the path with your actual project directory.
Restart Claude Desktop. You should see the ExpenseTracker server in the MCP tools panel (๐ icon).
๐ ๏ธ Tool Reference
Core CRUD
Tool | Description |
| Add expense with date, amount, category, subcategory, note, payment method, tags, recurring flag |
| Fetch a single expense by ID |
| Update any field(s) of an existing expense |
| Delete an expense by ID (returns deleted record) |
Query & Search
Tool | Description |
| List expenses in a date range with filters (category, amount range, payment method, tag) + pagination |
| Full-text search across notes and tags |
Analytics
Tool | Description |
| Aggregate by category / subcategory / month / day with count, total, avg, min, max |
| Month-over-month spending totals for the last N months |
| Subcategory-level breakdown for a single category |
Budgets
Tool | Description |
| Set or update a monthly budget limit for a category |
| Compare actual vs budget with utilization %, over-budget warnings |
Export
Tool | Description |
| Export expenses as CSV text for spreadsheets |
Resources
URI | Description |
| Full category โ subcategory mapping (JSON) |
| Live dashboard: totals, this month, top categories |
Prompts
Prompt | Description |
| Generates a structured monthly report with summaries, budgets, and trend analysis |
๐ Project Structure
expense-tracker-mcp/
โโโ main.py # MCP server โ 12 tools, 2 resources, 1 prompt
โโโ db.py # Database schema, init, connection helpers
โโโ categories.json # 20 categories with 100+ subcategories
โโโ pyproject.toml # Project config (uv / pip)
โโโ README.md # You are here
โโโ src/
โโโ epense_tracker_mcp/
โโโ __init__.py # Package entry point๐ฌ Example Conversations with Claude
Once installed in Claude Desktop, try:
"Add an expense of โน450 for groceries today, paid via UPI"
"Show me my spending for September 2026"
"Set a monthly budget of โน5000 for food"
"Am I over budget this month?"
"What's my month-over-month spending trend?"
"Export this month's expenses as CSV"
"Search for expenses tagged 'client-x'"
"Break down my food spending by subcategory"
๐๏ธ Database Schema
expenses table
Column | Type | Description |
| INTEGER PK | Auto-incrementing ID |
| TEXT | Date in YYYY-MM-DD format |
| REAL | Amount in โน INR (must be > 0) |
| TEXT | e.g. food, transport, health |
| TEXT | e.g. groceries, cab_ride_hailing |
| TEXT | Free-text description |
| TEXT | cash / upi / credit_card / debit_card / net_banking / wallet |
| INTEGER | 0 or 1 |
| TEXT | Comma-separated tags |
| TEXT | ISO-8601 timestamp |
| TEXT | ISO-8601 timestamp |
budgets table
Column | Type | Description |
| INTEGER PK | Auto-incrementing ID |
| TEXT UNIQUE | One budget per category |
| REAL | Monthly cap in โน INR |
| TEXT | ISO-8601 timestamp |
๐ Remote Deployment
This server has three transport modes built in โ no Docker needed:
# Local (MCP Inspector / Claude Desktop)
python main.py
# Remote โ modern streamable-http (recommended)
python main.py --remote
# Remote โ legacy SSE
python main.py --sseThe PORT environment variable is respected (default: 8000).
Deploy to a Cloud Platform (Railway / Render / Fly.io)
Push this repo to GitHub.
Link the repo in your cloud platform.
Set the Start Command to:
python main.py --remoteThe platform injects
PORTautomatically โ the server binds to it.
Connect Claude Desktop to a Remote Server
Use npx to bridge the remote HTTP server into a local STDIO connection for Claude Desktop.
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"expense-iq-remote": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector",
"mcp-remote",
"https://expenseiq.fastmcp.app/mcp"
]
}
}
}Note: The
mcp-remotecommand from the inspector package acts as a bridge, allowing Claude Desktop (which expects local STDIO) to communicate with your cloud-hosted HTTP server.
Test Remote Mode Locally
# Terminal 1 โ start the server
python main.py --remote
# Terminal 2 โ connect MCP Inspector to it
npx @modelcontextprotocol/inspector
# Then set Transport Type to "Streamable HTTP"
# and URL to http://localhost:8000/mcp๐ฃ๏ธ Roadmap
Remote Deployment โ Built-in SSE transport support
Fully Async โ Converted to
aiosqliteEditable Categories โ Categories managed in SQLite
Authentication โ API key / OAuth for multi-user support
Income Tracking โ Track income alongside expenses for net savings
Recurring Automation โ Auto-add recurring expenses monthly
Data Visualization โ Generate charts (spending pie, trend line) as image resources
Multi-currency โ Support USD, EUR with conversion rates
Receipt OCR โ Extract expense data from receipt images via MCP resources
๐งฐ Tech Stack
Technology | Purpose |
Python 3.13 | Runtime |
FastMCP | MCP server framework (Async, SSE, STDIO) |
SQLite (aiosqlite) | Embedded database (WAL mode, non-blocking) |
Model Context Protocol | AI-tool communication standard |
uv | Package management & script runner |
๐ค Author
Available Tools
12 toolsadd_expenseAdd ExpenseC
Add a new expense to the tracker.
Inputs: date (required), amount (required), category (required), note, +4 more. Returns: object
delete_expenseDelete ExpenseA
Delete an expense by its ID. Returns the deleted record for confirmation.
Inputs: expense_id (required). Returns: object
edit_expenseEdit ExpenseA
Edit an existing expense. Only the fields you provide will be updated.
Inputs: expense_id (required), date, note, tags, +5 more. Returns: object
export_expensesExport ExpensesA
Export expenses in a date range as CSV text (can be pasted into a spreadsheet).
Inputs: end_date (required), start_date (required), category. Returns: object
get_budget_statusGet Budget StatusA
Compare actual spending vs budget for a given month (YYYY-MM). If month is empty, defaults to the current month.
Inputs: month. Returns: object
get_category_breakdownGet Category BreakdownA
Break down spending for a single category by its subcategories.
Inputs: category (required), end_date (required), start_date (required). Returns: object
get_expenseGet ExpenseA
Fetch a single expense by its ID.
Inputs: expense_id (required). Returns: object
get_monthly_trendGet Monthly TrendB
Show month-over-month spending totals for the last N months.
Inputs: months. Returns: object
list_expensesList ExpensesB
List expenses within an inclusive date range, with optional filters.
Inputs: end_date (required), start_date (required), tag, limit, +6 more. Returns: object
search_expensesSearch ExpensesA
Full-text search across expense notes and tags.
Inputs: query (required), limit. Returns: object
set_budgetSet BudgetB
Set or update the monthly budget for a category.
Inputs: category (required), monthly_limit (required). Returns: object
summarize_expensesSummarize ExpensesA
Aggregate spending over a date range. Group by category, subcategory, month, or day.
Inputs: end_date (required), start_date (required), category, group_by. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 12 tools
Tools are mostly distinct: CRUD operations, search, export, and analytical aggregates. However, summarize_expenses, get_monthly_trend, and get_category_breakdown overlap in aggregation capabilities, though each targets a specific dimension (generic grouping vs. time trend vs. subcategory breakdown). Descriptions help disambiguate but slight confusion is possible.
All tools follow a consistent verb_noun pattern in snake_case (e.g., get_expense, add_expense, list_expenses, set_budget). No mixed conventions or vague verbs; naming is predictable and uniform.
12 tools is well-scoped for an expense tracker covering full CRUD plus search, export, and analytical summaries. Each tool has a clear purpose and none are redundant.
The surface covers the full expense lifecycle (add, get, list, edit, delete) and adds search, export, budget management, and multiple aggregation views. No obvious gaps for the stated domain; it feels complete and self-sufficient.
Maintenance
Related MCP Connectors
Personal finance for AI agents โ onboard, import statements, categorize & budget over MCP.
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 Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables users to track personal expenses through natural language interactions with comprehensive category support and financial summaries. Provides both local and remote MCP server options with SQLite storage for fast expense management operations.-
- AlicenseAqualityDmaintenancePersonal expense tracker MCP server that enables tracking expenses, income, budgets, and savings goals through natural language.1029 PyPI1MIT
- AlicenseBqualityBmaintenanceEnables local tracking of personal expenses by adding, listing, summarizing, updating, and deleting expense records stored in a CSV file through an MCP client.5MIT
- FlicenseNot gradedqualityCmaintenanceEnables managing and analyzing personal expenses through MCP tools, including adding expense records, listing expenses within date ranges, and summarizing spending by category, with expense categories exposed as an MCP resource.-