Expense Tracker MCP Server
Click on "Install 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 ServerAdd a $20 lunch expense to the Food category"
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
An asynchronous Model Context Protocol (MCP) server built with Python and FastMCP to log and track personal expenses inside a local SQLite database with strict category/subcategory checks.
Features
SQLite Database Backend: Logs expenses locally in
expenses.dbusingaiosqlite.Asynchronous Execution: Fully utilizes
asyncioand async database connections.Categorization: Validates categories and subcategories against a custom JSON hierarchy (
categories.json).Exposed Tools:
add_expense: Add a new transaction (validates amount, category, and dates).get_expenses: View matching logs with optional category, subcategory, start date, and end date filters.get_expense_summary: View spent totals, item count, and percentages grouped by category.delete_expense: Remove transaction logs by database ID.
Exposed Resources:
expense://categories: Returns the JSON representation of categories and their subcategories.expense://categories/{category}/subcategories: Returns subcategories for a given category in JSON format.
Related MCP server: Expense Tracker MCP Server
Files Structure
main.py: Server entrypoint containing initialization, SQLite queries, MCP tools, and MCP resource declarations.
categories.json: Configuration file specifying categories and subcategories.
pyproject.toml: Package configuration with metadata and dependency requirements (
fastmcpandaiosqlite)..gitignore: Configured to ignore virtual environments, cache directories, and local database files.
Installation
Ensure you have uv installed.
To sync dependencies:
uv syncRunning the Server
To start the MCP server locally:
uv run python main.pyDevelopment and Testing
A test suite is available under the artifacts directory. To run the async test suite:
uv run python C:\Users\User\.gemini\antigravity-ide\brain\7f833c64-f9e4-404b-a691-0d0df923616c\scratch\test_server.pyAvailable Tools
4 toolsadd_expenseA
Add a new expense with amount, category, subcategory, optional description, and date (YYYY-MM-DD)
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| amount | Yes | ||
| category | Yes | ||
| description | No | ||
| subcategory | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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 only states it adds an expense, without mentioning side effects, permissions, idempotency, validation behavior, or what happens on success/failure. The date format is a useful detail but does not compensate for the lack of transparency.
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 concise sentence that is front-loaded with the verb 'Add'. Every word earns its place, with no filler or repetition.
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 tool with 5 parameters and no annotations, the description is minimal. It covers the parameters but lacks usage guidance and behavioral context. The existence of an output schema mitigates the need to explain return values, but the description still feels thin for an agent to fully understand when and how to use it.
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 lists all parameters and marks description and date as optional, and specifies the date format. However, with 0% schema description coverage, it does not fully compensate by explaining the meaning of category/subcategory or any constraints beyond the schema's types. It adds some value but leaves gaps.
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 action (Add a new expense) and lists the key parameters (amount, category, subcategory, description, date). It distinguishes itself from siblings (get_expenses, get_expense_summary, delete_expense) by being the creation tool.
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 implies when to use the tool (when adding a new expense) but does not explicitly mention alternatives or conditions for use versus the sibling tools. No when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_expenseA
Delete an expense record by its numeric ID
| Name | Required | Description | Default |
|---|---|---|---|
| expense_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It states the action 'Delete' but does not mention whether deletion is permanent, whether it requires special permissions, what happens to related data, or error behavior for non-existent IDs. This gap is comparable to the update_drive example, which also scored 2 for lacking such details.
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, concise sentence that front-loads the action and the essential parameter detail. There is no redundant information, 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?
This is a minimal viable description for a simple tool with one parameter and an output schema. It adequately conveys the core action and target, but lacks caveats like irreversibility or prerequisites. Given its simplicity, it is sufficient but has gaps in providing full context beyond the immediate function.
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 says 'numeric ID', but the schema already defines expense_id as an integer, so this adds little beyond the schema. It does imply the ID identifies the expense to delete, but it doesn't clarify formats, valid values, or that the record must exist.
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 uses a specific verb 'Delete' and clearly identifies the resource 'expense record' and the key 'numeric ID'. This distinguishes it from sibling tools like add_expense, get_expenses, and get_expense_summary, making the purpose unambiguous.
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 clearly implies the tool is for removing an expense record, and given the sibling tools cover add/get/summary, there is no ambiguity about when to use it. However, it does not explicitly mention alternatives or exclusions, but the context is clear enough for an agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_expensesA
Retrieve list of expenses, optionally filtered by category, subcategory, start_date, or end_date (YYYY-MM-DD)
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | ||
| end_date | No | ||
| start_date | No | ||
| subcategory | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | 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 clearly indicates a read operation ('Retrieve') and names all filter parameters including the YYYY-MM-DD date format. However, it does not disclose how filters combine (AND/OR), whether date bounds are inclusive, pagination behavior, or ordering. For a simple list tool this is adequate but leaves some edge-case behavior unspecified.
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?
A single, front-loaded sentence states the core action ('Retrieve list of expenses') followed by optional filter names and date format. Every word earns its place with no redundancy or filler.
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?
An output schema exists, so return-value details are covered elsewhere. The description addresses purpose, filter parameters, and date format. It lacks explicit statements about default behavior when no filters are provided, ordering, or limits, but for a straightforward list retrieval tool, the description is sufficiently complete for an agent to invoke it correctly.
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 enumerates all four parameters (category, subcategory, start_date, end_date) and specifies date format, adding meaning beyond the bare schema. However, it does not describe valid values for category/subcategory, dependencies between filters, or the effect of omitting all filters (presumably returning all expenses). The description adds a baseline level of semantic clarity but not deep detail.
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 uses the specific verb 'Retrieve' with resource 'list of expenses', clearly distinguishing this from siblings like add_expense, delete_expense, and get_expense_summary. It states exactly what the tool does: returns a list of expenses, with optional filters.
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 implies usage when a list of expenses is needed, optionally filtered by the named parameters. It contrasts implicitly with get_expense_summary (summary vs list) but does not explicitly name alternatives or state when not to use this tool. The context is clear, but no exclusion criteria are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_expense_summaryA
Get total summary and category breakdown of all expenses
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It uses 'Get' to imply a read-only operation and specifies the scope ('all expenses'), but does not explicitly confirm no side effects or mention any other behavioral characteristics. This is acceptable for a simple read summary, but could be more transparent.
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, concise sentence that effectively communicates the tool's purpose without unnecessary detail. Every word earns its place, and the structure is optimally front-loaded.
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?
The tool has no parameters, an output schema that presumably documents the return structure, and a simple read-only function. The description fully explains what the tool returns (total summary and category breakdown), making it complete for the intended use case. No additional 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 input schema has zero parameters, and schema description coverage is trivially 100% since there are no params. The description does not need to add parameter information. Baseline for zero-parameter tools is 4, which is appropriate.
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 function with a specific verb ('Get') and resource ('total summary and category breakdown of all expenses'). This distinguishes it from sibling tools like get_expenses, which presumably lists individual expenses rather than aggregating them.
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 implies usage for obtaining aggregated summaries and category breakdowns, but does not explicitly state when to use this tool over get_expenses or provide any exclusions. The intended use is reasonably inferred from the phrasing, but no alternative guidance is offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct operation: adding, listing, summarizing, and deleting expenses. There is no overlap in purpose, so an agent can easily select the correct tool.
All tool names follow a consistent verb_noun pattern (add_expense, get_expenses, get_expense_summary, delete_expense). The snake_case style is uniform across the set.
The server has 4 tools, which is well-scoped for an expense tracker. Each tool covers a fundamental operation without unnecessary redundancy or excessive granularity.
The set covers the main expense lifecycle: create, read (list), summary, and delete. Missing an update operation is a minor gap, but most core workflows are supported.
Maintenance
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
Personal finance tracker — log transactions, view summaries, and browse a dashboard
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
Log, query, and edit expenses, budgets, and accounts in 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
- FlicenseAqualityDmaintenanceEnables 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
- FlicenseNot gradedqualityDmaintenanceEnables natural language management of personal expenses, including adding, listing, and summarizing expenses with local SQLite storage.
- FlicenseBqualityDmaintenanceTracks and manages personal expenses with tools to add, view, filter by category, and summarize spending over date ranges using SQLite storage.4
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/akshay0101/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server