Personal Expense Tracker
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Personal Expense Tracker Add a $12.50 lunch expense for today and summarize my food spending this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Personal Expense Tracker
A simple expense tracking API built with FastAPI, SQLite, and FastMCP.
The project lets you add expenses, view them by date range, and get a quick summary of spending by category.
Features
Add a new expense
Store expenses in SQLite
Filter expenses by date range
Get spending totals by category
Optional category filtering for summaries
Expose the FastAPI app through an MCP server
Related MCP server: Personal Expense Tracker MCP
Tech Stack
Python 3.12+
FastAPI
SQLite
Pydantic
FastMCP
uv
Project Structure
PersonalExpenseTracker/
│
├── main.py # FastAPI application and API routes
├── server.py # FastMCP server
├── categories.json # Expense categories
├── pyproject.toml # Project configuration
├── uv.lock # Locked dependencies
├── .gitignore
└── README.mdGetting Started
Clone the repository:
git clone https://github.com/bhuvpal/PersonalExpenseTracker.git
cd PersonalExpenseTrackerInstall dependencies:
uv syncRun the FastAPI server:
uv run uvicorn main:app --reloadThe API will be available at:
http://127.0.0.1:8000FastAPI also provides interactive API documentation at:
http://127.0.0.1:8000/docsAPI Endpoints
Method | Endpoint | Purpose |
GET |
| Check if the API is running |
POST |
| Add an expense |
GET |
| Get expenses for a date range |
GET |
| Get spending summary by category |
Example Expense
{
"amount": 250,
"date": "2026-09-04",
"category": "Food",
"sub_category": "Lunch",
"note": "Lunch with friends"
}MCP Server
The project also includes a FastMCP server that exposes the FastAPI application for MCP-based usage.
Run it with:
uv run python server.pyDatabase
Expenses are stored locally in a SQLite database.
Each expense contains:
Amount
Date
Category
Sub-category
Note
Why I Built This
I built this project to practice building APIs with FastAPI and explore how existing APIs can be exposed through Model Context Protocol (MCP).
Author
Bhuv Pal
GitHub: @bhuvpal
Available Tools
4 toolsadd_expense_expenses_postAdd Expense Expenses PostC
Add an expense to the database.
Inputs: date (required), amount (required), category (required), note, +1 more. Returns: object
homeHomeD
Home
Inputs: no named parameters.
list_expenses_expenses_getList Expenses Expenses GetC
List all expenses in the database.
Inputs: end_date (required), start_date (required). Returns: result
summarize_expenses_expenses_summarize_getSummarize Expenses Expenses Summarize GetC
Summarize expenses by category.
Inputs: end_date (required), start_date (required), category. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The three core tools (list, add, summarize expenses) target clearly distinct operations. However, the fourth tool 'home' has a vague description that gives no indication of what it does, creating one point of ambiguity.
The three expense tools use verbose auto-generated route-style names with redundant doubled segments and HTTP-method suffixes (e.g. list_expenses_expenses_get), while 'home' follows no pattern at all. The conventions are mixed and unpredictable.
Four tools is on the thin side for an expense tracker, and one of them ('home') appears to be a non-functional placeholder rather than a real capability. The count is borderline but not egregious.
The surface only supports create, list, and summarize; there is no update or delete for expenses, and no filtering or retrieval of a single expense. These are significant lifecycle gaps for an expense tracker.
Maintenance
Related MCP Connectors
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
Personal finance for AI agents — onboard, import statements, categorize & budget over MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables users to track personal expenses through natural language interactions with comprehensive category support and financial summaries. Provides both local and remote MCP server options with SQLite storage for fast expense management operations.-
- AlicenseBqualityBmaintenanceEnables local tracking of personal expenses by adding, listing, summarizing, updating, and deleting expense records stored in a CSV file through an MCP client.5MIT
- FlicenseNot gradedqualityCmaintenanceEnables managing and analyzing personal expenses through MCP tools, including adding expense records, listing expenses within date ranges, and summarizing spending by category, with expense categories exposed as an MCP resource.-
- FlicenseBqualityCmaintenanceEnables users to manage personal expenses by adding entries, listing them by date range, and summarizing spending by category through MCP tools, while exposing category data as a resource.3-