Skip to main content
Glama
keyurgit45

Expense Tracker MCP

by keyurgit45

Expense Tracker Backend

AI-powered expense tracking system with natural language interface, intelligent categorization, and real-time sync.

Architecture

The system uses a two-server architecture:

  1. MCP Server: Core expense tracking tools exposed via Model Context Protocol

  2. Gemini AI Server: FastAPI server providing chat interface with authentication

Related MCP server: Trackor

Features

  • šŸ¤– Natural language expense management via Gemini AI

  • 🧠 Intelligent categorization using embeddings and similarity search

  • šŸ” JWT authentication with Supabase

  • šŸ“Š Hierarchical categories for organization

  • šŸ·ļø Predefined tag system

  • šŸ“ˆ Real-time data sync

  • šŸ”„ Learning system that improves over time

Quick Start

Prerequisites

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Environment Setup

cp .env.example .env
# Add your credentials:
# - SUPABASE_URL
# - SUPABASE_KEY
# - GOOGLE_API_KEY (for Gemini)

Database Setup

Execute the SQL scripts in your Supabase SQL Editor:

# Core tables
scripts/create_tables.sql
# Embeddings support
scripts/create_embeddings_schema.sql

Run Both Servers

Terminal 1 - MCP Server:

python run_mcp.py

Terminal 2 - Gemini AI Server:

uvicorn app.servers.gemini.main:app --reload --port 8000

Initialize Data

# Populate categories
python scripts/populate_hierarchical_categories.py

# Populate predefined tags
python scripts/populate_predefined_tags.py

API Endpoints

Chat Interface

  • POST /chat - Send natural language commands

  • POST /auth/refresh - Refresh JWT token

MCP Tools (via chat)

  • Create expenses from natural language

  • Auto-categorize transactions

  • Get spending summaries

  • Analyze subscriptions

  • View recent transactions

Flutter Client

refer https://github.com/keyurgit45/expense-tracker-client

Testing

# Run all tests with mocks
ENVIRONMENT=test pytest tests/ -v

# Run specific components
ENVIRONMENT=test pytest tests/test_mcp_tools.py -v
ENVIRONMENT=test pytest tests/test_categorization.py -v

Project Structure

backend/
ā”œā”€ā”€ app/
│   ā”œā”€ā”€ core/              # Business logic
│   ā”œā”€ā”€ servers/
│   │   ā”œā”€ā”€ gemini/       # AI chat server
│   │   └── mcp/          # MCP tool server
│   └── shared/           # Shared configs
ā”œā”€ā”€ scripts/              # Utilities
└── tests/               # Test suite

AI Categorization

The system uses a hybrid approach:

  1. Generates embeddings for transactions using Sentence Transformers

  2. Finds similar past transactions using pgvector

  3. Uses weighted voting to predict categories

  4. Falls back to rule-based matching

  5. Learns from user confirmations

Development

  • API docs: http://localhost:8000/docs

  • Frontend integration: Configure CORS in Gemini server

  • MCP tools can be tested directly via chat interface

F
license - not found
-
quality - not tested
D
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 and manage personal expenses through natural language, including adding entries, filtering by date/category, viewing statistics, and exporting data in JSON or CSV format.
    3
  • F
    license
    -
    quality
    F
    maintenance
    An AI-powered financial management engine that enables budgeting, smart expense tracking, and affordability analytics via the Model Context Protocol. It allows AI assistants to interact with financial data through natural language for tasks like category detection, bulk expense ingestion, and budget impact predictions.
    1
  • F
    license
    -
    quality
    C
    maintenance
    An AI-powered expense management server that enables adding, searching, and analyzing expenses using natural language through the Model Context Protocol.

View all related MCP servers

Related MCP Connectors

  • Track, analyze, and act on your streaming and SaaS subscriptions from any AI agent.

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

  • Capture receipts, scan Gmail, analyze spending, and create reviewed reports from AI assistants.

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/keyurgit45/expense-tracker-mcp'

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