Skip to main content
Glama
python-backendd

Expense Tracker MCP Server

Expense Tracker MCP Server

A minimal expense tracking server built with FastMCP and SQLite.

Setup

# Install dependencies (from the mcp_demo root)
pip install fastmcp

Related MCP server: Expense Tracker MCP Server

Running the Server

# From the mcp_demo root
python -m expense_tracker.server

Or run directly:

cd expense_tracker
python server.py

MCP Inspector (Development)

Use the FastMCP Inspector to interactively test and debug tools in the browser:

cd expense_tracker
fastmcp dev inspector server.py

Tools

add_expense

Record a new expense.

Parameter

Type

Required

Description

amount

float

Amount in INR (must be > 0)

description

string

What the expense was for

category

string

Category (e.g. "food", "groceries"). Defaults to "uncategorized"

date

string

Date in YYYY-MM-DD format. Defaults to today

list_expenses

List recent expenses with pagination.

Parameter

Type

Required

Description

limit

int

Max results (default 20, max 100)

offset

int

Skip N results for pagination

search_expenses

Search by keyword and/or category. At least one must be provided.

Parameter

Type

Required

Description

keyword

string

Search in descriptions (case-insensitive)

category

string

Filter by category

get_expense_summary_month

Get monthly spending summary with category breakdown.

Parameter

Type

Required

Description

month

int

Month (1-12). Defaults to current month

year

int

Year. Defaults to current year

get_budget_status_of_category

Get total spending for a specific category.

Parameter

Type

Required

Description

category

string

Category to check (e.g. "food")

month

int

Month (1-12). Defaults to current month

year

int

Year. Defaults to current year

Database

The SQLite database (expenses.db) is created automatically in the expense_tracker/ directory on first run.

Schema

CREATE TABLE expenses (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    amount REAL NOT NULL,
    description TEXT NOT NULL,
    category TEXT NOT NULL DEFAULT 'uncategorized',
    date DATE NOT NULL,
    created_at DATE NOT NULL DEFAULT (date('now'))
);

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "expense-tracker": {
      "command": "/Users/krishnasinghal/Projects/mcp_demo/.venv/bin/fastmcp",
      "args": ["run", "/Users/krishnasinghal/Projects/mcp_demo/expense_tracker/server.py:mcp"],
    }
  }
}

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to track and manage daily expenses through SQLite storage, supporting operations like adding, updating, deleting expenses, calculating totals by category, and filtering expenses by date range or category.
    -
  • F
    license
    C
    quality
    D
    maintenance
    Enables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.
    5
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables tracking and managing personal expenses through a local SQLite database. Supports adding, editing, deleting, listing, and summarizing expenses by category, as well as managing credit accounts.
    6
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to manage expenses with category support, including adding expenses with date, amount, category, and notes, using SQLite for persistence.
    -