Skip to main content
Glama
personal-finance-mcp

personal-finance-mcp

by JosueM1109

personal-finance-mcp

License: MIT Python 3.11+ MCP

No oficial. Este proyecto no está afiliado, respaldado ni patrocinado por Plaid Inc. "Plaid" es una marca comercial de Plaid Inc. Este es un cliente autohospedado que se comunica con la API de Plaid utilizando las credenciales que usted proporcione.

Un servidor MCP de solo lectura y autohospedado que conecta sus bancos, tarjetas de crédito, préstamos y cuentas de corretaje (a través de Plaid) a un cliente MCP como Claude Code. Haga preguntas sobre sus propias finanzas en inglés sencillo, sin involucrar a agregadores de terceros (Monarch, Mint, etc.).

Qué puede preguntar

  • "¿Cuál es mi saldo total en todas las cuentas?"

  • "Muéstrame las transacciones de más de $100 en los últimos 30 días."

  • "¿Qué suscripciones sigo pagando?"

  • "¿Cuánto gasté en comestibles el mes pasado?"

  • "¿Algún banco necesita reautenticación?"

Sesión de ejemplo (ilustrativa):

you    : What did I spend on groceries last month?
claude : [calls get_transactions]
         $487.23 across 14 transactions. Top merchants:
         Whole Foods ($198), Trader Joe's ($156), Safeway ($89).

you    : Any subscriptions I'm still paying for?
claude : [calls get_recurring_transactions]
         7 active recurring outflows totaling $142/mo:
         Netflix ($15.99), Spotify ($11.99), NYT ($4), ...

Related MCP server: FinLynq

Herramientas

Las 9 herramientas son de solo lectura. Cada una devuelve {<data>: [...], "warnings": [...]} para que un banco con problemas no interrumpa toda la consulta.

Herramienta

Qué hace

list_accounts

Todas las cuentas de cada banco vinculado, con saldos

get_balances

Saldos actuales + disponibles en tiempo real (opcionalmente filtrados por cuenta)

get_transactions

Transacciones en un rango de fechas (hasta 2 años atrás)

search_transactions

Búsqueda por palabras clave en comercio / nombre / contraparte

get_recurring_transactions

Flujos de entrada + salida recurrentes detectados

get_liabilities

Tarjetas de crédito, préstamos estudiantiles, hipotecas con TAE y detalles de pago

get_investment_holdings

Tenencias actuales con símbolo + metadatos de seguridad

get_investment_transactions

Historial de compra / venta / dividendos en un rango de fechas

get_institutions_status

Estado de salud de cada banco vinculado (muestra necesidades de reautenticación)

Inicio rápido

Requiere Python 3.11+, una cuenta de Plaid (plan de prueba gratuito) y un cliente MCP.

1. Configuración de Plaid

  1. Regístrese en https://dashboard.plaid.com/signup → elija el plan Trial (gratuito, 10 elementos).

  2. Team Settings → Products: habilite Transactions, Liabilities, Investments.

  3. Team Settings → API: copie su client_id y su secret de producción.

2. Instalación

git clone https://github.com/JosueM1109/personal-finance-mcp.git
cd personal-finance-mcp
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # then fill in PLAID_CLIENT_ID and PLAID_SECRET
pytest -v              # sanity check

3. Vincular cada banco

Ejecute una vez por cada banco que desee conectar:

uvicorn link_helper:app --port 8765

Abra http://localhost:8765, haga clic en Link a bank y complete Plaid Link. La terminal imprimirá una línea como PLAID_TOKEN_CHASE=access-prod-xxx...: péguela en .env y repita para cada banco.

4. Ejecución

python server.py   # serves on http://localhost:8000/mcp

5. Agregar a Claude Code

claude mcp add --transport http personal-finance http://localhost:8000/mcp

Pruebe "list my accounts" para confirmar.

Despliegue

Para un despliegue que pueda usar desde cualquier lugar:

  • Docker (incluido): docker build -t personal-finance-mcp . && docker run --rm -p 8000:8000 --env-file .env personal-finance-mcp

  • Cualquier host de Python (Fly.io, Railway, Raspberry Pi + Tailscale, un VPS): configure las variables de entorno desde .env.example, exponga /mcp a través de HTTPS y protéjalo con autenticación.

  • Prefect Horizon (lo que usa el autor, costo recurrente de $0): consulte docs/DEPLOYMENT.md para ver el tutorial completo.

