Skip to main content
Glama
Expense Tracker MCP Server

Expense Tracker MCP Server

by Python-Blade

Expense Tracker MCP Server

A powerful SQLite-backed expense tracking server built with the Model Context Protocol (MCP). This server allows AI agents (like Claude) to manage your personal finances by adding, deleting, and listing expenses directly from your chat interface.

Features

  • Add Expenses: Record new expenses with details like amount, category, description, and date.

  • Track History: Maintain a persistent history of all transactions in a local SQLite database.

  • Reporting: Generate summaries and list all expenses.

  • Management: Delete incorrect entries by ID.

Related MCP server: Expense Tracker MCP Server

Prerequisites

  • Python 3.12 or higher

  • uv (recommended) or pip

Installation

  1. Clone or download this repository.

  2. Install dependencies:

uv sync
# OR
pip install -r requirements.txt

Configuration for Claude Desktop

To use this with Claude Desktop, add the following to your config file (%APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "expense-tracker": {
      "command": "path/to/your/python.exe",
      "args": [
        "path/to/finance.py"
      ]
    }
  }
}

Note: It is highly recommended to use absolute paths for both the python executable and the script file to avoid issues.

Usage

Once connected to Claude, you can use natural language to manage your expenses:

  • "I spent $50 on groceries at Walmart today."

  • "Add a transportation expense of $15 for a taxi ride."

  • "Show me my expense report."

  • "Delete expense ID 4."

Architecture

  • Database: Uses sqlite3 for a lightweight, file-based database (expenses.db) that lives in the same directory as the script.

  • MCP Framework: Built using FastMCP for a simple and efficient server implementation.

Available Tools

3 tools
add_expenseB
Add a new expense to the tracker.

Args:
    amount: The cost of the expense.
    category: The category of the expense (e.g., Food, Transport, Rent).
    description: A brief description of what was purchased.
    time: The time when the expense occured down to the day(default is current time).

Inputs: amount (required), category (required), time, description. Returns: result

delete_expenseC
Delete an expense by its ID.

Args:
    expense_id: The ID of the expense to delete.

Inputs: expense_id (required). Returns: result

list_expensesB

List all expenses recorded in the database. Returns a formatted string of expenses.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 3 tools

    Disambiguation5/5

    add_expense, delete_expense, and list_expenses target clearly distinct operations on the same resource. There is no meaningful overlap or ambiguity between them.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern: add_expense, delete_expense, list_expenses. The plural in list_expenses is natural for a list operation.

    Tool Count4/5

    Three tools is reasonable for a minimal expense tracker, and each tool has a clear purpose. However, the surface is on the thin side for typical expense-tracking workflows.

    Completeness3/5

    The set covers add, delete, and list, but lacks update_expense and get_expense, which are notable gaps for correcting or inspecting individual records. Reporting operations like totals or filtering by category/date are also absent.

    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
      A lightweight MCP server that lets LLM clients track, query, and summarize personal expenses using a local SQLite database.
      -