{
  "markdown": "# personal-finance-mcp\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![MCP](https://img.shields.io/badge/MCP-read--only-brightgreen.svg)](https://modelcontextprotocol.io)\n\n> **Unofficial.** This project is not affiliated with, endorsed by, or sponsored by Plaid Inc. \"Plaid\" is a trademark of Plaid Inc. This is a self-hosted client that talks to Plaid's API using credentials you supply.\n\nA self-hosted, read-only MCP server that connects your banks, credit cards, loans, and brokerage accounts (via Plaid) to an MCP client like Claude Code. Ask questions about your own finances in plain English — no third-party aggregator (Monarch, Mint, etc.) involved.\n\n## What you can ask\n\n- \"What's my total balance across all accounts?\"\n- \"Show me transactions over $100 in the last 30 days.\"\n- \"Which subscriptions am I still paying for?\"\n- \"How much did I spend on groceries last month?\"\n- \"Any bank that needs re-authentication?\"\n\nExample session (illustrative):\n\n```\nyou    : What did I spend on groceries last month?\nclaude : [calls get_transactions]\n         $487.23 across 14 transactions. Top merchants:\n         Whole Foods ($198), Trader Joe's ($156), Safeway ($89).\n\nyou    : Any subscriptions I'm still paying for?\nclaude : [calls get_recurring_transactions]\n         7 active recurring outflows totaling $142/mo:\n         Netflix ($15.99), Spotify ($11.99), NYT ($4), ...\n```\n\n## Tools\n\nAll 9 tools are read-only. Each returns `{<data>: [...], \"warnings\": [...]}` so one broken bank doesn't break the whole query.\n\n| Tool                          | What it does                                                         |\n| ----------------------------- | -------------------------------------------------------------------- |\n| `list_accounts`               | Every account across every linked bank, with balances                |\n| `get_balances`                | Live current + available balances (optionally filtered by account)   |\n| `get_transactions`            | Transactions in a date range (up to 2 years back)                    |\n| `search_transactions`         | Keyword search across merchant / name / counterparty                 |\n| `get_recurring_transactions`  | Detected recurring inflow + outflow streams                          |\n| `get_liabilities`             | Credit cards, student loans, mortgages with APRs and payment details |\n| `get_investment_holdings`     | Current holdings with symbol + security metadata                     |\n| `get_investment_transactions` | Buy / sell / dividend history in a date range                        |\n| `get_institutions_status`     | Health of each linked bank (surfaces re-auth needs)                  |\n\n## Quickstart\n\nRequires Python 3.11+, a Plaid account (free Trial plan), and an MCP client.\n\n### 1. Plaid setup\n\n1. Sign up at https://dashboard.plaid.com/signup → choose the **Trial** plan (free, 10 Items).\n2. **Team Settings → Products**: enable **Transactions**, **Liabilities**, **Investments**.\n3. **Team Settings → API**: copy your `client_id` and production `secret`.\n\n### 2. Install\n\n```bash\ngit clone https://github.com/JosueM1109/personal-finance-mcp.git\ncd personal-finance-mcp\npython3.11 -m venv .venv && source .venv/bin/activate\npip install -r requirements.txt\ncp .env.example .env   # then fill in PLAID_CLIENT_ID and PLAID_SECRET\npytest -v              # sanity check\n```\n\n### 3. Link each bank\n\nRun once per bank you want to connect:\n\n```bash\nuvicorn link_helper:app --port 8765\n```\n\nOpen http://localhost:8765, click **Link a bank**, complete Plaid Link. The terminal prints a line like `PLAID_TOKEN_CHASE=access-prod-xxx...` — paste it into `.env` and repeat for each bank.\n\n### 4. Run it\n\n```bash\npython server.py   # serves on http://localhost:8000/mcp\n```\n\n### 5. Add to Claude Code\n\n```bash\nclaude mcp add --transport http personal-finance http://localhost:8000/mcp\n```\n\nTry \"list my accounts\" to confirm.\n\n## Deployment\n\nFor a deployment you can use from anywhere:\n\n- **Docker** (included): `docker build -t personal-finance-mcp . && docker run --rm -p 8000:8000 --env-file .env personal-finance-mcp`\n- **Any Python host** (Fly.io, Railway, Raspberry Pi + Tailscale, a VPS): set the env vars from `.env.example`, expose `/mcp` over HTTPS, gate it with auth.\n- **Prefect Horizon** (what the author uses — $0 recurring cost): see [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for the full walkthrough.\n\n**Gate the endpoint.** An exposed MCP endpoint with your tokens leaks every linked account. Use OAuth 2.1, Cloudflare Access, or bind to a private network only.\n\n## Security\n\n- **Single-tenant.** One deployment per person. Don't share.\n- **Read-only.** No tool mutates state at any institution. Don't add any that do.\n- **Tokens live in env vars**, never on disk. `.env` is gitignored.\n- **You own Plaid compliance.** You're the Plaid customer under your own account.\n\nBefore each deploy:\n\n- [ ] `.env` never committed: `git log --all -- .env` returns nothing\n- [ ] No real tokens in history: `git log -S'access-prod-' --all` returns only placeholders\n- [ ] Auth gate in front of the MCP endpoint (or localhost-only)\n- [ ] `HORIZON=1` (or similar) set in deployment env, blocking `link_helper.py` there\n- [ ] Check `get_institutions_status()` every few weeks for re-auth needs\n\n## Troubleshooting\n\n**Tool returns empty despite real data.** Plaid products weren't enabled when you linked the bank. Re-link with Transactions + Liabilities + Investments active. The tool surfaces `PRODUCTS_NOT_SUPPORTED` in `warnings` when this is the cause.\n\n**`get_institutions_status()` shows `re_auth_required`.** The bank's Plaid session expired. Run `link_helper.py` in update mode — your existing access token stays the same. See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md#handling-item_login_required-re-auth).\n\n**Plaid Link shows a bank as \"unsupported\" (common with Amex).** Usually an `INSTITUTION_REGISTRATION_REQUIRED` issue — OAuth banks need per-institution registration in the Plaid dashboard first. See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md).\n\nMore issues: [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md).\n\n## Architecture\n\n- [server.py](server.py) — FastMCP server, 9 read-only tools.\n- [plaid_client.py](plaid_client.py) — Plaid SDK wrapper: `SecretStr` token redaction, 5-minute per-Item health cache, response shaping, structured error mapping.\n- [link_helper.py](link_helper.py) — Local-only FastAPI app for Plaid Link. Refuses to run if `HORIZON=1` is set.\n\nDeeper dive (including why `/transactions/get` over `/transactions/sync`): [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). Scope is deliberately narrow: read-only, single-tenant, Plaid-backed.\n",
  "bytes": 6860,
  "sha": "b319fa1339ef9147e6d0b23090c2afc2e13c1f7eb2d63e8a352827c62436e871",
  "repo_slug": "josuem1109/personal-finance-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_josuem1109_personal_finance_mc_4320f55d/readme"
}