Expense Tracker MCP Server
Provides local SQLite database storage for expense tracking, enabling CRUD operations on expenses and categories.
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 to 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 Agent
An AI-powered personal expense tracker that turns natural-language requests into structured database operations. The project combines a responsive Streamlit interface, Claude tool use, an MCP server, and local SQLite storage.
What this project demonstrates
Agentic, multi-step tool use for real database workflows
A clean separation between the language model, MCP transport, and data layer
A direct Claude tool-calling loop without an orchestration framework
Input validation, scoped assistant behavior, and safe local data handling
Automated smoke tests and continuous integration
A responsive user interface for entry, conversation, and spending insights
Related MCP server: Expense Tracker MCP Server
Product features
Add expenses through a form or a natural-language request
Store the date, amount, category, and description for each transaction
Search, update, delete, and summarize expenses through MCP tools
Review totals, recent transactions, and category-level spending
Ask the focused financial assistant for database-backed insights
Keep expense data local in a SQLite file
Architecture
flowchart LR
U[User] --> UI[Streamlit or CLI]
UI --> A[Claude agent]
A -->|Tool request| C[MCP client]
C -->|stdio| S[MCP server]
S -->|DB-API 2.0| D[(SQLite)]
D --> S
S -->|Structured result| A
A --> UIClaude never accesses SQLite directly. It selects from the MCP tool schemas, and the server owns every validated database read and write.
Example agent workflows
User intent | Tool sequence |
Add a lunch expense |
|
Change yesterday's gas amount |
|
Delete a matching purchase |
|
Review monthly spending |
|
Technology
Layer | Technology |
Interface | Streamlit, pandas |
Language model | Anthropic Claude |
Agent integration | Direct Messages API tool-use loop |
Tool protocol | Model Context Protocol over stdio |
Data | SQLite through Python DB-API 2.0 |
Quality | pytest, Black, GitHub Actions |
Quick start
Requirements:
Python 3.11 or newer
An Anthropic API key for the assistant
Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtFor macOS or Linux, activate the environment with:
source .venv/bin/activateCreate a local environment file and add ANTHROPIC_API_KEY:
Copy-Item .env.example .envCreate the database schema and starter categories, then launch the app:
python db_setup.py
streamlit run streamlit_app.pyThe MCP server uses stdio and starts automatically when a client connects.
Quality checks
Install development dependencies and run the same checks used in CI:
python -m pip install -r requirements-dev.txt
python -m black --check .
python -m compileall -q agent.py client_test.py db_setup.py mcp_client.py server.py streamlit_app.py
python -m pytest -q
python client_test.pyclient_test.py exercises all 18 MCP tools and removes its temporary records
when the smoke test finishes.
MCP tools
The server exposes 18 tools:
Category management:
list_categories,add_category,rename_category,delete_category,get_category_nameExpense management:
add_expense,update_expense,delete_expense,list_expenses,search_expenses,expenses_by_category,total_expense_by_category,total_expense,monthly_summarySupporting queries:
current_date,find_category,get_expense,expenses_between
Project structure
Path | Purpose |
| Form, assistant, and insights interface |
| Claude tool-calling loop and command-line interface |
| Validated SQLite operations exposed as MCP tools |
| Reusable stdio MCP client |
| Schema and starter-category initialization |
| End-to-end MCP tool smoke test |
| Automated database and UI checks |
| Continuous-integration pipeline |
Configuration
Variable | Required | Default |
| Yes | — |
| No |
|
| No |
|
| No |
|
The .env file and expenses.db are excluded from Git. API keys and personal
expense data stay outside the repository.
To recreate the database with an empty expenses table:
python db_setup.py --resetThis server cannot be installed
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 Servers
- Flicense-qualityDmaintenanceEnables users to track personal expenses through natural language interactions with comprehensive category support and financial summaries. Provides both local and remote MCP server options with SQLite storage for fast expense management operations.
- Flicense-qualityDmaintenanceEnables AI assistants to manage personal expenses through natural conversation, supporting expense tracking, categorization, filtering, and financial summaries. Uses SQLite database to store expense records with full CRUD operations for comprehensive personal finance management.1
- FlicenseCqualityDmaintenanceEnables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.5
- Flicense-qualityCmaintenanceEnables management of expenses via SQLite database, including adding, listing, updating, deleting, filtering, and summing expenses through natural language.
Related MCP Connectors
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
GibsonAI MCP server: manage your databases with natural language
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
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/PranaPragada7/Expense_Tracker'
If you have feedback or need assistance with the MCP directory API, please join our Discord server