Expense Tracker MCP
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., "@Expense Tracker MCP Add a $45.75 lunch expense to Dining and show my balance"
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 local expense and income tracker backed by SQLite. The project provides a Model Context Protocol (MCP) server for AI assistants (such as Claude Desktop, Cursor, and other MCP clients) and an optional FastAPI REST server for HTTP clients.
Features
Expenses: Add, list, edit, and delete expense records.
Income & Credits: Store income/credit entries and calculate your current balance in real time.
Categorization: Summarize spending grouped by category with optional date and category filters.
Category Catalog: Load and query category/subcategory definitions from
categories.json.Local Storage: All records are stored locally in SQLite (
expenses.db), ensuring privacy.
Related MCP server: ExpenseTracker MCP Server
Technology Stack
Python: 3.13 or newer
FastMCP: High-performance MCP server implementation
SQLite: Local relational storage
FastAPI & Uvicorn: Optional REST API with OpenAPI documentation
uv: Fast Python package and dependency manager
Project Structure
.
|-- expense_tracker.py # Main FastMCP expense tracker server
|-- server.py # Optional FastAPI REST API server
|-- categories.json # Expense categories and subcategories catalog
|-- pyproject.toml # Project metadata and dependencies (uv)
|-- uv.lock # Locked Python dependencies
|-- expenses.db # Local runtime SQLite database (git-ignored)
`-- src/expense_tracker_mcp/ # Package entry point
`-- __init__.pySetup
Install uv if not already installed.
Clone or navigate to this directory and sync dependencies:
# Sync core MCP dependencies
uv sync
# (Optional) Include FastAPI REST dependencies
uv sync --extra apiThe database (expenses.db) and its tables are automatically created on first run:
expenses:id,date,amount,category,subcategory,notecredit:id,date,amount,source,note
Running the MCP Server
Start the MCP server using either of the following commands:
uv run python expense_tracker.pyOr via the installed package command:
uv run expense-tracker-mcpExposed MCP Tools
Tool | Parameters | Description |
|
| Add an expense (date defaults to today). |
|
| List expense records with optional date range and limit. |
|
| Group expenses by category and calculate totals. |
|
| Update fields of an existing expense record. |
|
| Delete an expense by ID. |
|
| Add an income or credit record. |
|
| List recent credit entries. |
| (none) | Return total credits, total expenses, and current balance. |
Exposed MCP Resources
Resource URI | MIME Type | Description |
|
| Provides the category catalog from |
Configuring with MCP Clients (e.g. Claude Desktop)
To connect this server to Claude Desktop, add the configuration below to your claude_desktop_config.json:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\Users\\Dell\\OneDrive\\Desktop\\Expense_tracker_mcp",
"python",
"expense_tracker.py"
]
}
}
}(Replace the path with the absolute path to your project directory).
Running the REST API
server.py provides equivalent HTTP endpoints and interactive OpenAPI documentation.
Start the API:
uv run python server.pyAPI Base URL:
http://localhost:8000Interactive Swagger UI:
http://localhost:8000/docs
Main REST Endpoints
Method | Endpoint | Description |
|
| Add a new expense |
|
| List expenses (supports |
|
| Update an existing expense |
|
| Delete an expense |
|
| Get expense summary by category |
|
| Add a credit / income entry |
|
| List credit entries |
|
| Get current balance |
|
| Retrieve categories catalog |
Example Request
curl -X POST http://localhost:8000/expenses \
-H "Content-Type: application/json" \
-d '{
"amount": 25.50,
"category": "food",
"subcategory": "dining_out",
"note": "Lunch"
}'Data and Privacy
All financial records are stored locally in expenses.db within the project root. This file is excluded by .gitignore to prevent sensitive financial data from being committed to version control.
Available Tools
8 toolsadd_creditAdd CreditB
Add credit/income entry.
Inputs: date, note, amount, source.
add_expenseAdd ExpenseC
Add a new expense entry to the database.
Inputs: date, note, amount, category, +1 more.
delete_expenseDelete ExpenseA
Delete an expense entry.
Inputs: expense_id (required).
edit_expenseEdit ExpenseC
Edit an existing expense.
Inputs: expense_id (required), date, note, amount, +2 more.
get_balanceGet BalanceA
Get current balance (total credits - total expenses).
Inputs: no named parameters.
list_creditsList CreditsC
List credit entries.
Inputs: limit.
list_expensesList ExpensesA
List expense entries. Optionally filter by date range.
Inputs: limit, end_date, start_date.
summarizeSummarizeB
Summarize expenses by category. Optionally filter by date range or category.
Inputs: category, end_date, start_date.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a clearly distinct operation: add/list/edit/delete expenses, add/list credits, summarize, and get balance. There are no overlapping or confusable tools; an agent can easily select the correct action.
Most tools follow a consistent verb_noun pattern like add_expense, list_expenses, edit_expense, delete_expense, add_credit. Minor deviations include the bare verb 'summarize' and 'get_balance' instead of something like 'summarize_expenses' or 'get_balance', but the overall pattern remains readable and predictable.
With 8 tools, the set is well-scoped for an expense tracker. There are enough tools to cover core operations without unnecessary redundancy or overwhelming the agent.
Expenses have full CRUD coverage (add, list, edit, delete) and there is summarizing plus balance calculation. However, credits only support add and list, with no edit_credit or delete_credit, which creates a notable gap in managing income entries and could leave incorrect credits uncorrectable.
Maintenance
Related MCP Connectors
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.
Personal finance for AI agents — onboard, import statements, categorize & budget over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage personal expenses through natural conversation, supporting expense tracking, categorization, filtering, and financial summaries. Uses SQLite database to store expense records with full CRUD operations for comprehensive personal finance management.2-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage personal expenses by adding, querying, and summarizing expense data through a SQLite database and configurable categories.1GPL 3.0
- FlicenseNot gradedqualityBmaintenanceEnables natural language expense management by converting user requests into validated database operations, including adding, searching, updating, deleting, and summarizing expenses through MCP tools over SQLite.-
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to add, retrieve, and categorize expense records through structured MCP tools, with data stored in SQLite and deployable remotely for natural-language expense management.-