Expense Tracker MCP Server
Enables users to manage personal expenses through natural conversation with Claude, including adding, updating, deleting expenses, and viewing summaries by category or date range.
README
💰 Expense Tracker MCP Server
An intelligent expense tracking system built with the Model Context Protocol (MCP), allowing Claude AI to manage your personal finances through natural conversation.
🌟 Features
- User Management: Register and manage multiple users with phone numbers
- Expense Tracking: Add, update, and delete expenses with detailed metadata
- Smart Categorization: Organize expenses by categories and subcategories
- Date Range Queries: Filter expenses by custom date ranges
- Item Summaries: Get detailed breakdowns of spending by category
- Natural Language Interface: Interact with your expense data through Claude AI
🚀 What is MCP?
The Model Context Protocol (MCP) is an open standard by Anthropic that enables AI assistants like Claude to securely connect with external data sources and tools. This project implements an MCP server that gives Claude the ability to manage expense data in real-time.
🛠️ Tech Stack
- FastMCP: MCP server implementation
- PostgreSQL: Robust database for expense data
- SQLAlchemy: Async ORM for database operations
- Docker: Containerized PostgreSQL deployment
- Pydantic: Data validation
📋 Prerequisites
- Python 3.8+
- Docker and Docker Compose
- Claude Desktop App
🔧 Installation
1. Clone the Repository
git clone https://github.com/ArProvat/expense-tracker-mcp.git
cd expense-tracker-mcp
2. Install Dependencies
pip install -r requirements.txt
3. Start PostgreSQL Database
docker-compose up -d
This will start a PostgreSQL container with:
- Host: localhost
- Port: 5432
- Database: expenses
- User: postgres
- Password: postgres
4. Run Database Migrations
alembic upgrade head
5. Configure Claude Desktop
Add the MCP server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"expense-tracker": {
"command": "python",
"args": ["/path/to/your/expense-tracker-mcp/main.py"]
}
}
}
6. Restart Claude Desktop
Close and reopen Claude Desktop to load the MCP server.
📖 Usage
Once connected, you can interact with Claude naturally:
Register a User
"Register me as a user with phone number +1234567890"
Add Expenses
"Add an expense of $50 for groceries today"
"I spent 1500 taka on transportation yesterday"
View Expenses
"Show me all my expenses from last week"
"What did I spend in January 2025?"
Get Summaries
"Give me a summary of my food expenses this month"
"How much did I spend on entertainment?"
Update Expenses
"Update my last grocery expense to $45"
"Change the category of yesterday's expense to 'Shopping'"
Delete Expenses
"Delete my last expense"
"Remove the expense with ID abc123"
🎯 Available MCP Functions
Tool
add_user- Register a new useradd_expense- Add a new expense entryget_list_expenses- Retrieve expenses by date rangedelete_expense- Remove an expenseget_item_summary- Get spending summary by categoryupdate_expense- Modify existing expense details
Resource
categories.json-Define all categories and subcategories
📊 Database Schema
The system uses PostgreSQL to store:
- User profiles with contact information
- Expense records with amounts, categories, and dates
- Metadata for custom fields and tags
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Anthropic for creating MCP and Claude
- FastMCP for the MCP server framework
- The open-source community for the amazing tools and libraries
📧 Contact
For questions or feedback, feel free to reach out or open an issue!
Built with ❤️ using Model Context Protocol
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.