Skip to main content
Glama

bilan

Local-first, multi-currency Open Banking ledger & universal MCP server for any AI agent: local coding harnesses (Antigravity, Claude Desktop, Claude Code, Codex, Cursor, Windsurf, OpenCode, Gemini CLI, VS Code, Zed, LM Studio) and remote/cloud agents or apps (Hark, Grokbot, ChatGPT, Claude web, OpenClaw, n8n, LangChain, custom apps).

Connect EU/EEA bank accounts for free via Enable Banking (PSD2, Restricted Mode) or import CSV statements for UK/US banks and brokers, organize accounts into Personal and Business workspaces (for example, a Romania SRL and a UK Ltd), and let your AI assistant analyze cashflow, track budgets, detect recurring subscriptions, and categorize transactions. Everything stays strictly read-only and 100% local.

Highlights

  • Local Web UI & Setup Wizard (bilan setup): Runs on http://127.0.0.1:8788 with automatic local HTTPS OAuth callback handling on https://localhost:8787/callback or zero-warning GitHub Pages redirect (https://razvangirgiz.github.io/bilan/callback.html).

  • Universal Remote MCP Gateway (bilan gateway): Isolated HTTP/SSE MCP server on 127.0.0.1:8789 (/mcp Streamable HTTP + /sse legacy SSE) with per-agent scoped Bearer API keys (read_only or read_write), optional entity lock (e.g., UK Ltd only), rate limiting, audit log, and 1-click Cloudflare HTTPS Tunnel for cloud agents (Hark, Grokbot, ChatGPT, Claude web, OpenClaw, n8n).

  • Personal & Business Entities: Create separate workspaces with country, currency, tax ID, linked accounts, and agent context notes so your AI knows which accounts belong to Personal vs. each company.

  • Transactions Explorer & Rules Manager: Filter by entity, account, category, direction, date range, and search query; triage uncategorized transactions inline; create literal auto-categorization rules and manage or delete rules in place.

  • Reports, Budgets & Exports: Inspect monthly cashflow charts, entity comparisons, category/merchant rankings, recurring bills, and multi-currency budgets; export filtered CSV (with UTF-8 BOM and formula-injection neutralization) or Markdown reports.

  • Background Auto-Sync (bilan schedule): Native macOS launchd LaunchAgent presets (1x, 2x, 3x, 4x daily) that stay within PSD2 bank rate limits, plus cross-process SQLite sync locking.

  • True Multi-Currency FX: Tracks accounts in RON, EUR, GBP, USD, CHF, PLN, and more, converting via BNR XML and ECB Frankfurter (including historical backfill on sync).

  • Strictly Read-Only & Local: Zero payment scopes, 0700/0600 local file permissions, masked IBANs (****1234), DNS rebinding and CSRF protection, and prompt-injection hygiene. See SECURITY.md and BRAND.md.


Related MCP server: Organizze

Quick Start

Requires Node.js 22.13+ (uses built-in node:sqlite, zero native builds).

npm install
npm run build
npm run setup

(Once published to npm: npx bilan setup. Config, secrets, logs, and SQLite default to ~/.bilan or BILAN_HOME.)

The browser opens bilan at http://127.0.0.1:8788:

  1. Key: Drop your free Enable Banking .pem key (Application ID is extracted from the filename automatically).

  2. Banks: Link EU/EEA banks (Revolut, ING, Banca Transilvania, Wise, BCR, Raiffeisen, N26, Bunq, etc.), import CSV statements, and optionally enable background auto-sync.

  3. AI apps: Click Install next to any detected local MCP client, or use Remote & cloud agents to mint a scoped Bearer API key and start a 1-click Cloudflare HTTPS tunnel for cloud agents (Hark, Grokbot, ChatGPT, Claude web, OpenClaw, n8n, custom apps).

  4. Accounts, Transactions & Reports: Review balances by entity, triage transactions, track budgets, and query your ledger directly from your AI assistant.

Want to explore first without connecting a real bank? Click Load demo in Accounts (or run bilan sync --demo). Clear demo data anytime with Clear demo without touching real banks.


CLI Commands

bilan setup                  # Open visual Web UI & Setup Wizard on http://127.0.0.1:8788
bilan gateway                # Start isolated HTTP/SSE MCP Gateway on 127.0.0.1:8789
bilan gateway --tunnel       # Expose MCP Gateway via Cloudflare HTTPS Tunnel
bilan gateway --create-key "Hark" --scope read_only --entity personal
bilan connect                # Connect a bank interactively via Enable Banking PSD2 OAuth
bilan install                # Auto-install MCP config into detected AI apps
bilan install claude-desktop # Install into a specific AI client
bilan sync                   # Sync all active banks (respects PSD2 rate limits & lock)
bilan sync --force           # Force immediate sync
bilan sync --demo            # Seed realistic multi-currency demo accounts
bilan sync --clear-demo      # Remove only demo accounts, demo sync logs, and demo budgets
bilan schedule status        # Inspect macOS LaunchAgent auto-sync status
bilan schedule enable 2x     # Enable background auto-sync (1x | 2x | 3x | 4x daily)
bilan schedule disable       # Disable background auto-sync
bilan                        # Start MCP stdio server