Proteja el endpoint. Un endpoint MCP expuesto con sus tokens filtra todas las cuentas vinculadas. Use OAuth 2.1, Cloudflare Access o vincúlelo solo a una red privada.

Seguridad

  • Inquilino único. Un despliegue por persona. No comparta.

  • Solo lectura. Ninguna herramienta modifica el estado en ninguna institución. No agregue ninguna que lo haga.

  • Los tokens viven en variables de entorno, nunca en el disco. .env está ignorado por git.

  • Usted es responsable del cumplimiento de Plaid. Usted es el cliente de Plaid bajo su propia cuenta.

Antes de cada despliegue:

  • [ ] .env nunca confirmado: git log --all -- .env no devuelve nada

  • [ ] Sin tokens reales en el historial: git log -S'access-prod-' --all solo devuelve marcadores de posición

  • [ ] Puerta de autenticación frente al endpoint MCP (o solo localhost)

  • [ ] HORIZON=1 (o similar) configurado en el entorno de despliegue, bloqueando link_helper.py allí

  • [ ] Verifique get_institutions_status() cada pocas semanas para ver si hay necesidades de reautenticación

Solución de problemas

La herramienta devuelve vacío a pesar de haber datos reales. Los productos de Plaid no estaban habilitados cuando vinculó el banco. Vuelva a vincular con Transactions + Liabilities + Investments activos. La herramienta muestra PRODUCTS_NOT_SUPPORTED en warnings cuando esta es la causa.

get_institutions_status() muestra re_auth_required. La sesión de Plaid del banco expiró. Ejecute link_helper.py en modo de actualización: su token de acceso existente sigue siendo el mismo. Consulte docs/DEPLOYMENT.md.

Plaid Link muestra un banco como "no compatible" (común con Amex). Por lo general, es un problema de INSTITUTION_REGISTRATION_REQUIRED: los bancos OAuth necesitan primero el registro por institución en el panel de Plaid. Consulte docs/TROUBLESHOOTING.md.

Más problemas: docs/TROUBLESHOOTING.md.

Arquitectura

  • server.py — Servidor FastMCP, 9 herramientas de solo lectura.

  • plaid_client.py — Envoltorio del SDK de Plaid: redacción de tokens SecretStr, caché de salud de 5 minutos por elemento, modelado de respuestas, mapeo de errores estructurado.

  • link_helper.py — Aplicación FastAPI solo local para Plaid Link. Se niega a ejecutarse si HORIZON=1 está configurado.

Análisis más profundo (incluyendo por qué /transactions/get sobre /transactions/sync): docs/ARCHITECTURE.md.

Contribución

Consulte CONTRIBUTING.md. El alcance es deliberadamente limitado: solo lectura, inquilino único, respaldado por Plaid.

Available Tools

9 tools
get_balancesGet BalancesA
Read-only

Get live current + available balances for accounts.

Inputs: account_ids. Returns: object

get_institutions_statusGet Institutions StatusA
Read-only

Return health status for every linked Item/institution.

No additional network calls beyond what all_items already makes (it uses the 5-minute health cache). Enumerates linked Items and reports their current health status.

Returns: {"items": [{"env_key", "institution", "institution_id", "status", "reason"}, ...]}

Inputs: no named parameters. Returns: object

get_investment_holdingsGet Investment HoldingsA
Read-only

Return investment holdings with security metadata across all linked Items.

Joins holdings with the securities list returned in the same response to provide symbol, name, and security type. Adds institution to each holding.

Returns: {"holdings": [...], "warnings": [...]}

Inputs: no named parameters. Returns: object

get_investment_transactionsGet Investment TransactionsA
Read-only

Fetch investment transactions in [start_date, end_date] across all healthy Items.

Dates are ISO YYYY-MM-DD. Uses offset pagination (count=500 per page). If start_date is older than ~2 years before end_date, the window is clipped and a warning is emitted. Each transaction is joined with security metadata (ticker symbol, name) from the same response.

