Skip to main content
Glama
ExpenseTracker MCP Server

ExpenseTracker MCP Server

by tanishra

ExpenseTracker MCP Server

A production-ready Model Context Protocol (MCP) server that turns your AI assistant into a persistent personal finance manager using PostgreSQL.

This project allows Claude Desktop or any MCP-enabled agent to securely store, analyze, and export expense data using real database transactions instead of chat memory.


Related MCP server: Expense Tracker MCP Server

What Is It?

ExpenseTracker MCP is a local backend service exposing structured financial tools to AI agents.

It enables your assistant to:

  • Store expenses permanently

  • Edit and delete past records

  • Summarize spending patterns

  • Detect top spending categories

  • Generate monthly reports

  • Export data for accounting or tax use


How It Works

  1. Claude Desktop sends a tool request using MCP.

  2. ExpenseTracker MCP receives the request.

  3. The server executes the database operation in PostgreSQL.

  4. Results are returned to Claude as structured JSON.

  5. Logs are written to expense_tracker.log.

The AI never invents data — it only queries your real database.


How To Run Using uv

Install dependencies

uv add fastmcp psycopg2-binary python-dotenv

Create .env file

DB_HOST=localhost
DB_PORT=5432
DB_NAME=expense_tracker
DB_USER=expense_user
DB_PASSWORD=your_password

Start MCP server

For Testing

uv run fastmcp dev main.py

For Run

uv run fastmcp run main.py

How to connect to Claude Desktop

uv run fastmcp install claude-desktop main.py

Restart Claude Desktop


Contribution

Contributions are welcome.

  • Fork the repository

  • Create a feature branch

  • Add or improve MCP tools or documentation

  • Submit a pull request with a clear description of your changes

Available Tools

12 tools
add_expenseD

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

budget_alertD

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

daily_averageD

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

delete_expenseD

Inputs: expense_id (required).

export_csvD

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

health_checkD

Inputs: no named parameters.

list_expensesD

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

monthly_reportD

Inputs: year (required), month (required).

read_expenseD

Inputs: expense_id (required).

summarizeD

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

top_spending_categoriesD

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

update_expenseD

Inputs: expense_id (required), date, amount, category, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.1/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific expense tracking operations like adding, listing, deleting, updating, and reporting. However, 'summarize' and 'monthly_report' could potentially overlap in function if not clearly differentiated by their descriptions, creating minor ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with clear verb_noun structures (e.g., add_expense, list_expenses, monthly_report). There are no deviations in naming conventions, making the set predictable and easy to parse.

    Tool Count5/5

    With 12 tools, this server is well-scoped for an expense tracking domain. The count is appropriate, covering core operations without being excessive, and each tool appears to serve a specific, justified role in the workflow.

    Completeness4/5

    The tool set provides good coverage for expense management, including CRUD operations (add, read, update, delete), reporting (monthly_report, daily_average), and utilities (export_csv, health_check). A minor gap might be the absence of a tool for setting or managing budgets, which could limit full lifecycle coverage.

    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
      -
    • 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
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables users to record and retrieve expenses through natural language, with support for categories, dates, and descriptions, backed by a Postgres database.
      MIT