Skip to main content
Glama
sppandita85

mcp-expense-tracker

by sppandita85

mcp-expense-tracker

An MCP (Model Context Protocol) server for tracking expenses. Expenses are stored in a local JSON file, and the server exposes tools for adding expenses and summarizing totals by day or month.

Two equivalent implementations are included:

  • src/ — TypeScript/Node, stdio transport. Use this with Claude Code or Claude Desktop.

  • server.py — Python (FastMCP). Use this to deploy on FastMCP Cloud so it's reachable as a remote connector from claude.ai.

Tools

  • add_expense — record an expense (amount, category, optional description, optional date defaulting to today)

  • list_expenses — list expenses, optionally filtered by start_date, end_date, category

  • delete_expense — delete an expense by id

  • summarize — get the total (and per-category breakdown) for a day, month, or all time, anchored on an optional date

Related MCP server: Expense Tracker MCP Server

Deploy on FastMCP Cloud (for claude.ai)

FastMCP Cloud deploys directly from this GitHub repo. When it asks for an entrypoint, use:

server.py

(FastMCP Cloud auto-detects the mcp object in server.py; you'd only need server.py:mcp if the variable were named something else.) It installs requirements.txt automatically. Once deployed, add the resulting https://<your-app>.fastmcp.app/mcp URL as a custom connector in claude.ai's connector settings.

Storage caveat: server.py stores expenses in a local data/expenses.json file. Confirm your FastMCP Cloud plan gives that container a persistent disk — if storage is ephemeral/rebuilt on redeploy, expenses will reset. If you hit that, swap server.py's file-backed storage for a hosted database.

Node/TypeScript setup

npm install
npm run build

Run standalone

npm start

The server communicates over stdio, so it's meant to be launched by an MCP client rather than used directly in a terminal.

Use with Claude Code

claude mcp add expense-tracker -- node /absolute/path/to/mcp-tracker/build/index.js

Use with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "expense-tracker": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-tracker/build/index.js"]
    }
  }
}

Run the Python version locally

pip install -r requirements.txt
python server.py

Data storage

Expenses are stored in data/expenses.json (created automatically). Set EXPENSE_DATA_DIR to change where data is stored. This applies to both implementations.

Available Tools

4 tools
add_expenseAdd ExpenseB

Record a new expense. Date defaults to today (YYYY-MM-DD) if not provided.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format, defaults to today
amountYesExpense amount, e.g. 12.50
categoryYesCategory, e.g. food, transport, rent, entertainment
descriptionNoOptional note about the expense

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. Only the date default is mentioned. There is no information about idempotency, validation errors, success response, or side effects. The mutation behavior (creating an expense) is implicit.

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

Conciseness5/5

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

The description is two sentences, extremely concise and front-loaded. Every word contributes meaning. No redundancy or filler.

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?

For a simple create tool with 4 parameters fully described in schema, the description is adequate but minimal. It lacks details on success indicators, error handling, or duplicate behavior. Contextually acceptable but not thorough.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds 'Date defaults to today', which is already stated in the schema. No additional semantic value is provided beyond what the schema contains.

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?

Description clearly states the purpose: 'Record a new expense'. The verb 'record' and resource 'expense' are explicit. Sibling tools include 'list_expenses', 'delete_expense', and 'summarize', making 'add_expense' distinct, though no direct differentiation is stated.

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 on when to use this tool versus alternatives. While it is intuitive for adding, the description does not mention that this is for adding single expenses or how it differs from the listed sibling tools (e.g., 'list_expenses' for viewing, 'delete_expense' for removal).

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

delete_expenseDelete ExpenseA

Delete an expense by its id.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesThe expense id returned by add_expense or list_expenses

TDQS

A3.5/5.0
Behavior2/5

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

No annotations provided, and the description only states the action without disclosing consequences (e.g., permanent deletion, side effects, required permissions).

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

Conciseness5/5

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

Single, efficient sentence with no wasted words.

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?

No output schema is provided, and the description does not describe return values or confirmation. Adequate for a simple delete but incomplete without additional context.

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

Parameters3/5

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

Schema coverage is 100% with clear description of 'id'. The tool description adds no additional meaning beyond the schema.

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

