Skip to main content
Glama
gyanranjanpanda

Expense Tracker Remote MCP Server

Expense Tracker Remote MCP Server

A production-grade Model Context Protocol (MCP) server for recording, tracking, filtering, and analyzing personal and organizational expenses. Built with FastMCP and Clean Architecture principles.

Architecture Overview

src/remote_mcp/
├── domain/                  # Entities, Value Objects, Repository Contracts, Exceptions
│   ├── entities.py          # Expense, ExpenseSummary, ExpenseFilter
│   ├── exceptions.py        # Typed Domain Exceptions
│   └── repository.py        # ExpenseRepository Protocol
├── application/             # Use Case Orchestration & Business Rules
│   └── service.py           # ExpenseTrackerService
└── infrastructure/          # Data Access & External Integrations
    └── sqlite_repository.py # SQLite with WAL mode & parameterized queries
main.py                      # FastMCP Entrypoint exposing Tools & Resources

Related MCP server: Expense Tracker MCP Server

Available Tools

Tool

Parameters

Description

add_expense

amount (float), category (str), description (str), date (str, optional)

Records a new expense with currency validation and category normalization.

list_expenses

category (str, optional), start_date (str, optional), end_date (str, optional)

Queries stored expenses by category and date range (YYYY-MM-DD).

delete_expense

expense_id (int)

Deletes an expense by its unique identifier.

get_expense_summary

category (str, optional)

Computes total spending, record count, and category breakdown.

clear_expenses

None

Clears all records from the database.

Available Resources

  • expenses://summary: JSON overview of total expenditure, record count, and category breakdown.

  • expenses://categories: JSON mapping of categories to total spending.

  • info://server: Server metadata and active capabilities.

Getting Started

Prerequisites

  • Python 3.13+

  • uv

Installation

uv sync

Running the Server

Run directly with Python (HTTP transport on 0.0.0.0:8080):

uv run python main.py

Or run via FastMCP CLI:

uv run fastmcp run main.py --transport http --host 0.0.0.0 --port 8080

Testing & Verification

Run the test suite:

uv run pytest -v

Using with MCP Inspector

  1. Start the inspector:

    npx @modelcontextprotocol/inspector
  2. In the inspector UI:

    • Select Streamable HTTP

    • Connect to http://127.0.0.1:8080/mcp

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables tracking of personal expenses with tools to add, list, update, delete, and summarize expenses by category.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to track expenses by adding, listing, and summarizing them with category support through natural language.
    -
  • F
    license
    A
    quality
    C
    maintenance
    Enables logging and tracking personal expenses in a local SQLite database with category/subcategory validation, offering tools to add, view, summarize, and delete expenses.
    4
    -
  • A
    license
    C
    quality
    C
    maintenance
    Enables tracking, categorizing, and summarizing personal and business expenses with support for date range queries and category grouping.
    3
    MIT