nitisbig/expense_tracker_mcp_server
If you are the rightful owner of expense_tracker_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Expense Tracker MCP Server is a backend server designed to manage personal expense records through natural language commands, integrating seamlessly with the Claude Desktop application.
💰 Expense Tracker MCP Server
A simple, robust backend server for an Expense Tracker tool designed to integrate with the Claude Desktop application via the Model-Context Protocol (MCP).
This server allows you to create and retrieve personal expense records from a PostgreSQL database using natural language commands within Claude.
requirements.txt
fastmcp sqlalchemy psycopg2-binary python-dotenv
File Structure
. ├── db.py # Contains SQLAlchemy models and database connection setup. ├── main.py # The main MCP server application with tool definitions. ├── requirements.txt # Lists all Python dependencies for the project. └── .env # Stores secret database credentials (excluded from git).
✨ Features
- Create Expenses: Add new expense records with a name, date, amount, and optional notes.
- Retrieve Expenses: Fetch a complete list of all recorded expenses.
- Persistent Storage: Uses a PostgreSQL database to securely store all your expense data.
- Seamless Integration: Designed to be launched and managed directly by the Claude Desktop app for a smooth user experience.
🛠️ Tech Stack
| Component | Technology |
|---|---|
| Backend | Python |
| MCP Framework | fastmcp |
| Database ORM | SQLAlchemy |
| Database | PostgreSQL |
| Python Environment | uv |
🚀 Getting Started
Follow these steps to set up and run the server locally.
✅ Prerequisites
- Python 3.10+
- uv: A fast Python package installer and resolver
pip install uv
.env
DB_HOST=localhost DB_USER=your_postgres_username DB_PASSWORD=your_secret_password DB_NAME=postgres
Claude Desktop Configuration
{ "mcpServers": { "Expense Tracker": { "command": "uv", "args": [ "run", "python", "C:\path\to\your\project\main.py" ], "cwd": "C:\path\to\your\project\", "transport": "stdio" } } }