finance-mcp-server
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., "@finance-mcp-serverI spent $45 on groceries 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.
finance-mcp-server
An MCP server that gives any MCP client (Claude Desktop, Claude Code, etc.) tools to manage a personal finance ledger backed by local SQLite — no cloud account, no external service, just a single database file.
Why
Most MCP server examples wrap a SaaS API. This one wraps a real, useful domain model instead: transactions, categories, and monthly budgets, with proper validation, aggregation queries, and budget-vs-actual tracking — the kind of thing you'd actually want an assistant to reason over.
Related MCP server: Expense Tracker MCP Server
Tools exposed
Tool | Description |
| Record income (positive amount) or an expense (negative amount) against a category |
| List transactions, filterable by date range and category |
| Aggregate totals grouped by category over a date range |
| Total income, total expense, net, and top 5 expense categories for a period |
| Set or update a monthly spending limit for a category |
| Spend-vs-limit status for every budgeted category in a given month |
Categories are created on the fly the first time you reference them — no separate setup step.
Install
git clone https://github.com/adeev-mardia/finance-mcp-server.git
cd finance-mcp-server
pip install -e ".[dev]"Requires Python 3.10+.
Run it
As a standalone process (stdio transport):
finance-mcp-server
# or
python -m finance_mcp.serverConnect it to Claude Desktop / Claude Code
Add to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"finance": {
"command": "finance-mcp-server",
"env": {
"FINANCE_MCP_DB": "/absolute/path/to/finance.db"
}
}
}
}FINANCE_MCP_DB is optional — it defaults to data/finance.db relative to the package if unset.
Try it with demo data
python scripts/seed_demo_data.py # seeds ~3 months of realistic transactions + budgetsThen ask your MCP client things like "what did I spend on groceries last month?" or "am I over budget on dining out this month?".
Architecture
src/finance_mcp/
├── db.py # SQLite schema + query layer (stdlib sqlite3 only, no ORM)
└── server.py # FastMCP tool definitions — thin wrappers around db.pyThe persistence layer (db.py) has no dependency on the mcp package, so it's independently testable and reusable outside an MCP context (e.g. a CLI or web UI could sit on top of it too).
Testing
pip install -e ".[dev]"
pytest -v11 tests cover the query layer directly (test_db.py) and the MCP tool functions as they'll actually be invoked by a client (test_server_tools.py), including edge cases like invalid dates, new-category creation, date-range filtering, and over-budget detection.
Design notes
Signed amounts, not separate income/expense tables. A transaction's sign determines its kind; categories still carry a
kindfor aggregation, so "how much did I earn" and "how much did I spend" are simpleWHEREclauses, not joins across tables.Categories are get-or-create. An MCP client (or the person prompting it) shouldn't need to pre-register categories before recording a transaction — friction there defeats the point of a conversational interface.
No ORM. For a schema this small, stdlib
sqlite3keeps the whole persistence layer in one readable file and avoids a dependency that would otherwise dominatepip install -e ..
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- ManiloOAuthapp.manilo
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
- ManiloOAuthapp.ledgy.api
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.
Query your real net worth, spending, transactions, budgets and portfolio from any MCP client.
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.-
- FlicenseNot gradedqualityBmaintenanceTracks personal expenses and budgets via MCP, storing entries in SQLite and supporting category-based queries.-
- FlicenseNot gradedqualityCmaintenanceEnables self-hosted personal finance management for MCP clients by connecting read-only bank accounts via SimpleFIN, syncing transactions into a local SQLite database, and exposing tools to query balances, spending, budgets, cash flow, and net worth.-
- AlicenseBqualityAmaintenanceEnables local tracking of personal expenses by adding, listing, summarizing, updating, and deleting expense records stored in a CSV file through an MCP client.5MIT