expenses-tracker-mcp
Enables read-only SQL queries and transaction classification tools for local expense tracking, including listing, filtering, and bulk account assignment with dry-run mode.
README
Expenses Tracker
A local-first expense tracking app built with FastAPI, SQLite, React, and Vite.
The backend stores transactions in a local SQLite database, serves the API under /api, and serves the built React frontend from the FastAPI app. The project also includes an MCP server for querying and classifying transactions from compatible clients.
Features
- Import bank statement CSV files
- Add, edit, delete, filter, and classify transactions
- Maintain accounts and account groups
- View monthly overview, category totals, and daily reports
- Run a local MCP server with guarded read-only SQL plus transaction classification tools
Project structure
src/expenses_tracker/
main.py FastAPI app entry point
database.py SQLite setup and seed accounts
transactions.py Transaction data operations
import_statement.py CSV statement import logic
api/routes.py API routes
static/ Built frontend served by FastAPI
src/expenses_tracker_mcp/
server.py MCP server for expense tools
frontend/
index.html Vite entry HTML
src/ React source
vite.config.js Builds into src/expenses_tracker/static
data/
expenses.db Local SQLite database, ignored by git
Requirements
- Python 3.12+
- uv
- Node.js and npm
Setup
Install Python dependencies:
uv sync
Install frontend dependencies:
cd frontend
npm install
Build the frontend
The FastAPI app serves the compiled frontend from src/expenses_tracker/static.
cd frontend
npm run build
Run the app
uv run expenses
The app starts on http://127.0.0.1:8125 and opens the default browser automatically.
On first startup, the app creates data/expenses.db and seeds the default income statement lines, account groups, and accounts.
Bank statement imports
The transaction screen can import a CSV file through the browser. The backend also supports importing a local statement.csv from the project root when POST /api/import-bank-statement is called without a request body.
Expected CSV columns:
Transaction DateinDD/MM/YYYYformatTransaction DescriptionDebit AmountCredit Amount
Debit amounts are stored as negative pence values. Credit amounts are stored as positive pence values. Imported transactions are assigned to the Pending account by default.
statement.csv is ignored by git because bank statements can contain sensitive financial data.
API overview
GET /api/healthGET /api/account-groupsGET /api/accountsPOST /api/accountsGET /api/transactionsPOST /api/transactionsPATCH /api/transactions/{transaction_id}DELETE /api/transactions/{transaction_id}POST /api/import-bank-statement
MCP server
Run the MCP server with:
uv run expenses-mcp
Available tools include:
- guarded read-only SQL queries
- transaction listing with filters
- account listing
- pending transaction grouping
- classification summaries
- account assignment for selected transactions or filtered batches
Use dry-run mode before bulk classification changes.
Development notes
- Frontend source lives in
frontend/src. - Frontend build output is committed under
src/expenses_tracker/staticso the FastAPI app can serve the UI directly. - Local runtime data is ignored under
data/*.db. - If dependencies change, commit both
pyproject.toml/uv.lockandfrontend/package.json/frontend/package-lock.json.
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.