Skip to main content
Glama
PranaPragada7

Expense Tracker MCP Server

Expense Tracker Agent

CI Python Streamlit SQLite MCP

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 --> UI

Claude 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

find_categoryadd_expense

Change yesterday's gas amount

search_expensesupdate_expense

Delete a matching purchase

search_expensesdelete_expense

Review monthly spending

monthly_summary

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.txt

For macOS or Linux, activate the environment with:

source .venv/bin/activate

Create a local environment file and add ANTHROPIC_API_KEY:

Copy-Item .env.example .env

Create the database schema and starter categories, then launch the app:

python db_setup.py
streamlit run streamlit_app.py

The 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.py

client_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_name

  • Expense management: add_expense, update_expense, delete_expense, list_expenses, search_expenses, expenses_by_category, total_expense_by_category, total_expense, monthly_summary

  • Supporting queries: current_date, find_category, get_expense, expenses_between

Project structure

Path

Purpose

streamlit_app.py

Form, assistant, and insights interface

agent.py

Claude tool-calling loop and command-line interface

server.py

Validated SQLite operations exposed as MCP tools

mcp_client.py

Reusable stdio MCP client

db_setup.py

Schema and starter-category initialization

client_test.py

End-to-end MCP tool smoke test

tests/

Automated database and UI checks

.github/workflows/ci.yml

Continuous-integration pipeline

Configuration

Variable

Required

Default

ANTHROPIC_API_KEY

Yes

ANTHROPIC_MODEL

No

claude-sonnet-5

AGENT_EFFORT

No

medium

EXPENSE_DB

No

expenses.db beside the source files

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 --reset
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    -
    quality
    D
    maintenance
    Enables 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.
  • F
    license
    -
    quality
    D
    maintenance
    Enables 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
  • F
    license
    C
    quality
    D
    maintenance
    Enables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.
    5
  • F
    license
    -
    quality
    C
    maintenance
    Enables management of expenses via SQLite database, including adding, listing, updating, deleting, filtering, and summing expenses through natural language.

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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