Skip to main content
Glama
Local MCP Server Expense Tracker

Local MCP Server Expense Tracker

by MOKSH0077

Local MCP Server Expense Tracker

A lightweight, local Model Context Protocol (MCP) server built with FastMCP and SQLite to manage expenses. This server enables MCP-compatible clients (like Claude Desktop) to add, list, edit, and delete expenses directly from chat using a local database.

Features

  • SQLite Database: Self-contained database (Expense.db) created dynamically in the same directory.

  • Full CRUD operations:

    • add_expense: Add a new expense (amount, category, date, description).

    • list_expenses: Fetch all expenses stored in the database.

    • edit_expense: Modify an existing expense record by ID.

    • delete_expense: Permanently delete an expense record by ID.

Related MCP server: local-expense-tracker

Prerequisites

  • Python 3.10+

  • uv (recommended Python package installer/runner)

Installation & Running

1. Run in Development Mode (Inspector)

To run the server and inspect/test the tools using the FastMCP web inspector:

uv run fastmcp dev inspector expense_tracker.py

2. Run the MCP Server

To start the server directly:

uv run fastmcp run expense_tracker.py

3. Install in Claude Desktop

To automatically register the server with your local Claude Desktop configuration:

uv run fastmcp install claude-desktop expense_tracker.py

4. Windows Auto-Sync & Path Fix (Optional)

If you are using the Microsoft Store version of Claude Desktop on Windows, the app is sandboxed and might fail to find uv in its PATH or fail to load the standard configuration.

You can run the included PowerShell script to fix the paths and sync configuration:

.\sync_mcp.ps1

This script:

  • Resolves the absolute path of uv.exe.

  • Syncs the configurations to Claude's sandboxed local packages directories.

  • Restarts Claude Desktop automatically.

Database Schema

The SQLite database contains a table named expenses with the following schema:

  • id: INTEGER (Primary Key, Auto-increment)

  • amount: REAL (Not Null)

  • category: TEXT (Not Null)

  • date: DATE (Not Null)

  • description: TEXT (Optional)

License

MIT License

Available Tools

4 tools
add_expenseC

Add expense to database

Inputs: date (required), amount (required), category (required), description (required). Returns: object

delete_expenseC

Delete expense from database

Inputs: id (required). Returns: object

edit_expenseC

Edit expense in database

Inputs: id (required), date (required), amount (required), category (required), +1 more. Returns: object

list_expensesA

Get all expenses from database

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 4 tools

    Disambiguation5/5

    Each tool has a distinct operation (add, delete, edit, list) with no overlap, making it easy for an agent to select the correct one.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, which is predictable and readable.

    Tool Count5/5

    Four tools cover the core CRUD operations for an expense tracker; the count is appropriate and not excessive.

    Completeness4/5

    The set provides essential create, read (list), update, and delete operations, but lacks a single-expense retrieval tool, which is a minor gap.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A local MCP server for tracking personal expenses using SQLite, enabling users to add, list, and summarize expenses via natural language.
      -
    • 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
      Not graded
      quality
      D
      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.
      -