Expense Tracker MCP
Utilizes Google's Gemini AI to enable a natural language interface for expense management, subscription analysis, and intelligent transaction categorization.
Integrates with Supabase to provide persistent storage for expenses, hierarchical categories, and transaction tags, utilizing pgvector for similarity-based categorization and JWT for authentication.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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:
MCP Server: Core expense tracking tools exposed via Model Context Protocol
Gemini AI Server: FastAPI server providing chat interface with authentication
Related MCP server: Expense_Tracker_MCP
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.txtEnvironment 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.sqlRun Both Servers
Terminal 1 - MCP Server:
python run_mcp.pyTerminal 2 - Gemini AI Server:
uvicorn app.servers.gemini.main:app --reload --port 8000Initialize Data
# Populate categories
python scripts/populate_hierarchical_categories.py
# Populate predefined tags
python scripts/populate_predefined_tags.pyAPI Endpoints
Chat Interface
POST /chat- Send natural language commandsPOST /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 -vProject Structure
backend/
βββ app/
β βββ core/ # Business logic
β βββ servers/
β β βββ gemini/ # AI chat server
β β βββ mcp/ # MCP tool server
β βββ shared/ # Shared configs
βββ scripts/ # Utilities
βββ tests/ # Test suiteAI Categorization
The system uses a hybrid approach:
Generates embeddings for transactions using Sentence Transformers
Finds similar past transactions using pgvector
Uses weighted voting to predict categories
Falls back to rule-based matching
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
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Track, analyze, and act on your streaming and SaaS subscriptions from any AI agent.
Track expenses from receipt photos, then search, summarize and update them from your AI assistant.
Track expenses from your AI chat: log, categorize, monthly CSV reports. All data is local.
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
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
- FlicenseNot gradedqualityDmaintenanceAn AI-powered expense management server that enables adding, searching, and analyzing expenses using natural language through the Model Context Protocol.-
- FlicenseCqualityDmaintenanceEnables logging, querying, and summarizing personal expenses via natural language, with tools for adding, listing, and aggregating spending by category.3-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage personal expenses via natural language through add, query, summarize, and delete expense tools.-