Expense Tracker Remote 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 Remote MCP ServerSummarize my expenses from last month by category"
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 Remote MCP Server
A simple Model Context Protocol (MCP) server built with Python and FastMCP that provides tools for managing and analyzing personal expenses through an SQLite database.
The server supports adding expenses, retrieving expenses within a date range, summarizing expenses by category, and accessing available expense categories as an MCP resource.
๐ Features
โ Add new expense records
๐ List expenses within a specific date range
๐ Summarize expenses by category
๐๏ธ Expose expense categories through an MCP resource
๐พ Persistent storage using SQLite
๐ Runs as a remote/HTTP MCP server
๐ Compatible with MCP clients and MCP Inspector
โก Built with FastMCP
Related MCP server: expense-mcp
๐ ๏ธ Tech Stack
Python
FastMCP
Model Context Protocol (MCP)
SQLite
uv โ Python package/project manager
JSON
๐ Project Structure
Expense_Tracker_Remote_MCP_Server/
โ
โโโ src/
โ โโโ test_remote_mcp_server/
โ โโโ __init__.py
โ
โโโ categories.json
โโโ expenses.db
โโโ main.py
โโโ pyproject.toml
โโโ uv.lock
โโโ .gitignore
โโโ README.mdImportant Files
File | Purpose |
| Main MCP server implementation |
| SQLite database containing expense records |
| Expense category data |
| Project dependencies and configuration |
| Locked dependency versions |
| Files excluded from Git |
| Project documentation |
โ๏ธ How It Works
The MCP server uses FastMCP to expose expense-management functionality as MCP tools.
MCP Client
โ
โผ
FastMCP MCP Server
โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ
โผ โผ โผ
add_expense list_expenses summarize
โ โ โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ
โผ
SQLite DB
expenses.dbThe server also exposes:
expense://categoriesas an MCP resource for retrieving available expense categories.
๐ง MCP Tools
1. add_expense
Adds a new expense to the SQLite database.
Parameters
Parameter | Type | Required | Description |
| string | Yes | Date of the expense |
| number | Yes | Expense amount |
| string | Yes | Expense category |
| string | No | Expense subcategory |
| string | No | Additional note |
Example
add_expense(
date="2026-08-29",
amount=250,
category="Food",
subcategory="Lunch",
note="Lunch at college"
)Example response:
{
"status": "ok",
"id": 1
}๐ 2. list_expenses
Returns expense records within an inclusive date range.
Parameters
Parameter | Type | Required | Description |
| string | Yes | Starting date |
| string | Yes | Ending date |
Example
list_expenses(
start_date="2026-08-01",
end_date="2026-08-29"
)Example response:
[
{
"id": 1,
"date": "2026-08-29",
"amount": 250,
"category": "Food",
"subcategory": "Lunch",
"note": "Lunch at college"
}
]๐ 3. summarize
Summarizes expenses by category within an inclusive date range.
An optional category can be provided to filter the results.
Parameters
Parameter | Type | Required | Description |
| string | Yes | Starting date |
| string | Yes | Ending date |
| string | No | Optional category filter |
Example
summarize(
start_date="2026-08-01",
end_date="2026-08-29"
)Example response:
[
{
"category": "Food",
"total_amount": 2500
},
{
"category": "Transport",
"total_amount": 1200
}
]You can also filter by category:
summarize(
start_date="2026-08-01",
end_date="2026-08-29",
category="Food"
)๐๏ธ MCP Resource
The server exposes the following resource:
expense://categoriesThis resource reads the contents of:
categories.jsonThe file is read each time the resource is requested, meaning category changes can be reflected without restarting the server.
๐พ Database
The server uses SQLite for persistent expense storage.
The database contains the following table:
expenses
with the following columns:
Column | Type | Description |
| INTEGER | Primary key |
| TEXT | Expense date |
| REAL | Expense amount |
| TEXT | Expense category |
| TEXT | Expense subcategory |
| TEXT | Additional information |
The database table is automatically created when the server starts if it does not already exist.
๐งฐ Installation
Prerequisites
Make sure you have:
Python 3.10+
uv
Git
1. Clone the repository
git clone https://github.com/abhisek0407/Expense_Tracker_Remote_MCP_Server.git
cd Expense_Tracker_Remote_MCP_Server2. Install dependencies
If the project already contains pyproject.toml and uv.lock:
uv syncโถ๏ธ Run the MCP Server
The server is configured to run using Streamable HTTP on port 8000.
Start the server with:
uv run python main.pyThe server will listen on:
http://localhost:8000The MCP endpoint is:
http://localhost:8000/mcp๐ Test With MCP Inspector
You can test the server locally using MCP Inspector.
In another terminal:
uv run fastmcp dev inspector main.pyThen configure the Inspector with:
Transport Type: Streamable HTTP
URL:
http://localhost:8000/mcpConnection Type: Via Proxy Click Connect.
Once connected, the Inspector should expose:
Tools
add_expenselist_expensessummarizeResourceexpense://categories
๐ Remote Deployment
This project can be deployed as a remote MCP server using a platform such as FastMCP Cloud.
The server uses:
mcp.run(
transport="http",
host="0.0.0.0",
port=8000
)This allows the MCP server to accept HTTP connections instead of only operating through STDIO.
After deployment, the MCP server can be accessed through the remote endpoint provided by the hosting platform.
For example:
https://your-server.fastmcp.app/mcpThe actual URL depends on the server name and deployment configuration.
๐ Environment Variables
Currently, the server does not require any external API keys or authentication credentials.
If authentication or external services are added in the future, environment variables can be configured through the deployment platform.
๐งช Example Workflow
A typical interaction with the MCP server can look like:
User
โ
โ "Add โน500 spent on food today"
โผ
MCP Client
โ
โ add_expense()
โผ
Expense Tracker MCP Server
โ
โผ
SQLite Database
โ
โ Expense stored
โผ
MCP Response
โ
โผ
MCP ClientFor analysis:
User
โ
โ "How much did I spend by category this month?"
โผ
MCP Client
โ
โ summarize()
โผ
Expense Tracker MCP Server
โ
โผ
SQLite
โ
โ GROUP BY category
โผ
Category-wise totals๐ Current Limitations
No authentication mechanism is currently implemented.
The server currently uses a local SQLite database.
No user/account separation is implemented.
Date values are stored as text and should follow a consistent date format such as
YYYY-MM-DD.Categories are loaded from a local
categories.jsonfile.
๐ง Future Improvements
Possible improvements include:
๐ Authentication and authorization
๐ค Multiple user support
โ๏ธ Cloud database integration
๐ Advanced expense analytics
๐ฐ Budget tracking
๐ Budget alerts
๐ Monthly and yearly reports
๐ Spending visualization
๐ท๏ธ Custom categories
๐ค AI-powered spending insights
๐งพ Receipt processing
๐ฑ Multi-currency support
๐ฏ Purpose of the Project
This project was created to learn and demonstrate the implementation of an MCP server using FastMCP, including:
MCP tools
MCP resources
SQLite integration
HTTP/Streamable HTTP transport
Local MCP server testing
MCP Inspector
Remote MCP server deployment It serves as a practical example of connecting an AI/MCP client with a persistent backend application.
๐ License
This project is available for educational and personal use.
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.
Related MCP Connectors
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 Manilo 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.
- AlicenseAqualityDmaintenancePersonal expense tracker MCP server that enables tracking expenses, income, budgets, and savings goals through natural language.10MIT
- FlicenseBqualityDmaintenanceEnables users to add, list, and summarize expenses, and exposes expense categories as a resource.3
- FlicenseAqualityCmaintenanceMCP server for managing personal expenses, enabling users to add, list, and summarize expenses by category, with data stored in a local SQLite database.3
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/abhisek0407/Expense_Tracker_Remote_MCP_Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server