Purpose5/5

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

The description clearly states 'Delete an expense by its id.' which is a specific verb and resource. It distinguishes from sibling tools like list_expenses and add_expense.

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

Usage Guidelines3/5

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

No explicit guidance on when to use or when not to. It's implied for deleting an expense, but no mention of alternatives or prerequisites.

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

list_expensesList ExpensesA

List recorded expenses, optionally filtered by date range and/or category.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoOnly include expenses in this category
end_dateNoOnly include expenses on/before this date (YYYY-MM-DD)
start_dateNoOnly include expenses on/after this date (YYYY-MM-DD)

TDQS

A4/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 full burden. While 'list' implies a read-only operation, the description does not explicitly state that no data is modified, nor does it mention any behavioral details like pagination or ordering.

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

Conciseness5/5

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

The description is a single sentence that efficiently conveys the purpose and optional filters. No wasted words, and the key information is front-loaded.

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 simple list tool with three optional parameters and no output schema, the description is adequate. It covers the main functionality, though it lacks details about response format or default behavior when no filters are provided.

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

Parameters3/5

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

Schema coverage is 100%, so each parameter is already described. The description adds little new information beyond summarizing that filtering is optional. It does not provide additional context like expected value ranges or parameter interactions.

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

Purpose5/5

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

The description clearly states the verb 'list' and the resource 'recorded expenses', with optional filtering by date range and/or category. This distinguishes it from sibling tools like delete_expense or add_expense.

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

Usage Guidelines4/5

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

The description implies when to use this tool (listing expenses), and sibling tool names provide context for alternatives. However, it lacks explicit guidance on when not to use it or specific exclusion criteria.

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

summarizeSummarize ExpensesA

Get total spending for a day, a month, or all time, broken down by category.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateNoAnchor date (YYYY-MM-DD), defaults to today. For 'month', only the year-month portion is used.
periodYesSummarize a single day, a whole month, or all recorded expenses

TDQS

A3.8/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 full burden. It mentions category breakdown and parameter hints (date default, period usage) but does not disclose return format, edge cases (e.g., no data), or behavioral quirks.

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

Conciseness5/5

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

The description is a single concise sentence with no wasted words. It front-loads the key action and scope efficiently.

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?

The description is complete enough for a simple tool: it covers purpose and parameter hints. However, lacking output schema, mentioning the exact output format (e.g., list of categories with totals) would improve completeness slightly.

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

Parameters3/5

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

Schema coverage is 100% with parameter descriptions. The description adds only 'broken down by category' which hints at output structure but does not significantly enhance parameter understanding beyond the schema.

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

Purpose5/5

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

The description uses a specific verb ('Get total spending') and resource ('expenses') with clear scoping (day, month, all time) and a defined breakdown ('by category'). It clearly distinguishes from sibling tools like 'list_expenses' which would list individual items.

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

Usage Guidelines3/5

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

The description implies usage for obtaining aggregated spending but lacks explicit guidance on when to use this tool versus alternatives (e.g., 'list_expenses' for details). No exclusions or context conditions are stated.

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

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct operation: add, list, summarize totals, delete. There is no overlap in purpose, making it clear which tool to use.

Naming Consistency4/5

Three tools follow the verb_noun pattern (add_expense, list_expenses, delete_expense), but 'summarize' deviates by being a bare verb. This is a minor inconsistency.

Tool Count5/5

With 4 tools, the server is well-scoped for a basic expense tracker. Each tool serves a necessary role without unnecessary bloat.

Completeness3/5

The set covers create (add_expense), read (list_expenses, summarize), and delete (delete_expense), but lacks an update operation. Agents cannot modify existing expenses, which is a notable gap.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to track and manage personal expenses through natural language, including adding entries, filtering by date/category, viewing statistics, and exporting data in JSON or CSV format.
    3
  • F
    license
    A
    quality
    D
    maintenance
    Enables tracking and managing personal expenses through a local SQLite database. Supports adding, editing, deleting, listing, and summarizing expenses by category, as well as managing credit accounts.
    6
  • 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
    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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sppandita85/mcp-expense-tracker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server