Skip to main content
Glama
krabhis

Expense Tracker MCP

by krabhis

Expense Tracker MCP

An MCP server for recording and analyzing personal expenses. The server uses FastMCP and stores data locally in a SQLite database, so no external database service is required.

Features

  • Add an expense with a date, amount, category, subcategory, and note.

  • List expenses for an inclusive date range.

  • Summarize spending by category for an inclusive date range.

  • Expose the category and subcategory list as the expense://categories MCP resource.

  • Create the SQLite database automatically on first start.

Related MCP server: Expense Tracker MCP Server

Installation

Clone or download the repository and open a terminal in the project directory:

cd path\to\expenseTracker_mcp

Install the project and its dependencies with uv:

uv sync

If uv is not installed, install it pip install uv

Start the MCP server

Run the server over the default MCP stdio transport:

uv run python -m expensetracker_mcp.main

Keep this process running while your MCP client connects to it. The first start creates src/expensetracker_mcp/expenses.db if it does not already exist.

MCP client configuration

For an MCP client that supports a JSON server configuration, use the following entry and replace the path with the absolute path to this repository:

{
	"mcpServers": {
		"expense-tracker": {
			"command": "uv",
			"args": [
				"--directory",
				"C:\\path\\to\\expenseTracker_mcp",
				"run",
				"python",
				"-m",
				"expensetracker_mcp.main"
			]
		}
	}
}

For a client that requires an absolute executable path, use the path to your uv installation instead of uv.

Available MCP tools

add_expense

Adds one expense entry.

list_expenses

Lists all expenses between start_date and end_date, inclusive. Results are ordered by the database record ID.

summarize

Totals expenses by category between start_date and end_date, inclusive. The optional category argument limits the result to one category.

Categories resource

The expense://categories resource returns the contents of src/expensetracker_mcp/categories.json as JSON. It contains the supported top-level categories and their subcategories. The file is read each time the resource is requested, so category changes are available without restarting the server.

Available Tools

3 tools
add_expenseAdd ExpenseC

Add a new expense entry to the database.

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes
noteNo
amountYes
categoryYes
subcategoryNo

TDQS

C2.7/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 burden of behavioral disclosure. It clearly implies a mutating create operation, but it does not state whether expenses can be duplicated, whether any validation occurs, what side effects happen, or what the response contains. The agent gets only the most basic behavioral signal.

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 description is a single short sentence with no filler or redundancy, which is appropriately concise for a simple create operation. It is slightly repetitive with the title but still adds the target destination 'database,' earning its place. Brevity is good, though the terseness contributes to under-specification elsewhere.

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

Completeness1/5

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

With five parameters, no schema descriptions, no annotations, and no output schema, this description is severely incomplete. An agent cannot confidently construct a valid call because it lacks required-value formats, category options, subcategory semantics, and response behavior. The single sentence provides almost none of the context needed for correct invocation.

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

Parameters1/5

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

Schema description coverage is 0%, and the description offers no information about the five parameters. The schema itself provides no type or format details for date, amount, category, note, or subcategory. The description does nothing to compensate for this gap, so an agent has no guidance on how to supply valid parameter values.

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 clear verb and resource: adds a new expense entry to a database. It differentiates from sibling tools because list_expenses and summarize imply reading or aggregating rather than creating. However, 'expense entry' and 'database' are somewhat generic, so it is clear but not maximally precise.

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?

Usage context is implied by the verb 'add,' which suggests this tool is for creating new expense records rather than listing or summarizing. However, the description gives no explicit when-to-use guidance, no exclusions, and no mention of alternatives, leaving the agent to infer when this tool is appropriate.

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

list_expensesList ExpensesB

List expense entries within an inclusive date range.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_dateYes
start_dateYes

TDQS

B3.4/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 burden of behavioral disclosure. It only states the inclusive date range and the listing action. It does not mention return format, ordering, whether the operation is read-only, pagination, or behavior with invalid/missing dates. For a tool with no annotation safety signals, this is a notable gap.

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?

A single sentence that is front-loaded with the action and resource, and adds the important 'inclusive' detail. There is no redundant wording; every word contributes meaning.

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 two-parameter list tool, the description provides the essential purpose and range implication. However, without annotations, output schema, or parameter details, an agent is left without guidance on expected return data, error behavior, or how this integrates with the sibling tools. It is minimally viable but has clear gaps.

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%, so the description must compensate by explaining the parameters. It implies start_date and end_date define an inclusive range, but it gives no format details, no semantics for each parameter, and no guidance on date types or boundaries. This is inadequate for low schema coverage.

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 states a specific verb ('List'), a clear resource ('expense entries'), and a precise scope ('inclusive date range'). It distinguishes itself from siblings: add_expense creates entries, summarize aggregates them, while this tool retrieves raw entries.

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 the tool is used to retrieve expense records between two dates, which is a clear context. However, it does not explicitly state when to prefer this over add_expense or summarize, nor does it mention any exclusions or alternatives. The usage context is inferable but not explicit.

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

summarizeSummarizeA

Summarize expenses by category within an inclusive date range.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNo
end_dateYes
start_dateYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It adds useful context: the operation groups by category and treats the date range as inclusive. However, it does not clarify what 'summarize' produces (totals, counts, averages, or a list of category summaries), nor how the optional category parameter affects the output. This is a clear gap.

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, efficient sentence with no filler. The core action, grouping dimension, and date-scoping detail are all front-loaded and every word contributes.

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?

This is a simple tool with no output schema and no annotations, so the description must explain both inputs and expected results. It covers the input semantics reasonably but says nothing about the return shape or summary metric, leaving an agent uncertain about how to interpret the result. The missing return-value disclosure makes it incomplete for practical invocation.

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 0%, so the description must compensate. It maps 'category' to grouping and 'start_date'/'end_date' to an inclusive range, adding real meaning beyond bare parameter names. Yet it does not explain expected date formats, the behavior when category is null, or how null values are treated, so it only partially compensates.

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 states a specific verb ('summarize'), a resource ('expenses'), and the grouping dimension ('by category') plus a scoping constraint (inclusive date range). This clearly separates it from the sibling tools add_expense and list_expenses, so an agent can distinguish it without unpacking the schema.

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 intended use is implied by the verb 'summarize' — an agent can infer it should be used when aggregated category-level insights are needed rather than raw expense records. However, there is no explicit mention of when to choose this over list_expenses, and no exclusions or alternative tool references are provided.

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 observedlist_expenses
    • First observedsummarize

TDQS

B3.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: adding, listing, and summarizing expenses. There is no overlap or ambiguity when selecting between them.

Naming Consistency4/5

Mostly follows a verb_noun pattern (add_expense, list_expenses), but 'summarize' lacks a noun suffix, creating a minor inconsistency. Still predictable and readable.

Tool Count5/5

Three tools are well-scoped for a simple expense tracker and each earns its place. No bloat or deficiency.

Completeness4/5

Core expense tracking operations are covered (create, read, summarize), but missing update/delete functionality is a notable gap. Agents can work around this for read-heavy use cases.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    Enables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.
    5
    -
  • 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 natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.
    -
  • F
    license
    B
    quality
    D
    maintenance
    Tracks and manages personal expenses with tools to add, view, filter by category, and summarize spending over date ranges using SQLite storage.
    4
    -