Skip to main content
Glama
thearyangupta

expense-tracker-mcp

Expense Tracker MCP Server

A local MCP (Model Context Protocol) server built with FastMCP and PostgreSQL.

This project exposes expense management tools that can be used by MCP clients such as Claude Desktop.

Features

  • āž• Add Expense

  • šŸ“‹ List Expenses

  • šŸ“Š Summarize Expenses

  • āœļø Edit Expense

  • šŸ—‘ļø Delete Expense

  • šŸ’° Add Credit

  • šŸ“‚ Expense Categories Resource

Related MCP server: Expense Tracker MCP

Tech Stack

  • Python

  • FastMCP

  • PostgreSQL

  • SQLAlchemy

  • Psycopg 3

  • Pydantic Settings

  • UV

Project Structure

expense-tracker-mcp/
│
ā”œā”€ā”€ app/
│   ā”œā”€ā”€ tools/
│   │   ā”œā”€ā”€ expense_tools.py
│   │   └── credit_tools.py
│   ā”œā”€ā”€ config.py
│   ā”œā”€ā”€ database.py
│   ā”œā”€ā”€ models.py
│   └── resources.py
│
ā”œā”€ā”€ categories.json
ā”œā”€ā”€ main.py
ā”œā”€ā”€ .env.example
ā”œā”€ā”€ pyproject.toml
└── README.md

MCP Tools

Tool

Description

add_expense

Add a new expense

list_expenses

List all expenses

summarize_expenses

Show expense summary

edit_expense

Update an existing expense

delete_expense

Delete an expense

add_credit

Add income/credit

MCP Resource

expense://categories

Returns the predefined expense categories.

Setup

Clone the repository:

git clone https://github.com/thearyangupta/expense-tracker-mcp.git
cd expense-tracker-mcp

Install dependencies:

uv sync

Create a .env file:

DATABASE_URL=postgresql+psycopg://postgres:YOUR_PASSWORD@localhost:5432/expense_tracker

Run the server:

uv run python main.py

Example Prompts

Add a Food expense of ₹250 for Lunch.

Show all expenses.

Summarize my expenses.

Update expense 3.

Delete expense 5.

Add a credit of ₹20,000 from Freelancing.

Future Improvements

  • Expense filtering

  • Monthly reports

  • Export to CSV

  • Budget tracking

  • AI-powered expense insights


Built using FastMCP and PostgreSQL.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • 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
    B
    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
    Not graded
    quality
    C
    maintenance
    A lightweight local MCP server for tracking personal or small-team expenses. It lets you add expense entries, list transactions within a date range, and generate simple summaries by category — all backed by a local SQLite database.
    -
  • F
    license
    B
    quality
    C
    maintenance
    A lightweight local MCP server that enables users to add, list, edit, and delete expenses via SQLite database through natural language in MCP-compatible clients.
    4
    1
    -