Skip to main content
Glama
navalmishra

Expense Tracker MCP

by navalmishra

Expense Tracker MCP

An AI-powered Expense Tracker built using FastMCP and SQLite. This project exposes expense management capabilities as MCP tools, allowing AI assistants such as Claude Desktop to interact with a persistent expense database through the Model Context Protocol (MCP).


Features

  • Add new expenses

  • List expenses within a date range

  • Update existing expenses

  • Delete expenses

  • Summarize expenses by category

  • Expose expense categories as an MCP Resource

  • Persistent local storage using SQLite


Related MCP server: Expense Tracker MCP Server

Tech Stack

  • Python 3.11+

  • FastMCP

  • SQLite

  • JSON

  • MCP (Model Context Protocol)


Project Structure

Expense-Tracker-MCP/
│
├── main.py               # FastMCP server
├── database.py           # Database operations
├── categories.json       # Expense categories
├── expenses.db           # SQLite database (generated at runtime)
├── pyproject.toml
├── uv.lock
└── README.md

MCP Tools

Tool

Description

add_expense

Add a new expense

list_expenses

Retrieve expenses between two dates

update_expense

Update an existing expense

delete_expense

Delete an expense by ID

summarize_expenses

Summarize expenses by category


MCP Resources

expense://categories

Returns the list of supported expense categories and subcategories from categories.json.


Installation

Clone the repository:

git clone https://github.com/navalmishra/Expense-Tracker-MCP.git
cd Expense-Tracker-MCP

Install dependencies:

uv sync

or

pip install -e .

Running the Server

Start the FastMCP server:

python main.py

The server starts at:

http://localhost:8000/mcp

Connecting with Claude Desktop

Add the server to your Claude Desktop configuration:

{
  "mcpServers": {
    "expense-tracker": {
      "command": "python",
      "args": [
        "/path/to/main.py"
      ]
    }
  }
}

Restart Claude Desktop, and the Expense Tracker tools will be available automatically.


Example Workflow

Ask Claude:

Add an expense of ₹500 for groceries today.

Claude calls:

add_expense(...)

Ask:

Show my expenses for this month.

Claude calls:

list_expenses(...)

Ask:

Summarize my food expenses.

Claude calls:

summarize_expenses(...)

Database

The application uses SQLite for local persistence.

The database is created automatically on the first run if it does not already exist.


Future Improvements

  • Category validation using categories.json

  • Pydantic models for input validation

  • Monthly and yearly reports

  • Expense analytics

  • Budget tracking

  • Cloud database support (PostgreSQL/Turso)

  • Authentication

  • Deployment on FastMCP Cloud


Learning Objectives

This project demonstrates:

  • Building custom MCP servers

  • Creating MCP Tools and Resources

  • Integrating SQLite with FastMCP

  • Persistent AI applications

  • Connecting custom MCP servers with Claude Desktop

  • Deploying MCP servers to FastMCP Cloud


License

This project is licensed under the MIT License.

F
license - not found
Not graded
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
    B
    quality
    D
    maintenance
    MCP server for tracking personal expenses using FastMCP and SQLite, enabling adding, listing, updating, deleting expenses and summarizing by category via natural language tools.
    5
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    A powerful SQLite-backed expense tracking server built with the Model Context Protocol (MCP). This server allows AI agents (like Claude) to manage your personal finances by adding, deleting, and listing expenses directly from your chat interface.
  • F
    license
    Not graded
    quality
    C
    maintenance
    An 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.
  • F
    license
    Not graded
    quality
    C
    maintenance
    A personal expense tracker exposed over MCP, enabling users to log and query expenses in natural language sentences. It features category inference, recurring expenses, soft deletes, and SQLite storage with no external database.

View all related MCP servers

Related MCP Connectors

  • Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.

  • Agent Cost Allocator MCP — multi-tenant LLM cost attribution for chargeback billing. Companion to

  • 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/navalmishra/Expense-Tracker-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server