Skip to main content
Glama
mcp-expense-tracker

mcp-expense-tracker

by sppandita85

mcp-expense-tracker

An MCP (Model Context Protocol) server for tracking expenses. Expenses are stored in a local JSON file, and the server exposes tools for adding expenses and summarizing totals by day or month.

Two equivalent implementations are included:

  • src/ — TypeScript/Node, stdio transport. Use this with Claude Code or Claude Desktop.

  • server.py — Python (FastMCP). Use this to deploy on FastMCP Cloud so it's reachable as a remote connector from claude.ai.

Tools

  • add_expense — record an expense (amount, category, optional description, optional date defaulting to today)

  • list_expenses — list expenses, optionally filtered by start_date, end_date, category

  • delete_expense — delete an expense by id

  • summarize — get the total (and per-category breakdown) for a day, month, or all time, anchored on an optional date

Related MCP server: Expense Tracker MCP Server

Deploy on FastMCP Cloud (for claude.ai)

FastMCP Cloud deploys directly from this GitHub repo. When it asks for an entrypoint, use:

server.py

(FastMCP Cloud auto-detects the mcp object in server.py; you'd only need server.py:mcp if the variable were named something else.) It installs requirements.txt automatically. Once deployed, add the resulting https://<your-app>.fastmcp.app/mcp URL as a custom connector in claude.ai's connector settings.

Storage caveat: server.py stores expenses in a local data/expenses.json file. Confirm your FastMCP Cloud plan gives that container a persistent disk — if storage is ephemeral/rebuilt on redeploy, expenses will reset. If you hit that, swap server.py's file-backed storage for a hosted database.

Node/TypeScript setup

npm install
npm run build

Run standalone

npm start

The server communicates over stdio, so it's meant to be launched by an MCP client rather than used directly in a terminal.

Use with Claude Code

claude mcp add expense-tracker -- node /absolute/path/to/mcp-tracker/build/index.js

Use with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "expense-tracker": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-tracker/build/index.js"]
    }
  }
}

Run the Python version locally

pip install -r requirements.txt
python server.py

Data storage

Expenses are stored in data/expenses.json (created automatically). Set EXPENSE_DATA_DIR to change where data is stored. This applies to both implementations.

Available Tools

4 tools
add_expenseAdd ExpenseB

Record a new expense. Date defaults to today (YYYY-MM-DD) if not provided.

Inputs: amount (required), category (required), date, description.

delete_expenseDelete ExpenseA

Delete an expense by its id.

Inputs: id (required).

list_expensesList ExpensesA

List recorded expenses, optionally filtered by date range and/or category.

Inputs: category, end_date, start_date.

summarizeSummarize ExpensesA

Get total spending for a day, a month, or all time, broken down by category.

Inputs: period (required), date.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct operation: add, list, summarize totals, delete. There is no overlap in purpose, making it clear which tool to use.

    Naming Consistency4/5

    Three tools follow the verb_noun pattern (add_expense, list_expenses, delete_expense), but 'summarize' deviates by being a bare verb. This is a minor inconsistency.

    Tool Count5/5

    With 4 tools, the server is well-scoped for a basic expense tracker. Each tool serves a necessary role without unnecessary bloat.

    Completeness3/5

    The set covers create (add_expense), read (list_expenses, summarize), and delete (delete_expense), but lacks an update operation. Agents cannot modify existing expenses, which is a notable gap.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables users to track and manage personal expenses through natural language, including adding entries, filtering by date/category, viewing statistics, and exporting data in JSON or CSV format.
      3
      -
    • 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 tracking of personal expenses with tools to add, list, update, delete, and summarize expenses by category.
      -
    • F
      license
      A
      quality
      D
      maintenance
      Enables logging and tracking personal expenses in a local SQLite database with category/subcategory validation, offering tools to add, view, summarize, and delete expenses.
      4
      -