Skip to main content
Glama
bhuvpal

Personal Expense Tracker

by bhuvpal

Personal Expense Tracker

A simple expense tracking API built with FastAPI, SQLite, and FastMCP.

The project lets you add expenses, view them by date range, and get a quick summary of spending by category.

Features

  • Add a new expense

  • Store expenses in SQLite

  • Filter expenses by date range

  • Get spending totals by category

  • Optional category filtering for summaries

  • Expose the FastAPI app through an MCP server

Related MCP server: Expense Tracker MCP Server

Tech Stack

  • Python 3.12+

  • FastAPI

  • SQLite

  • Pydantic

  • FastMCP

  • uv

Project Structure

PersonalExpenseTracker/
│
├── main.py           # FastAPI application and API routes
├── server.py         # FastMCP server
├── categories.json   # Expense categories
├── pyproject.toml    # Project configuration
├── uv.lock           # Locked dependencies
├── .gitignore
└── README.md

Getting Started

Clone the repository:

git clone https://github.com/bhuvpal/PersonalExpenseTracker.git
cd PersonalExpenseTracker

Install dependencies:

uv sync

Run the FastAPI server:

uv run uvicorn main:app --reload

The API will be available at:

http://127.0.0.1:8000

FastAPI also provides interactive API documentation at:

http://127.0.0.1:8000/docs

API Endpoints

Method

Endpoint

Purpose

GET

/

Check if the API is running

POST

/expenses

Add an expense

GET

/expenses

Get expenses for a date range

GET

/expenses/summarize

Get spending summary by category

Example Expense

{
  "amount": 250,
  "date": "2026-09-04",
  "category": "Food",
  "sub_category": "Lunch",
  "note": "Lunch with friends"
}

MCP Server

The project also includes a FastMCP server that exposes the FastAPI application for MCP-based usage.

Run it with:

uv run python server.py

Database

Expenses are stored locally in a SQLite database.

Each expense contains:

  • Amount

  • Date

  • Category

  • Sub-category

  • Note

Why I Built This

I built this project to practice building APIs with FastAPI and explore how existing APIs can be exposed through Model Context Protocol (MCP).

Author

Bhuv Pal

GitHub: @bhuvpal

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

Related MCP Servers

  • F
    license
    Not graded
    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
    Not graded
    quality
    D
    maintenance
    Enables users to track expenses by adding, listing, and summarizing them with category support through natural language.
    -
  • F
    license
    A
    quality
    C
    maintenance
    Enables logging expenses, summarizing spending, and checking wallet balance through natural conversation using MCP.
    5
    -
  • A
    license
    B
    quality
    A
    maintenance
    Enables local tracking of personal expenses by adding, listing, summarizing, updating, and deleting expense records stored in a CSV file through an MCP client.
    5
    MIT

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/bhuvpal/PersonalExpenseTracker'

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