Expense Tracker MCP Server
Manages expenses in a local SQLite database, providing tools for adding, editing, deleting, and summarizing expense records with support for categories and date-range queries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Expense Tracker MCP Serversummarize my expenses for this month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Expense Tracker MCP Server
A Model Context Protocol (MCP) server for tracking expenses, built with fastmcp.
Features
This server provides tools to manage expenses in a local SQLite database (expenses.db) and exposes categories via a resource.
Tools
add_expense: Add a new expense.Arguments:
date(YYYY-MM-DD),amount,category,subcategory(optional),note(optional).
list_expenses: List expenses within a date range.Arguments:
start_date,end_date.
summarize: Summarize expenses by category.Arguments:
start_date,end_date,category(optional filter).
edit_expense: Edit an existing expense.Arguments:
id,date,amount,category,subcategory,note.
delete_expense: Delete an expense by ID.Arguments:
id.
add_credit: Add credit to a user account (default user).Arguments:
amount,user_name(optional, default="default").
Resources
expense://categories: Returns the content ofcategories.json.
Related MCP server: Expense Tracker MCP
Prerequisites
Python >= 3.12
uv(recommended for dependency management)
Installation & Usage
Using uv (Recommended)
You can run the server directly using uv:
uv run main.pyManual Installation
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies:
pip install fastmcpRun the server:
python main.py
Configuration for Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"expense-tracker": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"c:\\Users\\LOQ\\Downloads\\ExpenseTracker_MCP_Server\\main.py"
]
}
}
}Note: Update the path to main.py to match your local path.
Available Tools
6 toolsadd_creditC
Add credit to the user's account. By default updates 'default' user. Returns new credit amount.
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| user_name | No | default |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'Adds credit' (implying a mutation/write operation) and mentions it 'Returns new credit amount', but lacks critical details like whether this requires authentication, has rate limits, affects other data, or what happens on errors. The description is too minimal for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—two sentences with zero wasted words. It's front-loaded with the core purpose and efficiently covers default behavior and return value. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with 2 parameters (0% schema coverage), no annotations, and no output schema, the description is inadequate. It doesn't explain the return format beyond 'new credit amount', error conditions, side effects, or how it integrates with sibling tools. The agent lacks sufficient context to use this tool safely and effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the schema provides no parameter documentation. The description only implies 'amount' is required (by mentioning adding credit) and that 'user_name' defaults to 'default', but doesn't explain what 'amount' represents (e.g., currency, units) or valid values for 'user_name'. It adds minimal semantic value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Add credit') and target ('to the user's account'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'add_expense', which could cause confusion about when to use each.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions 'By default updates 'default' user', which provides some context about default behavior, but offers no guidance on when to use this tool versus alternatives like 'add_expense' or other financial tools. There's no mention of prerequisites, constraints, or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
add_expenseC
Add a new expense to the database.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| amount | Yes | ||
| category | Yes | ||
| subcategory | No | ||
| note | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states it adds an expense without disclosing behavioral traits like permissions needed, whether it's idempotent, error handling, or what happens on success/failure. It's a basic statement that doesn't compensate for the lack of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero wasted words. It's front-loaded and appropriately sized for the tool's function, making it highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (a mutation tool with 5 parameters), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't address return values, error cases, or provide enough context for safe and effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so parameters are undocumented in the schema. The description adds no meaning beyond the schema—it doesn't explain what 'date', 'amount', or 'category' represent, their formats, or constraints. This fails to compensate for the low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Add') and resource ('a new expense to the database'), making the purpose immediately understandable. It doesn't distinguish from siblings like 'add_credit' or 'edit_expense', but it's not vague or tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'edit_expense' or 'add_credit'. It doesn't mention prerequisites, exclusions, or specific contexts, leaving usage entirely implicit.
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 from the database.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
TDQS
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 states the tool deletes an expense but fails to mention critical details like whether the deletion is permanent, requires specific permissions, has side effects, or what happens on success/failure. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with zero wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity as a destructive operation with no annotations, no output schema, and poor parameter coverage, the description is incomplete. It lacks essential context about behavior, outcomes, and parameter usage, making it insufficient for safe and effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must compensate for the undocumented parameter 'id'. However, it adds no meaning beyond the schema, not explaining what 'id' represents (e.g., expense ID format, source) or how to obtain it. This results in inadequate parameter clarification.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Delete') and target resource ('an expense from the database'), making the purpose immediately understandable. It doesn't distinguish from sibling tools like 'edit_expense' or 'list_expenses', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'edit_expense' for modifications or 'list_expenses' for viewing. The description lacks context about prerequisites or exclusions, offering minimal usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_expenseC
Edit an existing expense in the database.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| date | Yes | ||
| amount | Yes | ||
| category | Yes | ||
| subcategory | No | ||
| note | No |
TDQS
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 states the tool edits an expense, implying a mutation operation, but lacks details on permissions needed, whether changes are reversible, error handling, or any rate limits. It doesn't describe what happens to unspecified fields or the response format, leaving significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste, front-loading the core action. It's appropriately sized for a simple tool, though its brevity contributes to gaps in other dimensions. Every word earns its place by clearly stating the tool's function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (mutation with 6 parameters), lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain parameters, behavioral traits, or return values, making it insufficient for an AI agent to use the tool effectively without additional context or trial-and-error.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 for undocumented parameters. It adds no meaning beyond the schema, failing to explain what 'id', 'date', 'amount', 'category', 'subcategory', or 'note' represent, their formats, or constraints. With 6 parameters and no schema descriptions, this is inadequate, scoring below the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Edit') and resource ('an existing expense in the database'), making the purpose immediately understandable. It distinguishes from siblings like 'add_expense' (creation) and 'delete_expense' (removal), though it doesn't explicitly mention these distinctions. The description avoids tautology by not just restating the tool name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing expense ID), exclusions (e.g., when to use 'add_expense' instead), or contextual cues for selection among siblings like 'edit_expense' vs. 'delete_expense'. Usage is implied but not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_expensesC
List all expenses in the database between start_date and end_date (inclusive).
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | Yes | ||
| end_date | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool lists expenses, implying a read-only operation, but doesn't disclose behavioral traits such as whether it requires authentication, has rate limits, returns paginated results, or handles errors. This leaves significant gaps for an AI agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and includes essential details about the date range. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a read operation with date filtering), lack of annotations, and no output schema, the description is incomplete. It doesn't cover return values, error handling, or behavioral aspects like pagination. For a tool with 2 parameters and no structured support, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning by specifying that the parameters define a date range ('between start_date and end_date (inclusive)'), which clarifies their purpose beyond the schema's generic titles. However, with 0% schema description coverage and 2 parameters, it doesn't detail format (e.g., YYYY-MM-DD) or constraints, so it only partially compensates.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List all expenses in the database between start_date and end_date (inclusive).' It specifies the verb ('List'), resource ('expenses'), and scope ('between start_date and end_date'). However, it doesn't explicitly differentiate from sibling tools like 'summarize' or 'add_expense', which keeps it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'summarize' for aggregated data or 'add_expense' for creating entries, nor does it specify prerequisites or exclusions. The usage context is implied but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
summarizeB
Summarize expenses by category within the inclusive date range. Returns list of {"category": ..., "total": ...} ordered by total descending.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | Yes | ||
| end_date | Yes | ||
| category | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the return format ('list of {...} ordered by total descending'), which adds some behavioral context, but lacks details on permissions, error handling, data sources, or side effects. For a tool with no annotations, this is minimal disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise and front-loaded: two sentences with zero waste. The first sentence states the purpose, and the second explains the return format, both earning their place efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, 0% schema coverage, and no output schema, the description is moderately complete. It covers purpose and return format but lacks details on parameters, error cases, or integration with siblings. For a tool with three parameters and no structured support, it should do more to be fully helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 implies date-range parameters ('within the inclusive date range') and category filtering ('by category'), mapping to the three parameters. However, it doesn't specify formats (e.g., date strings) or clarify the optional 'category' parameter's role, leaving gaps in parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Summarize expenses by category within the inclusive date range.' It specifies the verb ('summarize'), resource ('expenses'), and scope ('by category within date range'). However, it doesn't explicitly differentiate from sibling tools like 'list_expenses' which might also handle date ranges.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_expenses' for detailed listings or 'add_expense' for adding data, leaving the agent to infer usage context from the purpose alone.
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.
6 tool updates
v0.1.0- First observed
add_credit - First observed
add_expense - First observed
delete_expense - First observed
edit_expense - First observed
list_expenses - First observed
summarize
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no ambiguity: adding credit, adding/editing/deleting expenses, listing expenses, and summarizing expenses. The descriptions clearly differentiate between credit operations, expense CRUD operations, and analytical functions.
All tools follow a consistent verb_noun pattern with snake_case naming: add_credit, add_expense, delete_expense, edit_expense, list_expenses, summarize. The single verb 'summarize' without a noun is appropriate for its analytical function and maintains readability.
Six tools is well-scoped for an expense tracking server, covering core operations without bloat. Each tool earns its place: credit management, full expense CRUD, listing, and summarization provide complete workflow coverage.
The tool surface covers most essential expense tracking operations including credit management and expense lifecycle. A minor gap exists in credit operations (no edit/delete credit tools), but agents can work around this limitation effectively.
Maintenance
Related MCP Connectors
Personal finance tracker — log transactions, view summaries, and browse a dashboard
- WalleKOAuthapp.wallek
Personal finance ledger: log expenses, track bills and cards, import statements.
- ManiloOAuthapp.manilo
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
- ManiloOAuthapp.ledgy.api
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.5-
- FlicenseNot gradedqualityDmaintenanceEnables management of expenses via SQLite database, including adding, listing, updating, deleting, filtering, and summing expenses through natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.-
- FlicenseAqualityCmaintenanceEnables logging and tracking personal expenses in a local SQLite database with category/subcategory validation, offering tools to add, view, summarize, and delete expenses.4-