Expense Tracker MCP Server
A local Model Context Protocol server for personal expense tracking, enabling users to add, list, summarize, edit, and delete expenses as well as manage credit, with all balance-changing operations handled via SQLite transactions.
README
Expense Tracker MCP Server
A local Model Context Protocol (MCP) server for a personal Expense Tracker built with Python and SQLite3.
Features
add_expense— add an expense; decreases available creditlist_expenses— list expenses (newest first), optionally filtered by categorysummarize_expenses— totals by category, count, credit added, and available creditedit_expense— edit an expense; adjusts credit by the difference in amountdelete_expense— delete an expense; refunds the amount to creditadd_credit— add credit to the available balance
All balance-changing operations run inside SQLite transactions.
Folder structure
local MCP server/
├── main.py # MCP server + tool definitions (entry point)
├── expense_tracker/
│ ├── __init__.py
│ ├── database.py # SQLite connection + schema setup
│ └── operations.py # Core expense/credit business logic
├── pyproject.toml # Project config (fastmcp dependency)
├── uv.lock # Lockfile
└── README.md
The database file expense_tracker.db is created automatically on the first tool call.
Installation
Clone the repo:
git clone https://github.com/YogeshSharma2007/Local-Expense-tracker-MCP.git
cd Local-Expense-tracker-MCP
Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Install dependencies:
uv sync # or: pip install -e .
Run the server
python main.py
Then register the server as a local MCP stdio server in your MCP client.
Register with an MCP client (OpenCode example)
Add to your OpenCode config (opencode.json or wherever your client config lives):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"local-mcp": {
"type": "local",
"command": [
"<path-to-repo>\\.venv\\Scripts\\python.exe",
"<path-to-repo>\\main.py"
],
"enabled": true
}
}
}
Replace <path-to-repo> with the full path to wherever you cloned this repo, for example:
C:\Users\<your-username>\Documents\Local-Expense-tracker-MCP
Configuration
The database path defaults to expense_tracker.db in the project folder. Override it with the environment variable:
$env:EXPENSE_TRACKER_DB = "C:\path\to\expense_tracker.db"
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.