ExpenseTracker MCP Server
A lightweight MCP server that lets LLM clients track, query, and summarize personal expenses using a local SQLite database.
README
ExpenseTracker MCP Server
A lightweight MCP server built with FastMCP that lets an LLM client (Claude Desktop, Claude Code, etc.) track, query, and summarize personal expenses backed by a local SQLite database.
Features
Add, view, update, delete, and search expense entries Summarize spending by category, date range, or month Export expenses to CSV Input validation for dates and amounts Zero external services — just a local expenses.db SQLite file
Requirements
Python 3.10+ fastmcp
Installation
bashpip install fastmcp
Clone or copy this repo, then make sure the following files sit in the same directory:
main.py # the MCP server category.json # list of categories (see below) expenses.db # auto-created on first run
category.json
Exposed as the expense://categories resource. Create it next to expense_tracker.py:
json{ "categories": [ "Food", "Travel", "Rent", "Utilities", "Entertainment", "Health", "Shopping", "Other" ] }
Running the server
bashpython main.py
FastMCP runs over stdio by default, ready to be connected to any MCP-compatible client.
Connecting to Claude Desktop
Add this to your claude_desktop_config.json:
json{ "mcpServers": { "expense-tracker": { "command": "python", "args": ["/absolute/path/to/main.py"] } } }
Restart Claude Desktop and the tools below will be available in chat.
Tools
ToolDescriptionadd_expense(date, amount, category, subcategory="", note="")Add a new expense entry. date must be YYYY-MM-DD.get_expense(expense_id)Fetch a single expense by id.update_expense(expense_id, date=None, amount=None, category=None, subcategory=None, note=None)Update one or more fields of an existing entry. Only provided fields change.delete_expense(expense_id)Delete an entry by id.list_expenses(start_date, end_date, category=None)List entries in an inclusive date range, optionally filtered by category.search_expenses(keyword, start_date=None, end_date=None)Search notes/category/subcategory for a keyword.summarize(start_date, end_date, category=None)Total + count per category over a date range.total_expenses(start_date, end_date, category=None)Grand total and entry count over a date range.monthly_summary(year, month, category=None)Category breakdown for a given calendar month.list_categories()Distinct categories currently present in the data.export_csv(start_date, end_date)Return a CSV string of all entries in the range.
Resources
ResourceDescriptionexpense://categoriesReturns the contents of category.json (read fresh on every access).
Example usage (in chat)
"Add an expense of 933 for travel today" "Show me all expenses from last week" "How much did I spend on Food in July 2026?" "Update expense #4, change the amount to 500" "Export all June expenses as CSV"
Database schema
sqlCREATE TABLE expenses( id INTEGER PRIMARY KEY AUTOINCREMENT, date TEXT NOT NULL, amount REAL NOT NULL, category TEXT NOT NULL, subcategory TEXT DEFAULT '', note TEXT DEFAULT '' );
Indexes are created automatically on date and category for faster range queries.
Validation rules
Date: must match YYYY-MM-DD, or the call raises a ValueError. Amount: must be a positive number. Category: required and cannot be empty on add_expense.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.