Expense Tracker MCP
Click on "Install 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., "@Expense Tracker MCPadd a $50.00 grocery expense for today"
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.
Expense Tracker MCP
A simple Model Context Protocol (MCP) server for tracking expenses in a local SQLite database. It exposes tools for adding, reading, updating, deleting, and summarizing expenses, plus a JSON resource containing supported categories and subcategories.
Features
Add expenses with amount, date, category, subcategory, and note fields
List all saved expenses
Query expenses by start and end date
Update existing expenses by ID
Delete expenses by ID
Summarize spending by category over a date range
Read predefined expense categories from
categories.jsonStore data locally in
expenses.db
Related MCP server: Personal Finance Tracker
Requirements
Python 3.13 or newer
uvfor dependency management, or another Python package manager
Installation
Clone the project and install dependencies:
uv syncThe main dependency is fastmcp, defined in pyproject.toml.
Running The Server
Start the MCP server:
uv run python main.pyBy default, the server runs over HTTP on:
http://0.0.0.0:8000The SQLite database is initialized automatically when the server starts. If expenses.db does not already contain the required table, it will be created.
MCP Tools
add_expense
Adds a new expense.
Parameters:
amount(float): Expense amountdate(str): Expense date, preferably inYYYY-MM-DDformatcategory(str): Main expense categorysubcategory(str, optional): More specific categorynote(str, optional): Additional details
Example:
{
"amount": 250.75,
"date": "2026-07-08",
"category": "food",
"subcategory": "groceries",
"note": "Weekly grocery run"
}get_expenses
Returns all expenses stored in the database.
get_expense_by_start_end_date
Returns expenses between two dates.
Parameters:
start_date(str): Start dateend_date(str): End date
Example:
{
"start_date": "2026-07-01",
"end_date": "2026-07-31"
}update_expense
Updates an existing expense by ID. Only fields provided in the request are updated.
Parameters:
expense_id(int): Expense IDamount(float, optional): Updated amountdate(str, optional): Updated datecategory(str, optional): Updated categorysubcategory(str, optional): Updated subcategorynote(str, optional): Updated note
Example:
{
"expense_id": 1,
"amount": 300,
"note": "Updated grocery total"
}delete_expense
Deletes an expense by ID.
Parameters:
expense_id(int): Expense ID to delete
summarize
Summarizes expenses by category for a date range.
Parameters:
start_date(str): Start dateend_date(str): End datecategory(str, optional): Filter summary to one category
Example:
{
"start_date": "2026-07-01",
"end_date": "2026-07-31",
"category": "food"
}MCP Resources
expenses://categories
Returns the contents of categories.json, which maps supported categories to their subcategories.
Example categories include:
foodtransporthousingutilitieshealtheducationbusinesstravelinvestmentsmisc
Data Model
Expenses are stored in the expenses SQLite table:
Column | Type | Description |
|
| Auto-incrementing primary key |
|
| Expense amount |
|
| Expense date |
|
| Main category |
|
| Optional subcategory |
|
| Optional note |
Project Structure
.
├── main.py # FastMCP server and tool definitions
├── categories.json # Category and subcategory definitions
├── expenses.db # Local SQLite database
├── pyproject.toml # Project metadata and dependencies
├── uv.lock # Locked dependency versions
└── README.mdNotes
Date values are stored as text. Use a consistent format such as
YYYY-MM-DDso date-range queries work correctly.The database file is local to this project directory.
The current implementation does not validate category names against
categories.json; clients should use the categories resource to choose valid values.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ayush-patel-29/expense-tracker-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server