Skip to main content
Glama
Expense Tracker MCP Server

Expense Tracker MCP Server

Expense Tracker MCP Server

This project is a Model Context Protocol (MCP) server for managing personal expenses. It exposes tools and a resource that can be used by MCP-compatible clients such as Claude Desktop or the FastMCP inspector.

What it does

The server provides:

  • add_expense(date, amount, category, subcategory="", note="") to store a new expense

  • list_expenses(start_date, end_date) to retrieve expenses in a date range

  • summarize(start_date, end_date, category=None) to group totals by category

  • expense://categories as a JSON resource for category definitions

Expenses are stored in a local SQLite database created automatically when the server starts.

Related MCP server: Expense Tracker MCP Server

Requirements

  • Python 3.13 or newer

  • uv for dependency and script management

Installation

From the project root:

uv sync

This installs the project and its dependencies from the pyproject.toml file.

Run locally with the MCP inspector

Start the server and inspect it in the FastMCP inspector:

uv run fastmcp dev inspector src/expense_tracker_mcp_server/main.py

This opens the inspector UI and lets you test the tools and resources.

Connect to Claude Desktop

To install the server into Claude Desktop, run:

uv run fastmcp install claude-desktop src/expense_tracker_mcp_server/main.py

On Windows, Claude Desktop may store its config under a packaged-app path. If the default location is not detected, provide it explicitly:

uv run fastmcp install claude-desktop --config-path "C:\Users\<your-user>\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude" src/expense_tracker_mcp_server/main.py

Replace <your-user> with your Windows username.

Project structure

src/
  expense_tracker_mcp_server/
    __init__.py
    main.py
  • main.py contains the MCP server implementation and tool definitions.

  • expenses.db is created automatically at runtime in the package directory.

  • categories.json is loaded as the expense://categories resource.

Example usage

Once the server is running, you can call the tools with payloads such as:

{
  "date": "2026-07-31",
  "amount": 42.5,
  "category": "Food",
  "subcategory": "Lunch",
  "note": "Team lunch"
}

Notes

  • The SQLite database is local to the project and will be created on first run.

  • The categories resource is read from the JSON file each time it is requested, so edits are picked up without restarting the server.

Available Tools

3 tools
add_expenseC

Add a new expense entry to the database.

Inputs: date (required), amount (required), category (required), note, +1 more.

list_expensesA

List expense entries within an inclusive date range.

Inputs: end_date (required), start_date (required).

summarizeA

Summarize expenses by category within an inclusive date range.

Inputs: end_date (required), start_date (required), category.

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 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: adding an expense, listing expenses, and summarizing expenses by category. There is no overlap or ambiguity between them.

    Naming Consistency4/5

    Tools follow a mostly verb_noun pattern (add_expense, list_expenses), but 'summarize' lacks a noun object, which is a minor deviation. Overall the pattern is still clear and predictable.

    Tool Count5/5

    Three tools is an appropriate, well-scoped count for a focused expense tracker server. Each tool serves a necessary function without redundancy.

    Completeness4/5

    The domain of expense tracking is covered with basic create (add_expense), read (list_expenses), and aggregate (summarize) operations. Missing update and delete capabilities are minor gaps that can be worked around.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      MCP server for tracking personal expenses using FastMCP and SQLite, enabling adding, listing, updating, deleting expenses and summarizing by category via natural language tools.
      5
      1
      -
    • F
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server for tracking personal expenses. This server provides tools to add, list, and summarize expenses, utilizing a local SQLite database for storage.
      3
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for tracking expenses with local SQLite storage. Provides tools to add, list, and summarize expenses by category.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      A simple MCP server for tracking expenses in a local SQLite database, enabling add, read, update, delete, and summarization of expenses with predefined categories.
      -