Returns: {"investment_transactions": [...], "warnings": [...]}

Inputs: start_date (required), end_date (required). Returns: object

get_liabilitiesGet LiabilitiesA
Read-only

Return credit, student-loan, and mortgage liability details across all linked Items.

For Items where the liabilities product is not enabled, a per-Item warning with code PRODUCTS_NOT_SUPPORTED is emitted instead of failing the call.

Returns: {"credit": [...], "student": [...], "mortgage": [...], "warnings": [...]}

Inputs: no named parameters. Returns: object

get_recurring_transactionsGet Recurring TransactionsA
Read-only

Return recurring inflow and outflow streams across all linked Items.

Calls /accounts/get first per Item to collect account IDs (required by /transactions/recurring/get), then fetches recurring streams and shapes them into unified inflows/outflows lists.

Returns: {"inflows": [...], "outflows": [...], "warnings": [...]}

Inputs: no named parameters. Returns: object

get_transactionsGet TransactionsA
Read-only

Fetch transactions in [start_date, end_date] across all healthy Items.

Dates are ISO YYYY-MM-DD. Uses Plaid /transactions/get with offset pagination (count=500 per page). If start_date is older than ~2 years before end_date, the window is clipped and a warning is emitted.

Inputs: start_date (required), end_date (required), account_ids. Returns: object

list_accountsList AccountsA
Read-only

List every account across all linked Items, with balances.

Returns: {"accounts": [...], "warnings": [...]}. Warnings describe Items that are unhealthy (re-auth required, etc.) or hit API errors on this call.

Inputs: no named parameters. Returns: object

search_transactionsSearch TransactionsA
Read-only

Search transactions by keyword across merchant, name, and counterparty names.

Fetches transactions in [start_date, end_date] and filters them with a case-insensitive substring match against:

  • merchant_name

  • name

  • counterparties[].name

The match is performed on the raw Plaid payload before shaping so that counterparty names (which are dropped by shape_transaction) are searchable. Dates are ISO YYYY-MM-DD. The window is clipped to ~2 years and a WINDOW_CLIPPED warning is emitted when applicable.

Returns: {"transactions": [...], "warnings": [...]}

Inputs: query (required), start_date (required), end_date (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of personal finance data (balances, transactions, investments, liabilities, etc.), with clear boundaries. There is no overlap in functionality; even transaction-related tools distinguish between regular, investment, recurring, and search operations.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case, primarily using 'get_' for retrieval and 'list_' for accounts, which is predictable and unambiguous.

    Tool Count5/5

    With 9 tools, the server is well-scoped for a personal finance data aggregator. Each tool serves a clear purpose without redundancy, covering core financial data retrieval needs.

    Completeness4/5

    The tool surface covers most essential read operations for personal finance: accounts, balances, transactions (multiple types), liabilities, and holdings. Minor gaps such as lack of categorization or income/expense summaries are acceptable for a focused data provider.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A read-only MCP server that enables users to analyze their real bank, credit card, loan, and brokerage data through Plaid. It provides financial analysis tools for transactions, balances, investments, liabilities, and debt while keeping all access tokens and data locally stored.
      24
      MIT
    • A
      license
      B
      quality
      A
      maintenance
      open-source personal finance app with a first-party MCP server. 91 HTTP tools (OAuth 2.1 + DCR) and 87 stdio tools cover transactions, budgets, accounts, portfolio analytics, FX conversion, loans, subscriptions, goals, importers, and rules. Users self-host with Docker + PostgreSQL or use the managed cloud
      89
      38
      AGPL 3.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables self-hosted personal finance management for MCP clients by connecting read-only bank accounts via SimpleFIN, syncing transactions into a local SQLite database, and exposing tools to query balances, spending, budgets, cash flow, and net worth.
      -
    • A
      license
      B
      quality
      C
      maintenance
      A read-only MCP server that lets AI clients query real financial data (bank, credit card, loan, brokerage) via Plaid or Teller, offering tools for balances, transactions, investments, liabilities, identity, income, and debt analysis.
      24
      MIT