AdvancedExpenseTracker
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., "@AdvancedExpenseTracker Log a $45 dinner expense under Food, paid by credit card, for yesterday."
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.
AdvancedExpenseTracker (FastMCP)
An AI-powered Expense & Budget Management MCP Server built using FastMCP, SQLite, and Python.
This project exposes structured financial tools (expenses, income, budgets, recurring bills, analytics) that can be used by an LLM (like Claude Desktop or Cursor) as a personal financial advisor.
π Features Overview
β Expense Tracking: Categories, subcategories, tags, notes, and payment methods.
β Income & Cashflow: Log earnings and analyze net savings in real-time.
β Recurring Engine: Auto-generate daily, weekly, monthly, or yearly bills.
β Smart Budgeting: Set limits per category and get "Over Budget" warnings.
β Search & Filtering: Find transactions by note, tag, or amount.
β Metadata Management: Dynamic control over valid categories & payment methods.
β Zero-Setup Database: SQLite database initializes automatically.
Related MCP server: financial-agent
ποΈ Architecture
AdvancedExpenseTracker
β
βββ expenses.db # SQLite database (auto-created on first run)
βββ metadata.json # Categories & payment methods (auto-created)
βββ main.py # MCP server implementation
βββ README.mdπ¦ Tech Stack
Python 3.10+
FastMCP (The only external dependency)
SQLite (Built-in, serverless storage)
uv (For ultra-fast dependency management)
βοΈ Installation (using uv)
This project is designed to run instantly with uv. You do not need to manually create virtual environments.
1οΈβ£ Install uv (if not installed)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"2οΈβ£ Clone the Repository
git clone <your-repo-url>
cd AdvancedExpenseTracker3οΈβ£ Test Run
You can verify the script works without installing anything globally:
uv run --with fastmcp main.pyOn the first run, this will create expenses.db and metadata.json automatically.
π Configuration (Connect to AI)
To use this with Claude Desktop or Cursor, you need to tell them where the script is.
Option A: Claude Desktop App
Open your config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following (Replace
/ABSOLUTE/PATH/TO/with your real file path):
{
"mcpServers": {
"finance": {
"command": "uv",
"args": [
"run",
"--with",
"fastmcp",
"/ABSOLUTE/PATH/TO/main.py"
]
}
}
}Option B: Cursor (IDE)
Go to Cursor Settings > Features > MCP.
Click + Add New MCP Server.
Name:
Expense TrackerType:
commandCommand:
uv run --with fastmcp /ABSOLUTE/PATH/TO/main.py
π§ MCP Capabilities (Detailed)
π Expense Management
β Add Expense
add_expense(
date="2026-01-05",
amount=250,
category="Food",
subcategory="Dining",
payment_method="Credit Card",
note="Dinner with friends",
tags="restaurant,weekend"
)βοΈ Update Expense
Update only the fields you want to change:
update_expense(expense_id=1, amount=300, note="Updated bill amount")β Delete Expense
delete_expense(expense_id=1)π List Expenses
list_expenses(
start_date="2026-01-01",
end_date="2026-01-31",
category="Food",
limit=50
)π Search Expenses
Search across category, subcategory, notes, and tags:
search_expenses(query="restaurant")π° Income & Cashflow
β Add Income
add_income(
date="2026-01-01",
amount=5000,
source="Salary",
note="January Paycheck"
)π Cashflow Analysis
get_cashflow(start_date="2026-01-01", end_date="2026-01-31")Returns:
{
"total_income": 5000,
"total_expenses": 1800,
"net_savings": 3200,
"savings_rate": "64.0%"
}π Recurring Expenses Engine
β Add Recurring Expense
add_recurring_expense(
name="Netflix",
amount=15.99,
category="Entertainment",
frequency="monthly",
start_date="2026-01-01"
)Supported frequencies: daily, weekly, monthly, yearly.
π Process/Refresh Bills
Run this to generate actual expense entries from your templates:
process_recurring_expenses(target_date="2026-03-31")π Budgeting & Alerts
π― Set Monthly Budget
set_monthly_budget(category="Food", amount=500)π Budget Report
get_budget_report(month_str="2026-01")Status logic:
β OK
β οΈ WARNING (>90% used)
β OVER BUDGET
π§Ύ Metadata Management
π₯ Get Metadata (Resource)
The AI reads this to know which categories are allowed.
expense://metadataβ Manage Categories/Methods
manage_metadata(action="add", type="categories", value="Education")
manage_metadata(action="remove", type="payment_methods", value="Cash")π€ Built-in LLM Prompt
π§ Financial Advisor Prompt
financial_advisor()This prompt instructs the LLM to:
Act as a data-driven financial advisor.
Always validate metadata before logging.
Prioritize cashflow health and budget warnings.
Proactively manage recurring subscriptions.
π Data Safety
All data is stored locally in
expenses.db.No external API calls or cloud syncing.
To backup your data, simply copy the
.dbfile.
π License
MIT License β free to use, modify, and distribute.
π Author
Anubhab Das
Available Tools
12 toolsadd_expenseC
Add a new expense. Date must be YYYY-MM-DD.
Inputs: date (required), amount (required), category (required), note, +3 more. Returns: result
add_incomeC
Log income (salary, freelance, etc).
Inputs: date (required), amount (required), source (required), note. Returns: result
add_recurring_expenseC
Set up a recurring bill. Frequency: 'daily', 'weekly', 'monthly', 'yearly'.
Inputs: name (required), amount (required), category (required), frequency (required), +1 more. Returns: result
delete_expenseC
Permanently delete an expense.
Inputs: expense_id (required). Returns: result
get_budget_reportA
Check spending vs budget for a specific month (YYYY-MM).
Inputs: month_str (required). Returns: result
get_cashflowC
Calculate Net Cashflow (Income - Expenses).
Inputs: end_date (required), start_date (required). Returns: object
list_expensesC
List expenses in a date range.
Inputs: end_date (required), start_date (required), limit, category. Returns: result
manage_metadataC
Add items to lists. action: 'add' or 'remove' type: 'categories' or 'payment_methods' value: The name to add/remove
Inputs: type (required), value (required), action (required). Returns: result
process_recurring_expensesA
Generate actual expense entries from recurring templates up to the target_date. Run this when the user asks to 'refresh' or 'check for new bills'.
Inputs: target_date (required). Returns: result
search_expensesB
Search expenses by matching text in notes, category, or tags.
Inputs: query (required). Returns: result
set_monthly_budgetC
Set a monthly limit for a specific category.
Inputs: amount (required), category (required). Returns: result
update_expenseB
Update an existing expense. Only provide fields to change.
Inputs: expense_id (required), date, note, tags, +4 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 12 tools
Each tool targets a fairly distinct resource+action (expense CRUD, income, budget, recurring, metadata), and descriptions clarify the tricky pairs like add_recurring_expense vs process_recurring_expenses. The main soft spots are list_expenses vs search_expenses (both return filtered expense sets) and get_cashflow being derivable from expense/income data, but these are reasonably separable.
All twelve names are snake_case verb_noun (add_expense, update_expense, set_monthly_budget, get_budget_report), with no style mixing. The pattern reads predictably and maps cleanly to actions.
Twelve tools is squarely in the ideal 3-15 range and each maps to a real workflow (expenses, income, recurring bills, budgets, metadata). No tool appears redundant or filler.
Expense lifecycle is fully covered (add/update/delete/list/search), but income only has add_income with no update/delete/list, and recurring bills have no way to list or cancel templates once created. Budget also lacks a remove/clear operation, leaving several dead ends an agent will hit.
Maintenance
Related MCP Connectors
Personal finance ledger for AI agents β query spending, track bills, forecast cash flow.
Personal finance, bank account, and shared memory connector for Claude, ChatGPT, Gemini Spark & more
Household finance memory, budgets, transactions, and monthly reviews for AI assistants.
Track budgets from your AI chat: envelopes, monthly limits, variance reports. All data is local.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage personal expenses through natural language conversations. Supports adding, searching, and analyzing transactions with automatic categorization and financial insights.3MIT
- AlicenseBqualityCmaintenanceEnables AI agents to manage personal finances with deterministic, grounded tools for cash-flow projection, drift detection, reconciliation, and Todoist integration. All figures trace back to a local SQLite database.55MIT
- AlicenseNot gradedqualityBmaintenanceEnables personal finance management through natural language, including tracking income/expenses, categories, loans, subscriptions, budgets, and AI-powered insights, all backed by a local SQLite database.1MIT
- FlicenseAqualityCmaintenanceEnables LLMs to record, list, update, and delete expenses and credits in a local SQLite database, with enforced categories and running balance summaries.8-