Skip to main content
Glama
Expense Tracker MCP Server

Expense Tracker MCP Server

by vansh216

Expense Tracker MCP Server

An MCP (Model Context Protocol) server built with FastMCP for managing and analyzing expenses through AI assistants such as Claude, ChatGPT, Gemini, Cursor, and other MCP-compatible clients.

Features

Tools

1. Add Expense

Add a new expense record.

Parameters:

  • date

  • amount

  • category

  • subcategory (optional)

  • note (optional)

2. List Expenses

Retrieve all stored expenses.

3. Get Expenses by Category

Filter expenses by category.

4. Calculate Total Expenses

Calculate the total amount spent.

5. Summarize Expenses

Generate a spending summary including:

  • Total expenses

  • Number of transactions

  • Category-wise spending

  • Highest expense

  • Lowest expense

  • Average expense

Example Response:

{
  "total_expenses": 12500,
  "transaction_count": 45,
  "average_expense": 277.78,
  "highest_expense": 1500,
  "lowest_expense": 50,
  "category_breakdown": {
    "Food": 3500,
    "Transport": 2200,
    "Shopping": 4800,
    "Bills": 2000
  }
}

Related MCP server: Expense Tracker MCP

MCP Resources

expense://categories

Returns available expense categories.

MIME Type:

application/json

Example:

{
  "categories": [
    "Food",
    "Transport",
    "Shopping",
    "Bills",
    "Healthcare",
    "Entertainment",
    "Education",
    "Other"
  ]
}

Project Structure

expense-tracker/
│
├── main.py
├── expenses.db
├── categories.json
├── pyproject.toml
├── README.md
└── .venv/

Installation

git clone <repository-url>
cd expense-tracker
uv sync

Running the MCP Server

uv run fastmcp run main.py

Development mode:

uv run fastmcp run main.py --reload

Example Expense Record

{
  "date": "2026-06-20",
  "amount": 250,
  "category": "Food",
  "subcategory": "Restaurant",
  "note": "Lunch"
}

Database

SQLite is used for storing expenses.

Fields:

  • id

  • date

  • amount

  • category

  • subcategory

  • note


Supported MCP Clients

  • Claude Desktop

  • ChatGPT MCP Clients

  • Gemini MCP Clients

  • Cursor

  • VS Code MCP Extensions

  • Any MCP-compatible MCP client


License

No license specified. All rights reserved by the project owner unless otherwise stated.

Available Tools

3 tools
add_expenseC

Add a new expense entry to the database.

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

list_expensesA

List expense entries within an inclusive date range.

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

summarizeA

Summarize expenses by category within an inclusive date range.

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: adding, listing, and summarizing expenses. There is no overlap or ambiguity.

    Naming Consistency4/5

    Two tools follow verb_noun pattern consistently, but summarizemissing a noun and pluralization differs (expense vs expenses), which is a minor deviation.

    Tool Count3/5

    Three tools is borderline low for an expense tracker; while core read and create are covered, it feels slightly under-scoped.

    Completeness2/5

    Notable missing operations: update and delete for expenses, and no category management. This creates significant gaps in typical expense tracking workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      A remote MCP server for expense tracking, providing tools to add, list, update, delete expenses, and generate summaries, budget status, and monthly trends.
      8
      -
    • 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.
      -
    • F
      license
      A
      quality
      D
      maintenance
      MCP server for managing personal expenses, enabling users to add, list, and summarize expenses by category, with data stored in a local SQLite database.
      3
      -