Skip to main content
Glama
Python-Blade

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).
ParametersJSON Schema
NameRequiredDescriptionDefault
timeNo2026-09-13T06:15:40.468342
amountYes
categoryYes
descriptionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It implies a write operation but says nothing about persistence, duplicate handling, required permissions, or what happens to existing data. Only the time default ('default is current time') adds any behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The docstring is front-loaded with the purpose and then lists parameters compactly. It is slightly boilerplate ('Args:') and contains a typo ('occured'), but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and parameters are covered. However, for a mutation tool with zero annotations, the description omits any note on side effects, permissions, or duplicate behavior, leaving a meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: it documents all four parameters, gives concrete category examples (Food, Transport, Rent), and clarifies the time default. This is genuine added meaning beyond the bare schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first line gives a clear verb+resource ('Add a new expense to the tracker'), which an agent can distinguish from delete_expense and list_expenses without opening a schema. It does not, however, explicitly name or contrast those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus delete_expense or list_expenses, nor any prerequisites or exclusions. Usage is only implied by the verb 'Add'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_expenseC
Delete an expense by its ID.

Args:
    expense_id: The ID of the expense to delete.
ParametersJSON Schema
NameRequiredDescriptionDefault
expense_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only restates the delete action and parameter meaning, omitting whether deletion is permanent, whether it requires elevated permissions, or what happens if the ID is not found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is brief and front-loaded with the core action. The 'Args:' block is slightly redundant with the schema, but overall the description avoids unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive operation with no annotations and a minimal schema, the description is insufficient. It should mention permanence, permission requirements, or side effects; the presence of an output schema does not excuse this gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the schema only defines expense_id as an integer with the title 'Expense Id'. The description repeats that it is 'The ID of the expense to delete' without adding format, constraints, or examples that would compensate for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource (delete an expense by ID), making the tool's basic action unambiguous. It does not explicitly differentiate itself from siblings add_expense or list_expenses, but the operation is clearly distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus alternatives, nor any prerequisites or warnings. The description implies destructive intent but does not state permanence, required permissions, or error behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_expensesB

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden, and it does disclose a return characteristic ('formatted string'). It says nothing about pagination, volume limits, ordering, or the read-only nature of the operation, which are meaningful gaps for a listing tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the purpose front-loaded and no filler. The return-format sentence borders on redundant given an output schema exists, but it is not wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only listing tool with a full output schema, the description covers what the agent needs. It is nearly complete, missing only light behavioral context like ordering or scale expectations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters and the schema is empty, so there is nothing for the description to disambiguate. Baseline 4 applies for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (list) and resource (expenses) with a clear scope ('all expenses recorded in the database'). It is distinguishable from siblings add_expense and delete_expense by verb alone, though it never explicitly differentiates itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no when-to-use guidance, no exclusions, and never references the sibling tools. Usage is only inferable from the verb itself; nothing tells the agent when this is preferable to other operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 3 tool updatesv0.1.0
    • First observedadd_expense
    • First observeddelete_expense
    • First observedlist_expenses

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