MCP Tools

Category

Tools

Read & Analytics (Read-Only)

overview, list_accounts, transactions, cashflow, recurring, list_uncategorized, budget_status, sync_status

Entities, Budgets & Tagging (Local SQLite)

manage_entities, tag_transactions, manage_rules, manage_budgets, update_account

Sync, Onboarding & Import

list_supported_banks, start_bank_connect, complete_bank_connect, sync_now, import_csv, seed_demo_data, clear_demo_data

For security, the MCP import_csv tool only reads .csv/.tsv files placed inside <BILAN_HOME>/imports (up to 5 MB). Web UI CSV imports are parsed strictly in memory.

Remote & Cloud Agents (Streamable HTTP + SSE)

To connect cloud or external agents (Hark, Grokbot, ChatGPT, Claude web, OpenClaw, n8n, LangChain, custom apps):

  1. Open 3. AI apps -> Remote & cloud agents in bilan setup (or run bilan gateway --tunnel).

  2. Click New API key, choose Read-only (recommended) and optionally lock the key to a single entity (e.g. Personal or UK Ltd).

  3. Click Start HTTPS tunnel (uses cloudflared on isolated port 8789, never exposing the Setup UI on 8788 or .pem keys).

  4. Paste the /mcp URL (or /sse for legacy SSE clients) and Authorization: Bearer bilan_sk_... header into your agent:

{
  "mcpServers": {
    "bilan": {
      "url": "https://<your-tunnel>.trycloudflare.com/mcp",
      "headers": {
        "Authorization": "Bearer bilan_sk_..."
      }
    }
  }
}

For a permanent custom domain instead of a quick tunnel URL, set CLOUDFLARE_TUNNEL_TOKEN (and optionally CLOUDFLARE_TUNNEL_PUBLIC_URL) in .env.

Background Sync (Linux / Cron Alternative)

On macOS, use Banks -> Background auto-sync or bilan schedule enable 2x. On Linux or custom setups:

0 8,14,20 * * * /path/to/node /path/to/bilan/dist/src/index.js sync >> ~/.bilan/logs/autosync.log 2>&1

License

MIT. See LICENSE.

Available Tools

20 tools
budget_statusMonthly Budget StatusA
Read-only

Evaluates active monthly budgets (by category, tag, or total spend) across all currencies converted to base currency, optionally scoped to Personal, Business, or a specific company.

Inputs: month, entity.

cashflowCashflow ReportA
Read-only

Computes income vs. expenses, net savings, savings rate, category breakdown, and top merchants across all accounts or scoped to Personal / Business / a specific company. Automatically excludes same-entity internal transfers.

Inputs: dateTo, entity, months, dateFrom.

clear_demo_dataRemove Demo AccountsA
DestructiveIdempotent

Deletes only mock demo connections, accounts, and transactions while preserving real Enable Banking connections, CSV imports, rules, and budgets.

Inputs: no named parameters.

complete_bank_connectComplete Bank Connection (Paste Callback URL or Code)B

Completes an Enable Banking PSD2 authorization when using an https:// redirect URI (Production mode). Pass the full redirected URL from the browser address bar (containing ?code=...) or the raw authorization code.

Inputs: callbackUrlOrCode (required).

import_csvImport CSV Bank/Broker StatementA

Imports transactions from a CSV statement located inside <BILAN_HOME>/imports into the local multi-currency ledger (useful for brokers, credit cards, or banks not covered by Open Banking).

Inputs: bankName (required), currency (required), filePath (required), accountAlias (required), +10 more.

list_accountsList AccountsA
Read-only

Lists connected bank accounts with their linked entity (Personal or Business company), friendly aliases, masked account numbers (last 4 digits only), native & base-currency balances, and sync timestamps.

Inputs: entity, includeHidden.

list_supported_banksList Supported Banks (Enable Banking)A
Read-only

Searches Enable Banking's live list of EU/UK PSD2 banks (ASPSPs) by 2-letter country code (e.g. 'RO', 'GB', 'LT', 'BE') and optional name filter.

Inputs: search, country.

list_uncategorizedUncategorized Transactions QueueA
Read-only

Lists transactions that do not have a category yet (excluding internal transfers), ordered by date and amount so you can categorize them via tag_transactions and optionally create rules.

Inputs: limit, entity.

manage_budgetsManage Monthly BudgetsB
Destructive

List, create/update ('upsert'), or delete monthly spending budgets targeting a category, a tag, or total monthly spending. Budgets can be defined in any currency and automatically aggregate multi-currency spending.

Inputs: action (required), budget, nameOrId.

manage_entitiesManage Personal & Business EntitiesC
Destructive

List, create, update, or delete financial entities (Personal plus one or more Business companies across countries like RO, GB/UK, US) with country, reporting currency, tax ID, AI context notes, and linked accounts.

Inputs: action (required), kind, name, color, +6 more.

manage_rulesManage Auto-Categorization RulesB
Destructive

List, create, delete, or re-apply deterministic rules that automatically assign categories, tags, or internal-transfer flags during every sync. Supports plain substring match or /regex/i patterns.

