Synthetic demo data · Read-only · Run the full agent with approvals locally: npx closeloop-mcp

How it works

Keep financial truth deterministic; use AI only where the data is messy, and only from read-only evidence.

Pipeline

01
Sources

Payments, refunds, gateway settlements, bank statement, ledger export. Insert-only, or attached read-only from the customer's export.

02
Stage 1 · Payment ↔ settlement item

Exact id link. Fee and 18% GST on the fee re-computed in integer paise; any difference is an exception.

03
Stage 2a · Exact UTR

Settlement UTR found in the bank narration after normalising case, spaces and hyphens.

04
Stage 2c · Fuzzy UTR

Edit distance on the UTR: ≤ 1 with a clear margin auto-matches; 2 or truncated is only suggested. Exact amount and date are required.

05
Stage 2b · Batch decomposition

A unique run of consecutive settlements, else a proven-unique subset (meet-in-the-middle / budgeted branch-and-bound). Otherwise: ranked candidate sets for a human.

06
Stage 3 · Bank ↔ ledger

Receipts by reference, then amount + date + party. Duplicates, mismatches and missing entries; a period tie-out must explain every rupee.

07
Stage 4 · Timing

Per-method T+n windows on Indian business days (Sundays, 2nd and 4th Saturdays, holidays). Late is always reported.

08
Output

Matches, exceptions with machine-readable rule traces, exposure per class, the tie-out, and an append-only audit trail.

Trust boundary

Deterministic engine
  • Decides every match, exception and exposure class
  • All money is integer paise; no floats
  • Auto-matches a batch only with a uniqueness proof (or a stated contiguity assumption)
  • Financial records are insert-only and can be mounted read-only
Constrained AI layer
  • Reads a read-only evidence bundle; never writes financial data
  • May suggest UTR tokens only if they literally appear in the narration
  • Explanations citing evidence outside the bundle are rejected
  • Draft journals must balance to the engine's amount; status pending_approval
  • Any failure falls back to a deterministic template, labelled as such
Human reviewer
  • Approves suggestions and picks batch candidate sets
  • Two steps: preview + 5-minute token, then token + name
  • Every action lands in the append-only audit trail
  • Approving a set re-checks the leftover settlements

Run the full agent with approvals (MCP)

This site is a read-only snapshot. The agent runs locally over stdio.

npx -y closeloop-mcp          # MCP server; seeds demo data on first run
npx -y closeloop-mcp check    # one reconciliation, summary to stderr

Claude Desktop config:

{ "mcpServers": { "closeloop": { "command": "npx", "args": ["-y", "closeloop-mcp"] } } }

Tools:

run_reconciliationlist_exceptionsget_evidenceexplain_exceptiondecompose_bank_creditdraft_journal_entryapprove_suggestionescalateget_audit_trail

Plus the month_end_review prompt and the closeloop://summary/latest resource. Every amount arrives pre-formatted with totals, so the model never does arithmetic.

Demo

Screenshot or GIF slot: add apps/dashboard/public/demo.gif (or .png / .webp) and rebuild.