{
  "markdown": "# MyFinance MCP\n\nA remote MCP server for personal finance - log expenses by talking, snap receipt photos, import whole bank statements, and get budgets, trends and net worth computed for you, in any currency.\n\n**Website:** [myfinance-mcp.com](https://myfinance-mcp.com) · Free while in beta · Built by [Rteam](https://rteam.agency)\n\n## Quick Start\n\nAlready hosted and ready to use - just connect it to your MCP client:\n\n```\nhttps://myfinance-mcp.com/mcp\n```\n\n**On Claude.ai:** Customize → Connectors → **+** → Add custom connector → paste the URL → Connect. Leave the OAuth Client ID and Client Secret fields **empty** - filling them breaks sign-in.\n\n**On ChatGPT:** Settings → Apps → Create app → paste the URL → choose OAuth → Create.\n\nOn first connect you sign in with Google or register with an email and password. Your data persists across reconnections.\n\n## Why\n\n- **No app, no forms, no spreadsheet.** \"Spent 24.50 eur on groceries at Lidl\" is the whole workflow.\n- **Every number is computed in SQL.** The server owns the data and the math; the AI reads the results, it never guesses arithmetic.\n- **Any currency.** Transactions keep their original currency; the FX rate to your base currency is frozen at transaction date, so history never rewrites itself.\n- **Statements in one message.** Drop a CSV/PDF export; hundreds of rows import in one call with idempotent deduplication, hand-logged twins merged, totals reconciled.\n- **Personal vs business.** Entity tag on accounts and transactions, filterable everywhere, included in CSV export for your accountant.\n- **Dashboards in the chat.** Budgets, trends, summaries and accounts render as interactive panels (MCP Apps) right in the conversation.\n\n## Tech Stack\n\n- **Bun** - runtime and package manager\n- **Express** - HTTP layer\n- **MCP SDK** - Model Context Protocol over Streamable HTTP (stateless)\n- **OAuth 2.1** - PKCE + dynamic client registration, Google sign-in optional\n- **Prisma + PostgreSQL** - all money as `numeric`, all stats as SQL aggregates\n- **Docker** - single container deployment\n\n## MCP Tools\n\n| Tool                  | Description                                                                                        |\n| --------------------- | -------------------------------------------------------------------------------------------------- |\n| `log_expense`         | Record one purchase, bill or receipt (negative amount = refund)                                    |\n| `log_income`          | Record income: salary, invoice, refund, interest                                                   |\n| `log_transfer`        | Move money between accounts, cross-currency supported; never counts as spending                    |\n| `log_balance`         | Anchor an account's balance at a date; later flows compute from the snapshot                       |\n| `import_transactions` | Bulk statement import (up to 500 rows/call): dedup by bank reference or derived key, twin merge, reconciliation check |\n| `create_account`      | Create a bank / card / cash / investment account with currency and personal/business entity        |\n| `update_account`      | Rename an account or change its type, entity or main currency                                      |\n| `delete_account`      | Delete one money account (with its transactions after explicit confirmation)                       |\n| `merge_accounts`      | Fold one account into another: move rows, de-duplicate both sides, rewrite transfers               |\n| `get_accounts`        | All accounts with balances and net worth, converted to base currency                               |\n| `get_summary`         | Period totals by category, merchant or month; expense or income breakdown, category drill-down and exclusions |\n| `get_transactions`    | List and filter raw transactions                                                                   |\n| `get_trends`          | Month-over-month spending trends and deltas                                                        |\n| `set_budget`          | Monthly cap per category or overall                                                                |\n| `get_budget_progress` | Live budget progress with days left; renders as a dashboard                                        |\n| `update_transaction`  | Fix any field of an existing transaction, including its type (e.g. turn a cash withdrawal into a transfer); category fixes are remembered per merchant for future syncs |\n| `delete_transaction`  | Delete one transaction by id                                                                       |\n| `delete_transactions` | Bulk delete by ids                                                                                 |\n| `get_settings`        | Base currency and timezone                                                                         |\n| `update_settings`     | Change base currency or timezone                                                                   |\n| `export_transactions` | Full CSV export (includes the entity column for accountant handoff)                                |\n| `connect_bank`        | Link a real bank via open banking (Enable Banking, EU/UK): list banks, start consent, status, per-account sync toggle, disconnect |\n| `sync_bank`           | Pull booked transactions and balances from the connected bank; incremental, transfer pairing, dedup-safe. Healthy connections also auto-sync server-side roughly daily |\n| `connect_zenmoney`    | Link a ZenMoney account (international and .ru backends auto-detected) for read-only sync          |\n| `sync_zenmoney`       | Pull ZenMoney accounts and transactions; incremental, dedup-safe, keeps your manual edits          |\n| `delete_all_data`     | Permanently delete the user profile and ALL data (GDPR erasure)                                    |\n| `ping`                | Health and auth check                                                                              |\n\n## MCP Apps\n\nFour tools return an interactive dashboard (`ui://myfinancemcp/dashboard`) rendered directly in the chat on clients that support MCP Apps: budget rings, monthly trends, category summaries and the accounts/net-worth panel. Light and dark theme aware.\n\n## Security & Privacy\n\n- Receipt photos are parsed by YOUR AI client; images never reach this server.\n- Amounts, merchants and notes are never written to server logs (blind logs); telemetry stores event types and ids only.\n- OAuth 2.1 with PKCE, encrypted tokens, rate-limited sign-in.\n- All 27 tools carry MCP annotations (read-only and destructive ops flagged, connector tools marked open-world), so clients can gate confirmations correctly.\n- Bank access is strictly read-only: open banking consent via Enable Banking (the bank authenticates the user; we never see credentials), ZenMoney via the user's own API token. Session ids and tokens are stored AES-256-GCM encrypted.\n- CSV export and instant full deletion are tools, not support tickets.\n- Hosted instance: EU data residency, row-level security keyed to your account.\n- 154 automated end-to-end checks (full OAuth flow, every tool, import dedup semantics, GDPR deletion) run in CI and as a hard deploy gate.\n\nSee [SECURITY.md](SECURITY.md) for the disclosure policy.\n\n## Self-hosting\n\nMIT-licensed; runs anywhere Bun and Postgres run.\n\n### 1. Postgres\n\nAny PostgreSQL 15+ works. [Supabase](https://supabase.com) free tier is a good fit: create a project and copy the **session pooler** connection string (IPv4).\n\nApply the schema:\n\n```bash\nbun install\nbunx prisma db push\n```\n\n### 2. Environment variables\n\n| Variable                      | Description                                                        |\n| ----------------------------- | ------------------------------------------------------------------ |\n| `PORT`                        | Server port (default `8788`)                                       |\n| `BASE_URL`                    | Public URL of the server (OAuth issuer)                            |\n| `DATABASE_URL`                | Postgres connection string                                         |\n| `MYFINANCE_MCP_EMAIL`         | Bootstrap user email                                               |\n| `MYFINANCE_MCP_PASSWORD_HASH` | Bootstrap user password hash (see below)                           |\n| `GOOGLE_CLIENT_ID`            | _(optional)_ Google OAuth client ID for \"Continue with Google\"     |\n| `GOOGLE_CLIENT_SECRET`        | _(optional)_ Google OAuth client secret                            |\n| `RESEND_API_KEY`              | _(optional)_ Resend key for new-signup email notifications         |\n| `NOTIFY_EMAIL`                | _(optional)_ Where signup notifications go                         |\n| `FROM_EMAIL`                  | _(optional)_ Verified sender for notifications                     |\n| `AUTO_SYNC_INTERVAL_MS`       | _(optional)_ Bank auto-sync tick, default hourly (syncs connections >20h stale); `0` disables |\n\nGenerate the password hash:\n\n```bash\nbun -e \"console.log(await Bun.password.hash(process.argv[1]))\" 'your-password'\n```\n\n### 3. Run\n\n```bash\ndocker compose up -d      # uses the included Dockerfile, port 8788\n```\n\nPut nginx (or any TLS-terminating proxy) in front and point `BASE_URL` at your domain. The static landing in [`site/`](site/) is optional - serve it from the same origin if you want one.\n\n## Development\n\n```bash\nbun install\ncp .env.example .env   # fill in your values\nbun run dev            # hot reload on :8788\nbun run e2e            # self-contained end-to-end suite (spawns its own server)\nbun run lint\n```\n\nThe e2e suite (154 checks) covers the full OAuth flow (discovery, dynamic registration, PKCE, refresh rotation), every tool, statement-import dedup semantics, ZenMoney sync against a stubbed Diff API, and GDPR deletion.\n\n## API Endpoints\n\n| Endpoint                                       | Description                              |\n| ---------------------------------------------- | ---------------------------------------- |\n| `POST /mcp`                                    | MCP endpoint (Bearer auth)               |\n| `GET /health`                                  | Health check                             |\n| `GET /.well-known/oauth-authorization-server`  | OAuth metadata discovery                 |\n| `GET /.well-known/oauth-protected-resource/mcp`| Protected resource metadata              |\n| `POST /register`                               | Dynamic client registration              |\n| `GET /authorize`                               | OAuth authorization (sign-in page)       |\n| `POST /token`                                  | Token exchange                           |\n| `GET /auth/google`                             | Google sign-in start (when configured)   |\n| `GET /api/stats`                               | Public aggregate counters (counts only, never amounts) |\n\n## License\n\n[MIT](LICENSE) - Rteam FZE LLC\n",
  "bytes": 10917,
  "sha": "9154048bad419b3e02bda934f74b572be481de8b0533091de46a7182206ea0c3",
  "repo_slug": "alex-odoo/myfinance-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_alex_odoo_myfinance_mcp_4a84cf8a/readme"
}