Expense Tracker MCP
Enables AI assistants to add, retrieve, and categorize expense records through structured MCP tools, with data stored in SQLite and deployable remotely for natural-language expense management.
README
Expense Tracker MCP
A remote Model Context Protocol (MCP) server built with FastMCP that allows AI assistants such as Claude to interact with an expense-tracking system through structured tools.
🚀 Overview
This project demonstrates how an AI assistant can interact with external data and application functionality through MCP.
The Expense Tracker MCP server uses FastMCP to expose expense-management tools and SQLite to store expense data.
The server is deployed remotely using FastMCP Cloud, allowing an MCP-compatible client such as Claude to connect to it through a remote MCP endpoint.
🏗️ Architecture
Claude
│
│ MCP
▼
Remote MCP Endpoint
│
▼
FastMCP Cloud
│
▼
FastMCP Expense Tracker Server
│
▼
SQLite Database
✨ Features
- Add and manage expenses
- Retrieve expense records
- Categorize expenses
- Store expense data using SQLite
- Expose expense functionality through MCP tools
- Deploy the MCP server remotely
- Connect the remote MCP server to Claude
- Allow AI assistants to interact with structured expense data
🛠️ Tech Stack
- Python
- FastMCP
- Model Context Protocol (MCP)
- SQLite
- JSON
- FastMCP Cloud
- Claude
🔌 Example Interactions
Once connected to Claude, users can interact with the expense tracker using natural language.
"Add an expense of ₹500 for groceries."
"Show me my recent expenses."
"How much did I spend on food?"
"List my expenses by category."
Claude interprets the user's request and invokes the appropriate MCP tool exposed by the server.
☁️ Remote Deployment
The MCP server is deployed on FastMCP Cloud and exposed through a remote MCP endpoint.
This allows Claude and other MCP-compatible clients to access the server without running it locally.
Local Development
↓
FastMCP Server
↓
FastMCP Cloud
↓
Remote MCP Endpoint
↓
Claude
⚙️ Local Setup
Clone the repository:
git clone https://github.com/khushisonwane23/expense-tracker-mcp.git
cd expense-tracker-mcp
Create a virtual environment:
python -m venv .venv
Activate the virtual environment on Windows:
.venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
If you are using uv:
uv sync
▶️ Run Locally
Run the FastMCP server:
fastmcp run server.py
The exact command may vary depending on the project configuration.
🔗 Connecting to Claude
After deploying the server to FastMCP Cloud, the application provides a remote MCP endpoint.
This endpoint can be configured in an MCP-compatible client such as Claude.
Claude
↓
Remote MCP Endpoint
↓
FastMCP Cloud
↓
Expense Tracker MCP Server
↓
SQLite Database
Once connected, Claude can discover and use the tools exposed by the MCP server.
🔐 Security
Sensitive information should never be committed to this repository.
The following files should remain private:
.env
expenses.db
.venv/
__pycache__/
API keys and other secrets should be stored using environment variables instead of being hard-coded in the source code.
🎯 Learning Goals
This project was built to understand:
- How the Model Context Protocol works
- How AI assistants interact with external tools
- How to build MCP servers using FastMCP
- How to connect LLMs with external data
- How tool-based AI workflows work
- How to deploy an MCP server remotely
- How MCP can be integrated with Claude
🚧 Future Improvements
- Add authentication and authorization
- Add monthly spending analytics
- Add budget tracking
- Add richer financial insights
- Improve error handling and input validation
- Add automated testing
- Use a production-grade database
- Add more financial management tools
👩💻 Author
Khushi Sonwane
Artificial Intelligence & Robotics Student
Interested in Generative AI, AI Agents, MCP, RAG, and AI Research.
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.
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.