Skip to main content
Glama
mrmohdmaaz0786-cell

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

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
    1
    -
  • 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
  • F
    license
    Not graded
    quality
    B
    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
    C
    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
    -