An MCP server that lets an AI app like Claude Desktop add expenses and answer questions about them. Data is stored in SQLite.
概览
An MCP server that lets an AI app like Claude Desktop add expenses and answer questions about them. Data is stored in SQLite. - Tools: add_expense, monthly_total, top_categories - Resource: expense://monthly_report - Prompt: budget_summary 1. Install Python 3.10+ and Node.js 18+ 2. Create a virtual environment: Open Settings > Developer > Edit Config and add: - I spent 250 on food today, add it - What is my total expense this month? - Which category did I spend the most on? Wrong input returns a clear message. For example: negative amount, empty title, wrong date format (use YYYY-MM-DD) or wrong month format (use YYYY-MM). - Monthly charts - Export reports to PDF and Excel - Edit and delete expenses
README
Smart Expense Tracker MCP
Overview
An MCP server that lets an AI app like Claude Desktop add expenses and answer questions about them. Data is stored in SQLite.
MCP Parts
- Tools: add_expense, monthly_total, top_categories
- Resource: expense://monthly_report
- Prompt: budget_summary
Setup
- Install Python 3.10+ and Node.js 18+
- Create a virtual environment:
python -m venv venv
venv\Scripts\activate
- Install packages:
pip install -r requirements.txt
- Test with MCP Inspector:
mcp dev server.py
Connect to Claude Desktop
Open Settings > Developer > Edit Config and add:
{
"mcpServers": {
"expense-tracker": {
"command": "C:/full/path/to/venv/Scripts/python.exe",
"args": ["C:/full/path/to/server.py"]
}
}
}
Restart Claude Desktop.
Example Questions
- I spent 250 on food today, add it
- What is my total expense this month?
- Which category did I spend the most on?
Run Tests
pytest
Error Handling
Wrong input returns a clear message. For example: negative amount, empty title, wrong date format (use YYYY-MM-DD) or wrong month format (use YYYY-MM).
Future Enhancements
- Monthly charts
- Export reports to PDF and Excel
- Edit and delete expenses
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"expense-tracker": {
"command": "C:/full/path/to/venv/Scripts/python.exe",
"args": ["C:/full/path/to/server.py"]
}
}
}