Expense-Tracker-MCP-Server
This server enables expense tracking and analysis via Claude through MCP tools.
Add a new expense (date, amount, category, optional note and subcategory).
List expenses within a date range (startdate, enddate).
Summarize expenses by category for a date range, optionally filtered by category.
Access available expense categories and subcategories (resource
expense:///categories).
Provides access to AccuWeather data for weather forecasts and current conditions.
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., "@Expense-Tracker-MCP-Server add an expense of $50 for lunch 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 Server
A simple Expense Tracker MCP (Model Context Protocol) server built with FastMCP and SQLite, designed to be used from Claude Desktop. Ask Claude in plain English to log, list, and summarize your expenses.
This repo is also my learning log for MCP: it documents how I built this server step by step, how I connected it to Claude Desktop, and how I tried out a few other community MCP servers (Manim, Weather).
Related MCP server: expense-mcp
✨ Features
Tools
Tool | What it does |
| Add a new expense (date, amount, category, note) |
| View expenses within a date range |
| Summarize spending by category |
Resources
Resource | What it returns |
| Available expense categories and subcategories |
Tool and resource names above follow the reference project. Adjust the table to match whatever is defined in
main.py.
Tech Stack
Python 3.12+
FastMCP (tested with 3.4.4) and MCP (tested with 1.28.1)
SQLite for storage
uv for dependency and environment management
Claude Desktop as the MCP client
MCP Inspector (by Anthropic) for testing and debugging
Project Structure
Expense-Tracker-MCP-Server/
├── main.py # FastMCP server: tools and resources
├── expenses_db # SQLite database file
├── pyproject.toml # Project metadata and dependencies (uv)
├── uv.lock # Locked dependency versions
└── README.mdGetting Started
Prerequisites
Python 3.12 or newer
VS Code (or any editor)
1. Install uv
pip install uv2. Create the project
mkdir expense-tracker-mcp-server
cd expense-tracker-mcp-server
uv init .3. Add FastMCP
uv add fastmcp4. Verify the installation
fastmcp versionSample output:
FastMCP version: 3.4.4
MCP version: 1.28.1
Python version: 3.12.6
Platform: Windows-115. Write the server
Create main.py with your FastMCP tools and resources for a clean async SQLite example using aiosqlite).
Run and Debug
Test with MCP Inspector (the quickest way to check that tools work before touching Claude):
uv run fastmcp dev main.pyRun the server directly:
uv run fastmcp run main.pyConnect to Claude Desktop
Option A: One-line install (recommended)
uv run fastmcp install claude-desktop main.pyOption B: Edit the config manually
Open Claude Desktop → Settings → Developer → Edit Config
This opens
claude_desktop_config.json. Add your server undermcpServers:
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"fastmcp",
"run",
"/absolute/path/to/main.py"
]
}
}
}Fully quit and restart Claude Desktop. Do this after every config change or newly added MCP server.
Screenshots
![]()
Example Prompts
Once connected, try these in Claude Desktop:
Add an expense
Add an expense for a cab ride to Delhi last Sunday. The fare was ₹600.List expenses
Show all expenses between 2026-06-01 and 2026-06-30.Summarize
Summarize my expenses for June 2026 by category.Expense Categories
The server supports categories such as:
Food · Transport · Housing · Utilities · Health · Education · Entertainment · Shopping · Travel · Business · Investments · Personal Care · Taxes · Miscellaneous
☁️ Deploying to FastMCP Cloud (Optional)
The local setup above only works on your machine. To make the server available remotely, you can deploy it to FastMCP Cloud, as done in expense-tracker-mcp-cloud.
Once deployed you get a remote endpoint like:
https://<your-project-name>.fastmcp.app/mcpTo use it from Claude Desktop, create a small local proxy (proxy.py):
from fastmcp import FastMCP
mcp = FastMCP.as_proxy(
"https://<your-project-name>.fastmcp.app/mcp", # get your URL from FastMCP Cloud
name="Expense Tracker Proxy"
)
if __name__ == "__main__":
mcp.run()Then install it into Claude Desktop and restart:
uv run fastmcp install claude-desktop proxy.pyOther MCP Servers I Tried
While learning MCP I also set up a few community servers. Notes below for future me (and anyone else).
After adding any server, restart Claude Desktop.
Manim MCP Server (math animations)
Repo: abhiemj/manim-mcp-server
Setup
pip install manim
pip install mcp
cd ~/Desktop
git clone https://github.com/abhiemj/manim-mcp-server.git
cd manim-mcp-serverFind the paths you need
which python3 # path to your Python executable -> "command"
which manim # path to the manim executable -> MANIM_EXECUTABLE
cd src && pwd # folder containing manim_server.pyOn Windows use
where pythonandwhere maniminstead ofwhich.
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"manim-server": {
"command": "/absolute/path/to/python",
"args": [
"/absolute/path/to/manim-mcp-server/src/manim_server.py"
],
"env": {
"MANIM_EXECUTABLE": "/absolute/path/to/manim"
}
}
}
}Test prompt
Use the manim-server to create an animation showing the concept of vector
transformation in linear algebra.
- Start with a 2D coordinate grid.
- Show two basis vectors: i = (1,0) in red and j = (0,1) in blue.
- Animate a transformation by applying a matrix A = [[2,1],[1,1]] to the
grid and the vectors.
- Show the grid warping and the basis vectors moving to their new
transformed positions.
- Add a title above: 'Linear Algebra: Matrix Transformation Demo'.Twitter / X MCP Server (local)
Repo: EnesCinr/twitter-mcp
Add this inside the mcpServers object of your Claude config:
{
"mcpServers": {
"twitter-mcp": {
"command": "npx",
"args": ["-y", "@enescinar/twitter-mcp"],
"env": {
"API_KEY": "your_api_key_here",
"API_SECRET_KEY": "your_api_secret_key_here",
"ACCESS_TOKEN": "your_access_token_here",
"ACCESS_TOKEN_SECRET": "your_access_token_secret_here"
}
}
}
}You get the keys from the Twitter/X developer console.
Weather MCP Server (remote via uvx)
Repo: adhikasp/mcp-weather
Get a free API key from AccuWeather Developer, then add:
{
"mcpServers": {
"weather": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-weather.git",
"mcp-weather"
],
"env": {
"ACCUWEATHER_API_KEY": "your_api_key_here"
}
}
}
}Finding more MCP servers
Browse the curated list: awesome-mcp-servers
Never commit real API keys. Keep them in your local config file only.
Troubleshooting
Problem | Fix |
Server doesn't show up in Claude | Fully quit Claude Desktop (check the system tray) and reopen it |
| Close and reopen VS Code / your terminal after installing |
Config changes have no effect | Check the JSON is valid and paths are absolute |
Not sure if the server works | Run |
Wrong Python or manim path | Re-run |
What I Learned
FastMCP fundamentals: tools and resources
Building and debugging an MCP server with MCP Inspector
SQLite integration for persistent storage
Connecting MCP servers to Claude Desktop (via
fastmcp installand manual config)Setting up third-party MCP servers (Manim, Twitter/X, Weather)
Remote deployment and proxying with FastMCP Cloud
Credits
Available Tools
3 toolsadd_expenseC
Add a new expense to DB
Inputs: date (required), amount (required), category (required), note, +1 more.
list_expensesA
Listing all expense entries between startdate to enddate
Inputs: enddate (required), startdate (required).
summarizeC
Summarize expenses by category for that date range.
Inputs: enddate (required), startdate (required), category.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: adding an expense, listing expenses in a date range, and summarizing expenses by category. There is no meaningful overlap or confusion between them.
add_expense and list_expenses follow a clear verb_noun pattern, though one uses singular and the other plural. summarize is readable but omits a noun object, creating a minor inconsistency.
Three tools is a well-scoped set for a focused expense tracker. Each tool serves a distinct and necessary part of the basic workflow: recording, viewing, and summarizing expenses.
The core add/list/summarize workflow is covered, but there are no update or delete expense operations. This is a notable gap because users cannot correct or remove mistaken entries without direct database access.
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.
Corporate travel booking and expense management for TripGain, exposed as an MCP server.
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.1029 PyPI1MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for tracking expenses with local SQLite storage. Provides tools to add, list, and summarize expenses by category.-
- 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