Skip to main content
Glama
SpendWise MCP

SpendWise MCP

SpendWise MCP πŸ“Š

CI

SpendWise is a secure, multi-tenant expense-tracking server exposed through the Model Context Protocol (MCP). It allows AI agents (like Claude, Grok, or Cursor) to manage personal finances, analyze spending habits, enforce budgets, and send real-time Telegram alerts.

Built with a focus on production-grade security, strict data validation, and multi-tenant data isolation.

✨ Key Features

🧾 Core Expense Management

  • Full CRUD: Create, read, update, and soft-delete expenses.

  • Idempotency & Safety: Prevents accidental duplicate entries and safely handles network retries using idempotency keys.

  • Multi-Currency Support: Tracks expenses in any 3-letter currency code (INR, USD, EUR, etc.) without mixing them.

πŸ“ˆ Financial Analytics

  • Spending Summaries: Aggregate active spending by category, month, or merchant over custom date ranges.

  • Period Comparison: Compare spending across two date ranges with absolute and percentage changes.

πŸ’° Budget Management & Alerts

  • Dynamic Budgets: Set weekly or monthly spending limits per category (upsert logic).

  • Status Tracking: Automatically calculates budget health (🟒 Healthy, 🟑 Warning at 80%, πŸ”΄ Over Budget at 100%).

  • Telegram Alerts: Sends real-time notifications via the CallMeBot API when budgets are at risk.

πŸ” Multi-Tenant Security

  • Strict Isolation: Every expense and budget is scoped to the authenticated user.

  • Dual Auth: Supports Auth0 RS256 JWTs for production and legacy API keys for local testing.

  • Server-Side Identity: User identity is derived strictly from verified JWT claims, preventing client-side spoofing.


Related MCP server: Personal Expense Tracker MCP

πŸ›  Tech Stack

  • Core: Python 3.12, MCP SDK (Streamable HTTP), Starlette, Uvicorn

  • Database: SQLAlchemy 2.0, Alembic (Migrations), SQLite (Local), PostgreSQL (Production)

  • Validation: Pydantic V2 (Strict schemas, custom validators)

  • Auth: Auth0 (OAuth2 / JWT RS256)

  • Notifications: CallMeBot (Telegram API), httpx

  • Testing & CI: Pytest, Ruff (Lint/Format), GitHub Actions


πŸš€ Quick Start

Requirements

  • Python 3.12+

  • uv (Python package manager)

Local Setup

  1. Install dependencies:

    uv sync

PROJECT STRUCTURE

spendwise-mcp/ β”œβ”€β”€ .github/workflows/ # CI/CD pipeline (lint, test, migration checks) β”œβ”€β”€ alembic/versions/ # Database schema migrations β”œβ”€β”€ src/spendwise/ β”‚ β”œβ”€β”€ app.py # Starlette ASGI app & Auth middleware β”‚ β”œβ”€β”€ auth.py # Auth0 JWT & API key verification β”‚ β”œβ”€β”€ db.py # SQLAlchemy engine & session management β”‚ β”œβ”€β”€ models.py # Expense & Budget ORM models β”‚ β”œβ”€β”€ notifications.py # CallMeBot Telegram client β”‚ β”œβ”€β”€ schemas.py # Pydantic V2 validation schemas β”‚ └── server.py # MCP server & 14 tool definitions β”œβ”€β”€ tests/ # 66 isolated Pytest cases β”œβ”€β”€ render.yaml # Infrastructure as Code for Render └── pyproject.toml # Project metadata & dependencies

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      MCP server for ExpenseLM, a GenAI powered expense management application. Enables AI agents to access expense data for recording, insights, and advice.
      10
      23 PyPI
      1
      -
    • A
      license
      B
      quality
      C
      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
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables managing and analyzing personal expenses through MCP tools, including adding expense records, listing expenses within date ranges, and summarizing spending by category, with expense categories exposed as an MCP resource.
      -
    • F
      license
      B
      quality
      D
      maintenance
      Enables users to manage personal expenses by adding entries, listing them by date range, and summarizing spending by category through MCP tools, while exposing category data as a resource.
      3
      -