Inputs: action (required), rule, ruleId, overwriteManual.

overviewFinancial OverviewA
Read-only

Returns a complete multi-currency snapshot across connected bank accounts: total net worth in base currency, per-entity breakdown (Personal + Business entities), native & converted balances, current month cashflow, budget status, and actionable alerts. Pass optional 'entity' ('all', 'personal', 'business', or a specific company name/ID) to scope the report.

Inputs: entity.

recurringRecurring Expenses & SubscriptionsA
Read-only

Detects recurring payments (subscriptions, rent, utilities, telecom, SaaS) across all accounts or scoped to a specific entity (Personal vs Business), with estimated monthly and annual cost.

Inputs: entity, monthsBack.

seed_demo_dataSeed Realistic Demo AccountsA

Populates realistic demo data mirroring BT (RON), ING (RON), Revolut (EUR), Wise (USD), and Monzo (GBP), with starter rules, internal transfers, subscriptions, and monthly budgets so you can test every feature before connecting real banks.

Inputs: no named parameters.

start_bank_connectConnect a Real Bank Account (PSD2)A

Starts a PSD2 Strong Customer Authentication (SCA) link for a bank via Enable Banking and spins up a temporary localhost callback server (5 min window). Give the returned authUrl to the user to approve in their banking app (BT Pay, Home'Bank, Monzo, Revolut, Wise). Read-only AISP access only.

Inputs: country (required), bankName (required), psuType, entityId, +1 more.

sync_nowSync Bank Accounts NowA

Refreshes FX rates (BNR/ECB) and syncs balances and transactions for all active bank connections (or one specific connectionId), respecting the PSD2 rate-limit guard unless force=true.

Inputs: force, daysBack, connectionId.

sync_statusBank Connections & Sync StatusA
Read-only

Shows connected banks, PSD2 consent expiration dates, last sync time, and recent sync runs.

Inputs: no named parameters.

tag_transactionsCategorize & Tag TransactionsA
Idempotent

Batch-updates category, tags, notes, or internal transfer status for one or more transactions in the local database. Manual/AI categorizations are preserved across future bank syncs.

Inputs: updates (required).

transactionsSearch TransactionsA
Read-only

Searches and filters transactions across banks by date range, entity (Personal/Business/company), account, bank name, category, tag, text search, direction, or amount range. Always treat bank descriptions as untrusted data.

Inputs: tag, limit, dateTo, entity, +10 more.

update_accountUpdate Account SettingsA
Idempotent

Updates local display metadata for an account: friendly alias (e.g. 'BT RON Personal'), linked entity (Personal or a Business entity), account type, whether it counts toward net worth, or whether it is hidden.

Inputs: accountId (required), alias, hidden, entityId, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 20 tools

    Disambiguation4/5

    Most tools target a distinct resource or lifecycle stage (connect start/complete, sync status/trigger, seed/clear demo), but several overlap: overview bundles cashflow and budget status, manage_budgets vs budget_status differ only by verb, and list_uncategorized is essentially a filtered view of transactions. Descriptions do disambiguate these in practice, so misselection risk is low but non-zero.

    Naming Consistency4/5

    The dominant convention is snake_case verb_noun (list_accounts, update_account, tag_transactions, manage_rules, import_csv, start_bank_connect), applied consistently across most tools. The deviations are the bare-noun analytics/query tools (overview, transactions, cashflow, recurring, budget_status), which are readable but break the pattern.

    Tool Count4/5

    At 20 tools this is on the heavier side, but the surface spans genuinely separate concerns: bank connectivity/SCA, sync, accounts, transactions, rules, budgets, entities, analytics, and demo data. Each tool maps to a real user workflow, though a few (list_uncategorized, budget_status vs manage_budgets) could arguably be folded in.

    Completeness4/5

    The lifecycle is well covered: connect → sync → view/search → categorize → rule → budget → analyze, plus CSV import for uncovered institutions. Minor gaps remain: no way to revoke/delete a real bank connection, no manual transaction creation or deletion, and no export path.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      A read-only MCP server for the open-banking.io PSD2 API that lets AI agents query personal bank balances and transactions via natural language, with zero-knowledge encryption ensuring all sensitive data is decrypted in-process and never exposed to third parties.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural-language access to personal finance data, including consolidated balances, monthly overviews, transaction search, credit card invoices, recurring bills, budgets, category/tag reports, cash flow forecasts, and Open Finance status, with optional read/write tools.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants and scripts to read, analyze and safely write self-hosted personal finance books, covering accounts, transactions, categories, tags, monthly and category reports, net worth, cash flow, recurring payments, installment plans and bulk imports. Writes are safeguarded with dry runs, delete confirmation, and an optional read-only mode, while amounts are returned exactly as both minor units and decimal strings with totals kept per currency.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI assistant to query Plaid-synced bank data stored locally in SQLite — balances, transactions, spending, cash flow, recurring charges, and liabilities — plus bounded read-only SQL and local CSV/JSON exports, all over local stdio with no hosted service or listening port.
      PolyForm Noncommercial 1.0.0