expense-tracker
Provides a backend database via Supabase for storing and querying expenses, including tables, indexes, and automatic timestamp updates.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π° Expense Tracker MCP Server
A production-ready Model Context Protocol (MCP) server for your personal expense tracker, built with FastMCP 3.x and backed by Supabase (PostgreSQL).
Connect it to Claude Desktop, Cursor, or any MCP-compatible client and manage your finances with natural language.
β¨ Features
Tool | What it does |
| Record a new expense |
| Modify any field of an existing expense |
| Permanently remove an expense |
| Fetch a single expense by UUID |
| Filter expenses by date, category, shop, amount, payment method |
| Full-text search across title, shop, notes, category |
| Totals & % breakdown by category / month / shop |
| Full month report with per-category breakdown |
| Compare spending vs a budget limit |
| All shops you've visited + visit counts + total spent |
| All unique categories in your data |
| Export to CSV |
Resources (live data snapshots):
expense://todayβ Today's spendingexpense://recent/{n}β Last N expensesexpense://categoriesβ All categories in use
Related MCP server: expense-tracker-postgres-mcp
π Quick Setup
1. Create the Supabase Table
Go to supabase.com β your project β SQL Editor and run:
CREATE TABLE expenses (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
title TEXT NOT NULL,
amount NUMERIC(12, 2) NOT NULL CHECK (amount > 0),
category TEXT NOT NULL,
shop TEXT,
date DATE NOT NULL,
payment_method TEXT,
notes TEXT,
created_at TIMESTAMPTZ DEFAULT now(),
updated_at TIMESTAMPTZ DEFAULT now()
);
-- Auto-update updated_at on every row change
CREATE OR REPLACE FUNCTION update_updated_at()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = now();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER set_updated_at
BEFORE UPDATE ON expenses
FOR EACH ROW EXECUTE FUNCTION update_updated_at();
-- Indexes for fast filtering
CREATE INDEX idx_expenses_date ON expenses(date);
CREATE INDEX idx_expenses_category ON expenses(category);
CREATE INDEX idx_expenses_shop ON expenses(shop);2. Get Your API Keys
In Supabase β Project Settings β API:
Copy your Project URL
Copy your anon / public key (or service role key for private use)
3. Create Your .env File
copy .env.example .envEdit .env:
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_KEY=your-anon-key-here4. Install Dependencies
uv sync5. Test the Server
# Start the MCP inspector (browser UI to test all tools)
uv run fastmcp dev main.pyπ Claude Desktop Integration
Add this to your claude_desktop_config.json
(usually at %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "C:\\Users\\saina\\OneDrive\\Desktop\\expense-tracker-mcp-server"
}
}
}Restart Claude Desktop. You'll see a π icon with expense-tracker tools available.
π¬ Example Prompts
Once connected to Claude Desktop, try:
"Add an expense: βΉ450 for lunch at Dominos today, paid by UPI"
"Show me all my Food expenses this month"
"How much did I spend in June 2026?"
"Am I over my βΉ5000 Food budget this month?"
"Where do I spend money most often?"
"Search for all Zomato expenses"
"Give me a monthly report for June 2026"
"Export all expenses from this month as CSV"
"What's my total spending this week by category?"ποΈ Project Structure
expense-tracker-mcp-server/
βββ main.py # FastMCP server β all 12 tools + 3 resources
βββ db.py # Supabase data access layer
βββ models.py # Pydantic validation models
βββ .env # Your secrets (never commit this!)
βββ .env.example # Template for .env
βββ pyproject.toml # Dependenciesπ‘οΈ Security Notes
Never commit your
.envfile (it's in.gitignore)Use the anon key for personal use β it's safe for client-side access
Use Row Level Security (RLS) in Supabase if you ever share the project
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Track expenses from receipt photos, then search, summarize and update them from your AI assistant.
Your Supabase account in natural language: run SQL, apply migrations, manage tables, storage, edge f
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
Expense ledger for AI assistants: record receipts line by line, ask what you spent, export anytime.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables management of expenses via SQLite database, including adding, listing, updating, deleting, filtering, and summing expenses through natural language.-
- FlicenseNot gradedqualityDmaintenancePersistent expense tracker backed by Neon Postgres with SQL tools for adding, editing, deleting, and analyzing expenses via natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables managing personal expenses, budgets, and financial summaries through natural language, with tools for adding, listing, updating, deleting expenses, setting budgets and credits, and generating dashboards.-
- FlicenseCqualityDmaintenanceEnables logging, querying, and summarizing personal expenses via natural language, with tools for adding, listing, and aggregating spending by category.3-