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 $15 lunch expense for today"
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.
ExpenseTracker FastMCP server
Lightweight MCP server for tracking personal expenses using FastMCP and SQLite. This repo provides a small, local MCP server you can run on your machine for quick experiments, demos, or as the basis for a remote deployment.
What this is -
A minimal MCP server exposing a few tools to record and query expenses.
Stores data in a local SQLite database:
expenses.db(created automatically).Ships a JSON resource
expense://categoriesbacked bycategories.json.
Main features
add_expense(date, amount, category, subcategory, note)
list_expenses(start_date, end_date)
update_expense(expense_id, ...)
delete_expense(expense_id)
summarize(start_date, end_date, category=None)
categories resource (JSON)
Related MCP server: local-expense-tracker
Quick start (Windows - cmd.exe)
Create a virtual environment and activate it (Windows
cmd.exe):
First of all install uv if you don't have it already globally using:
pip install uvThen create and activate a virtual environment:
python -m venv .venv
.venv\Scripts\activateInstall dependencies. If you use
pipdirectly, at minimum install FastMCP. If your project uses a lockfile orpyproject.toml, prefer that.
pip install fastmcp
# or, if you maintain requirements.txt:
pip install -r requirements.txtOptional: if you're using the uv helper CLI (used in some FastMCP guides), you can add FastMCP via the uv CLI instead of pip. Only run the following if you already have the uv tool installed:
uv add fastmcpRun the server in development mode (opens FastMCP studio if available):
uv run fastmcp dev main.pyRun the server for normal usage:
uv run fastmcp run main.pyNotes
Database:
expenses.dbwill be created next tomain.pyon first run.Edit
categories.jsonto customize categories; the MCPcategoriesresource reads it fresh on each call.
Testing with FastMCP Studio / Claude Desktop
You can test and inspect the MCP server locally either using the FastMCP studio (dev mode) or by adding the server to Claude Desktop.
Run FastMCP studio (dev mode)
uv run fastmcp dev main.pyThis runs the server in development mode and opens FastMCP's studio/inspector (if available) so you can call tools interactively.
Add the server to Claude Desktop (optional)
If you want Claude Desktop to manage and talk to your MCP server, install the Claude Desktop helper using the FastMCP/uv helper (only if you have the uv helper installed):
uv run fastmcp install claude-desktop main.pyImportant notes when using Claude Desktop:
After changing the server code, fully restart Claude Desktop so it reloads the MCP server. That means quitting the app completely (exit from the system tray / taskbar) and then reopening it.
If Claude Desktop fails to load your MCP server, edit the Claude Desktop MCP config: open Claude Desktop, go to Settings → Developer → Edit config. You'll see a JSON like this:
{
"mcpServers": {
"ExpenseTracker": {
"command": "C:\\Users\\Sayoun Parui\\AppData\\Roaming\\Python\\Python313\\Scripts\\uv.exe", # here if u see only uv
"args": [
"run",
"--with",
"fastmcp",
"fastmcp",
"run",
"C:\\Users\\Sayoun Parui\\Desktop\\ExpenceTracker MCP Server\\main.py"
],
"env": {},
"transport": "stdio",
"type": null,
"cwd": null,
"timeout": null,
"description": null,
"icon": null,
"authentication": null
}
},
"preferences": {
"menuBarEnabled": false,
"legacyQuickEntryEnabled": false
}
}If the
commandvalue just showsuv(or a short name) you should replace it with the full path to theuvexecutable. To find the full path, open a Windowscmd.exeand run:
where uvCopy the full path returned (for example C:\Users\You\AppData\Roaming\Python\Python313\Scripts\uv.exe) and paste it into the command field in the Claude config, replacing the short uv value. Save the config and restart Claude Desktop.
If where uv returns multiple results, pick the one that points to your desired Python environment (global or the one where you installed uv).
Tools / API (what you can call)
add_expense(date: str, amount: float, category: str, subcategory: str = "", note: str = "") -> {status, id}
list_expenses(start_date: str, end_date: str) -> list of expense objects
update_expense(expense_id: int, date, amount, category, subcategory, note) -> {status}
delete_expense(expense_id: int) -> {status}
summarize(start_date: str, end_date: str, category: Optional[str]) -> [{category, total_amount}]
Resource:
expense://categories— returnscategories.jsoncontent (mime_type: application/json)
Example call (pseudo):
# with FastMCP client or via the studio, call the `add_expense` tool:
result = mcp.call('add_expense', date='2025-10-01', amount=12.50, category='food', subcategory='snacks', note='coffee')Project layout
main.py— MCP server implementation and tool definitions.categories.json— default categories/subcategories used by the resource.expenses.db— SQLite DB (auto-created).
Deployment & next steps
This project is intentionally small so it's easy to convert to a remote service. Ideas for production-ready deployments:
Move the DB to Postgres or another managed DB (RDS, Cloud SQL).
Containerize the app and deploy to ECS, EKS, GKE, or App Services.
Add authentication to MCP endpoints and secure the server behind a gateway.
Short-term suggestions:
Add basic schema migration tooling (alembic/sqlalchemy or a simple migration script).
Add input validation and richer date handling (ISO 8601 enforcement).
Add unit tests for the tool functions.
Contributing
Small contributions welcome. Suggested workflow:
Fork the repo
Create a feature branch
Open a PR with a short description of changes
Please keep changes small and focused. If you plan a large refactor (DB change, API redesign), open an issue first.
Available Tools
5 toolsadd_expenseC
Add a new expense entry 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?
No annotations provided. The description only states the action but lacks details on idempotency, side effects, or data validation.
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?
Single sentence, concise but lacks structure or front-loading of key information.
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?
With five parameters, no output schema, and no annotations, the description is incomplete; it does not explain return values or handle edge cases.
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 coverage is 0%. The description adds no meaning to any of the five parameters, not even the required date, amount, or category.
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 ('Add') and resource ('expense entry'), clearly distinguishing it from siblings like delete_expense and list_expenses.
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 on when to use this tool versus alternatives. Siblings exist but no differentiation is provided.
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 entry by its ID.
| Name | Required | Description | Default |
|---|---|---|---|
| expense_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
As a destructive tool with no annotations, the description fails to disclose important behavioral traits such as permanence, required permissions, or potential side effects. 'Delete' implies mutation but lacks further detail.
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 with no extraneous information. However, for a destructive tool, it is overly brief and sacrifices necessary detail.
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, no output schema, and a single parameter, the description is incomplete. It omits return values, error handling, and prerequisites for safe deletion.
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?
With 0% schema description coverage, the description adds minimal value. It mentions 'by its ID' but does not explain the format, source, or constraints of expense_id.
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 resource ('expense entry') with a clear method ('by its ID'). It distinguishes from siblings like add_expense, list_expenses, and update_expense.
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 only states how to delete (by ID) but provides no context on when to use this tool versus alternatives, prerequisites (e.g., existence of expense), or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_expensesC
List expense entries within an inclusive date range.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | Yes | ||
| end_date | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It only states basic read-only behavior without mentioning pagination, limits, ordering, or potential side effects, leaving significant gaps.
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 key information. It is appropriately brief, though it could benefit from additional context without sacrificing conciseness.
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 simplicity with 2 required parameters and no output schema, the description should cover return format or data structure. It fails to mention what the response contains, leaving the agent uncertain about the output.
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 0% description coverage, so the description must compensate. It clarifies the date range is inclusive but does not specify date format, timezone handling, or parameter constraints beyond the 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 verb 'List' and the resource 'expense entries', and specifies the scope as 'within an inclusive date range'. This explicitly differentiates it from sibling tools like add_expense, delete_expense, update_expense, and summarize.
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, no exclusion criteria, and no prerequisites. It merely states the function without context for decision-making.
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 an inclusive date range.
| 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?
With no annotations, the description must disclose behavioral traits. It mentions 'inclusive date range' but does not state that the tool is read-only, lacks details on return format, and omits any side effects or permissions.
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?
One sentence with no wasted words. It is front-loaded with the key action but could benefit from additional param details without becoming verbose.
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, no output schema, and 0% schema coverage, the description is insufficient. It fails to provide parameter details, return value expectations, or usage context beyond the basic purpose.
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 coverage is 0%. The description mentions 'category' as a grouping field but does not clarify its optionality or the expected format for date parameters. It adds minimal value beyond the schema structure.
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?
Description clearly states the tool summarizes expenses by category within a date range. The verb 'summarize' and resource 'expenses' are specific, and the grouping by 'category' distinguishes it from sibling tools that perform CRUD operations.
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 explicit when-to-use or when-not-to-use guidance. The usage is implied by the tool name and siblings, but no alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_expenseC
Update an existing expense entry.
| Name | Required | Description | Default |
|---|---|---|---|
| expense_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?
The description implies a mutation but provides no details on side effects, permissions required, or whether the update merges or replaces fields. With no annotations, the description fails to disclose behavioral traits.
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 (5 words) but at the expense of essential information. It does not earn its place as it omits critical details such as parameter usage, return behavior, or optional field handling.
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 6 parameters (4 required) and no output schema. The description provides no context about return values, update behavior (e.g., partial vs. full replacement), or error handling. It is severely incomplete for an update operation.
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%, and the description adds no information about parameter meaning, format, constraints, or default behavior. While parameter names are somewhat self-explanatory, the description does not compensate for the lack of schema documentation.
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 ('Update') and the resource ('an existing expense entry'). It differentiates from siblings like add_expense (create new) and delete_expense (remove). However, it lacks specificity on which fields can be updated.
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. There is no mention of prerequisites, context, or conditions for updating an expense.
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. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
add_expense - First observed
delete_expense - First observed
list_expenses - First observed
summarize - First observed
update_expense
TDQS
Each tool has a clearly distinct purpose: add, delete, list, summarize, and update. No overlap or ambiguity.
Four tools follow verb_noun pattern (add_expense, delete_expense, list_expenses, update_expense), but 'summarize' lacks a noun, which is a minor inconsistency.
Five tools is well-scoped for an expense tracker, covering essential operations without being excessive or insufficient.
CRUD operations are present (add, delete, update) along with listing and summarization. Missing a get_expense by ID, but list by date range covers retrieval adequately. Minor gap in filtering without summary.
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
- ManiloOAuthapp.manilo
Log, query, and edit expenses, budgets, and accounts in Manilo from any MCP-compatible AI assistant.
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
Hosted MCP server for Mini Accountant: invoices, expenses, customers, analytics, tax estimates.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA lightweight server built with FastMCP and SQLite for managing personal finances. It allows users to add, list, and summarize expenses by category through MCP-compatible clients.-
- FlicenseNot gradedqualityDmaintenanceA local MCP server for tracking personal expenses using SQLite, enabling users to add, list, and summarize expenses via natural language.-
- FlicenseNot gradedqualityCmaintenanceAn MCP server that enables any MCP-compatible client to add, list, and summarize expenses through natural conversation, using FastMCP and aiosqlite for async database operations.-
- FlicenseNot gradedqualityBmaintenanceA lightweight MCP server that lets LLM clients track, query, and summarize personal expenses using a local SQLite database.-
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/SAYOUNCDR/Expense-Tacker-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server