Expense Tracker MCP Server

Expense Tracker MCP Server

An MCP server that lets AI assistants add, list, and summarize personal expenses using natural language, backed by SQLite.

Category
Visit Server

README

Expense Tracker MCP Server

A lightweight, async Model Context Protocol (MCP) server that lets any MCP-compatible AI assistant (like Claude) add, list, and summarize your personal expenses — backed by SQLite.

Built with FastMCP and deployed on FastMCP Cloud.

šŸ”— Live MCP endpoint: https://slippery-tomato-sawfish.fastmcp.app/mcp


What it does

Once connected, an AI assistant can manage your expenses conversationally — no forms, no spreadsheets. Just say "add ₹500 for groceries" or "summarize my July spending" and it happens.

Tools

Tool Description
add_expense(date, amount, category, subcategory="", note="") Adds a new expense entry to the database
list_expenses(start_date, end_date) Lists all expenses within an inclusive date range, most recent first
summarize(start_date, end_date, category=None) Groups and totals expenses by category within a date range

Resources

  • expense:///categories — Returns the list of supported expense categories as JSON.

Tech Stack

  • FastMCP — MCP server framework
  • aiosqlite — fully async SQLite driver (no blocking calls on the event loop)
  • SQLite — simple, file-based storage (auto-initialized on first run)

Why async?

Every tool (add_expense, list_expenses, summarize) is defined with async def and uses aiosqlite under the hood. This means the server doesn't block while waiting on database I/O — multiple requests can be handled concurrently instead of queuing behind a single synchronous call.

Database

The database (expenses.db) is created automatically in the system's temp directory on first run, with the following schema:

CREATE 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 ''
)

WAL journal mode is enabled for better concurrent read/write performance.

Running Locally

pip install fastmcp aiosqlite

python server.py

By default this starts an HTTP server on 0.0.0.0:8000. To run over stdio instead (for local MCP clients), swap the mcp.run(...) call at the bottom of the file.

Deploying

This server is deployed on FastMCP Cloud, which handles hosting the HTTP transport and gives you a public MCP URL you can plug into any MCP client (Claude, etc.) — no need to manage your own server or ngrok tunnel.

Connecting from Claude

Add the MCP endpoint as a connector:

https://slippery-tomato-sawfish.fastmcp.app/mcp

Once connected, just talk to it naturally:

"Add an expense of ₹450 for groceries today" "Show me my expenses from this month" "Summarize my spending by category"

Roadmap / Ideas

  • [ ] Edit/delete expense entries
  • [ ] Monthly budget limits + alerts
  • [ ] Export to CSV
  • [ ] Multi-user support with auth

Built as a hands-on project to learn the Model Context Protocol — from local server to a deployed, always-on tool an AI assistant can actually use.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured