Expense Tracker MCP Server
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 MCP Serveradd $45 for groceries"
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 Server
A lightweight local MCP (Model Context Protocol) server for tracking personal or small-team expenses. It lets you add expense entries, list transactions within a date range, and generate simple summaries by category — all backed by a local SQLite database.
This project is designed for simple, local-first expense management and easy integration with MCP-compatible clients. It also exposes a structured expense category resource so clients can present consistent category options without hardcoding them.
Features
Add expenses with a date, amount, category, optional subcategory, and note
List expenses within an inclusive date range
Summarize spending by category across a date range
Local SQLite storage for fast, simple persistence
Category resource served from
categories.jsonEasy customization by editing the category file without restarting the server
Related MCP server: Personal Finance Tracker
How it works
The server is built with Python and FastMCP.
When the app starts, it initializes a local SQLite database file called expenses.db and ensures the expenses table exists. The main entry point in main.py registers MCP tools for inserting expenses, fetching expense rows in a date range, and summarizing totals grouped by category. It also registers an MCP resource at expense://categories, which reads directly from categories.json each time it is requested.
Because the data is stored locally and the category resource is file-based, the project stays simple, portable, and easy to modify.
Tech Stack
Language: Python 3.11+
Runtime / Framework: FastMCP
Database: SQLite
Core library:
fastmcp
Project Structure
main.py MCP server entry point and expense tools
categories.json Category and subcategory taxonomy
expenses.db Local SQLite database file
pyproject.toml Project metadata and dependency definitionInstallation
Make sure you have Python 3.11 or later installed.
Clone the repository and install dependencies:
pip install fastmcpIf you are using a virtual environment, activate it first.
Running the server
Start the MCP server with:
python main.pyThis will launch the FastMCP server and initialize the local database if it does not already exist.
Available MCP Tools
add_expense(date, amount, category, subcategory="", note="")
Adds a new expense record to the database.
Example:
{
"date": "2026-07-14",
"amount": 24.5,
"category": "food",
"subcategory": "dining_out",
"note": "Lunch"
}list_expenses(start_date, end_date)
Returns all expense entries within the inclusive date range, ordered by record ID.
Example:
{
"start_date": "2026-07-01",
"end_date": "2026-07-31"
}summarize(start_date, end_date, category=None)
Returns total spending grouped by category for the given date range. If category is provided, the summary is filtered to that category.
Example:
{
"start_date": "2026-07-01",
"end_date": "2026-07-31",
"category": "food"
}Available Resource
expense://categories
Returns the category taxonomy defined in categories.json as JSON.
This file includes high-level categories such as:
food
transport
housing
utilities
health
education
family_kids
entertainment
shopping
subscriptions
personal_care
gifts_donations
finance_fees
business
travel
home
pet
taxes
investments
misc
Each category includes a set of subcategories for more specific expense classification.
Category File
You can customize the available categories by editing categories.json.
Because the resource reads the file fresh every time it is accessed, you do not need to restart the server after changing categories.
Example Usage
A typical flow looks like this:
Start the MCP server
Add expense entries with
add_expenseQuery records with
list_expensesGenerate spending insights with
summarizeUse
expense://categoriesto drive category selection in a client
Notes
Expenses are stored in a local SQLite database file named
expenses.dbDates are expected to be passed in a consistent text format, such as
YYYY-MM-DDThe project is intentionally minimal and may be extended with validation, editing, deletion, authentication, or richer reporting in the future
Getting Started
If you are building an MCP-compatible expense assistant, this server is a compact starting point that you can run locally and extend as needed.
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/Swastigit2005/Expense-tracker-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server