Skip to main content
Glama
owieschon
by owieschon

bank.mcp

bank.mcp is a local personal-finance analysis suite built around a SQLite store and seven deterministic engines. It forecasts cash flow, measures savings pace, reports spending, detects fee and duplicate-charge candidates, finds recurring streams, and reconciles receipts. Monetary storage and aggregation use integer cents; model output cannot overwrite stored values or computed figures.

A fluent forecast can still cost money when it is wrong. bank.mcp keeps stored transactions, aggregation, forecasts, and anomaly classifications under deterministic code. Optional model paths may add prose or propose bounded inputs, but those outputs do not become computed truth merely because they sound plausible.

The declared model-input inventory is: a compact computed summary for narration; merchant-name lists for matching; receipt email text for candidate field extraction; one merchant name for a best-guess contact address; and typed merchant, amount, date, expected amount, and reason fields for a refund draft. Extracted receipt fields and generated addresses or prose are untrusted inputs. The current call sites pass no raw bank rows or dedicated account-number or transaction-ID fields. Free-form refund evidence remains in the local dispute ledger and never enters the model prompt. The synthetic demo and public MCP tools run with no API key, model call, or network access.

The runtime uses only the Python standard library (dependencies = []). It has no ORM, application framework, or MCP SDK.

Synthetic bank.mcp demo: deterministic finance engines produce a computed digest while optional narration stays outside the computed-figure boundary

What it does

Turns a SQLite store of bank transactions into one digest: a cash-flow / overdraft forecast, savings-goal pace against a target date, a spending breakdown, a fee + duplicate-charge scan, recurring-stream detection, and receipt reconciliation. One orchestrator (finance_agent.build_digest) reconciles receipts first, runs each engine, and collates a single ~1K-token summary — which is the only thing narration ever sees.

bank-mcp demo        # builds + prints the digest from bundled synthetic data — no bank, no key, no network

The command prints a deterministic digest like this:

# bank.mcp — UNIFIED MONTHLY DIGEST
## What matters
- Clear: balance stays at or above the $100.00 buffer for the full 35-day horizon (min $1,087.44 on May 6, 2026).
- Fee/fraud: $49.99 recoverable this 30d.
## savings pace
- Pace $2,966.67/mo vs $1,257.14/mo needed → projected $21,966.69 by Dec 1, 2026 → AHEAD (12.0% to $10,000.00)
## Fee + fraud scan (30d)
- duplicates $49.99 recoverable (1)  · dup: Online Store $49.99 2026-04-24 & 2026-04-24

The demo data is deterministic (fixed anchor date, seeded RNG) and doubles as the committed test fixture — it plants a duplicate charge, two bank fees, a recurring drift, and a self-transfer so each detector has something real to catch.

Related MCP server: banktivity-mcp

What enforces the boundary

  • money.py is the single integer-cents authority. store/db.py writes amount as integer cents, so the SQL read-models sum exact integers and aggregation never drifts. Rounding is half-up in one place.

  • The math is checked twice. The SQL reporting rollups in store/queries.sql (monthly cash flow with a running total + month-over-month delta, category share-of-spend, ranked top merchants — CTEs and SUM() OVER / LAG() / RANK()) are cross-checked against an independent Python recompute in tests/test_analytics.py. Two paths to the same number.

  • The model boundary is an executable architecture rule, not a comment. tests/test_finance_agent.py::TestNoRawRows fails if a raw-transaction shape reaches narration. tests/test_model_boundary_docs.py pins calls to the two declared model transports, rejects recognized model clients or endpoint ownership elsewhere, and requires every declared caller to match the public inventory. The static guard does not claim to infer an intentionally disguised network transport from arbitrary Python. Missing keys and malformed responses fall back to deterministic results or templates.

  • Ingestion is idempotent. store/db.py's upsert is keyed on transaction id, and a posted charge supersedes its stale pending row — re-ingesting a batch never double-counts. owner and currency are columns, so a second account holder or currency requires more rows, not a migration.

Run it

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"        # dev tools only; the package itself needs nothing

bank-mcp demo                  # full digest from synthetic data
bank-mcp analytics             # the SQL reporting rollups
pytest -q                      # test suite

CI runs the suite across Python 3.10–3.13, enforces at least 70% coverage on the testable core, and checks ruff and mypy. bank-mcp-server exposes the synthetic demo to MCP clients through a JSON-RPC 2.0 stdio server with four tools: build_digest, monthly_cashflow, category_breakdown, and top_merchants. The server implements its bounded MCP surface directly so the runtime stays dependency-free.

Everything in the repository is synthetic. The demo generator produces fake merchants, amounts, and dates; no real financial data is committed. For local runs with external services, secrets resolve from environment variables and then macOS Keychain, never from tracked files.

Limits

  • The public MCP server exposes synthetic data only. Real account ingestion is a separate, local operator path.

  • This is a single-user reporting tool, not a ledger, payment system, fraud decision engine, or financial adviser.

  • Fee, duplicate-charge, and receipt results are review candidates. They do not authorize a charge, refund, dispute, or message.

  • Model-proposed receipt fields, merchant contacts, and draft text require review. A generated address is not evidence that the address is current or owned by the merchant.

  • safehttp constrains declared outbound requests but is not a complete network sandbox or a full DNS-rebinding defense.

  • Integer cents protect storage and aggregation. Some bounded reporting calculations use floats rounded at display boundaries, as documented in docs/DECISIONS.md.

Where to look first

  • docs/ARCHITECTURE.md — the layered pipeline, the SQLite schema, and the LLM boundary, with file references.

  • src/bank_mcp/money.py — the integer-cents rounding authority.

  • src/bank_mcp/store/queries.sql — the SQL reporting read-models, written to read top to bottom.

  • src/bank_mcp/engines/ — the seven deterministic cores (forecast, budget, fee/fraud, recurring, receipt reconciliation, dispute, categorizer); llm_matcher.py contains matching and extraction calls, while dispute_agent.py contains contact and draft calls.

  • docs/DECISIONS.md — why SQLite over Postgres, and the set-based-reporting-in-SQL / algorithmic-forecasting-in-Python split.

Apache-2.0 — see LICENSE.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    B
    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
    Last updated
    89
    7
    AGPL 3.0
  • A
    license
    -
    quality
    D
    maintenance
    MCP server for accessing and managing Banktivity personal finance data, enabling account, transaction, and budget operations through natural language.
    Last updated
    3
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    MCP server for personal finance management that connects a SQLite database to any MCP client, allowing users to register, query, and analyze financial transactions through natural language.
    Last updated
  • A
    license
    -
    quality
    D
    maintenance
    MCP server providing deterministic accounting tools for AI agents, including bank statement parsing, document classification, money math, and webhook verification.
    Last updated
    1
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • TaxSort — Tollbooth-monetized MCP server for personal tax transaction classification

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/owieschon/bank-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server