Skip to main content
Glama
Expense Tracker MCP Server

Expense Tracker MCP Server

by simran-mehta

Expense Tracker MCP Server

An MCP (Model Context Protocol) server that lets AI assistants like Claude manage personal expenses — add, categorize, summarize, and budget — using a local SQLite database.


Overview

This server exposes a set of MCP tools that Claude (or any MCP-compatible client) can call to track your spending. All data is stored locally in a SQLite file — no cloud, no account required.


Related MCP server: Expense Tracker MCP Server

Features

  • Add and manage expenses with categories, amounts, dates, and descriptions

  • Filter and list expenses by date range or category

  • Summarize spending by category or month

  • Set per-category budgets and check remaining balances

  • Export expenses to CSV

  • Fully local — data stays on your machine


MCP Tools

Tool

Description

Key Parameters

add_expense

Record a new expense

amount, category, description, date, currency

list_expenses

List expenses with optional filters

category?, start_date?, end_date?, limit?

get_expense_summary

Aggregated totals grouped by category or month

group_by (category or month), start_date?, end_date?

update_expense

Edit an existing expense by ID

id, amount?, category?, description?, date?

delete_expense

Remove an expense by ID

id

set_budget

Set a monthly budget limit for a category

category, monthly_limit, currency?

get_budget_status

Compare budget limits vs actual spend

month? (defaults to current month)

export_expenses

Export expenses as a CSV string

start_date?, end_date?, category?


Project Structure

expense-tracker-mcp-server/
├── main.py             # MCP server entry point (all tools)
├── expenses.db         # SQLite database (auto-created on first run)
├── pyproject.toml      # Project metadata and dependencies
├── .venv/              # Virtual environment (created by uv)
└── readme.md

Prerequisites

  • Python 3.11+

  • uv (recommended) or pip

  • Claude Desktop (to connect the MCP server)


Installation

# Clone the repo
git clone https://github.com/your-username/expense-tracker-mcp-server.git
cd expense-tracker-mcp-server

# Initialize the project and install dependencies
uv init
uv add fastmcp

This creates a .venv folder automatically inside the project directory.


Running the Server

fastmcp run main.py

The server starts and listens for MCP connections via stdio. The SQLite database (expenses.db) is created automatically on first run.


Connecting to Claude Desktop

Add the following to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "expense-tracker": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\Learning\\Expense-Tracker-MCP-Server",
        "run",
        "fastmcp",
        "run",
        "main.py"
      ]
    }
  }
}

Fully quit Claude Desktop (system tray → Quit) and reopen it. You should see the expense tracker tools available in the tools panel.


Example Prompts

Once connected to Claude, you can say:

  • "Add a $45 expense for groceries at Whole Foods today"

  • "Show me all food expenses from this month"

  • "What did I spend the most on last month?"

  • "Set a $300 monthly budget for dining out"

  • "How much of my entertainment budget is left?"

  • "Export all my expenses from March as CSV"


Development

# Run with MCP inspector for debugging
fastmcp dev inspector main.py

License

MIT

Available Tools

8 tools
add_expenseB

Add a new expense. Date format: YYYY-MM-DD (defaults to today).

Inputs: amount (required), category (required), description, date, +1 more. Returns: object

delete_expenseB

Delete an expense by ID.

Inputs: id (required). Returns: object

export_expensesC

Export expenses as a CSV string.

Inputs: start_date, end_date, category. Returns: result

get_budget_statusB

Compare budget limits vs actual spend. Month format: YYYY-MM (defaults to current month).

Inputs: month. Returns: result

get_expense_summaryB

Summarize total spending grouped by 'category' or 'month'.

Inputs: group_by, start_date, end_date. Returns: result

list_expensesB

List expenses with optional filters. Date format: YYYY-MM-DD.

Inputs: category, start_date, end_date, limit. Returns: result

set_budgetC

Set or update the monthly budget limit for a category.

Inputs: category (required), monthly_limit (required), currency. Returns: object

update_expenseC

Update fields of an existing expense by ID.

Inputs: id (required), amount, category, description, +1 more. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: adding, deleting, updating, listing, summarizing, exporting expenses, and managing budgets. The descriptions specify unique actions (e.g., add vs. update) and resources (expenses vs. budget), eliminating ambiguity.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern (e.g., add_expense, delete_expense, get_budget_status). The naming is uniform across all eight tools, using snake_case and clear action verbs aligned with their functions.

    Tool Count5/5

    With 8 tools, the server is well-scoped for an expense tracker, covering core operations like CRUD for expenses, budget management, summarization, and export. Each tool earns its place without being excessive or sparse.

    Completeness5/5

    The tool set provides complete coverage for the expense tracking domain: full CRUD for expenses (add, delete, update, list), budget management (set and status), summarization, and export. There are no obvious gaps, enabling agents to handle typical workflows end-to-end.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage personal expenses through natural conversation, supporting expense tracking, categorization, filtering, and financial summaries. Uses SQLite database to store expense records with full CRUD operations for comprehensive personal finance management.
      2
      -
    • 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
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage personal expenses by adding, querying, and summarizing expense data through a SQLite database and configurable categories.
      1
      GPL 3.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.
      -