Skip to main content
Glama

bifrost-fin-reconcile — Deterministic Math-Verified Invoice, Receipt & Bank Statement OCR (CLI + Remote MCP)

License: Apache-2.0 Hosted Standby API & MCP MCP Protocol

Open-source Apache-2.0 financial document extraction, local CPU OCR, and exact Decimal double-entry reconciliation engine. Convert digital PDFs, AES-256 encrypted bank e-Statements, and tilted smartphone receipts into mathematically audited accounting entries and compliant EU/ERP e-Invoices:

  • QuickBooks Online CSV (4_column & 3_column bank feeds + bill imports)

  • Xero CSV (*ContactName,*InvoiceNumber,... & bank statement imports)

  • Peppol BIS Billing 3.0 (EN 16931 UBL 2.1 XML, structurally validated via lxml)

  • EU Factur-X 1.07 / ZUGFeRD 2.3 (EN 16931 CII XML, structurally validated)

  • SAP Ariba / Coupa cXML 1.2.061 (InvoiceDetailRequest, compatible with cXML 3-Way Match Bridge)


Local CLI vs. Hosted Cloud Standby Webhook & MCP

Capability

Open-Source Local CLI (bifrost-fin-reconcile)

Hosted Standby HTTP & Remote MCP (ACT-028)

Legacy Financial OCR SaaS (Veryfi / Mindee)

Pricing

$0 Free Offline (Apache-2.0)

$0.015/page digital · $0.030/page OCR ($0/mo minimum)

$500/mo (Veryfi) or $53–$134/mo minimums

Batch Volume Cap

<= 25 pages / invocation

Unlimited pages, .zip archives & S3 presigned URLs

Tier-gated quotas

Runtime Setup

Local Python + Poppler/Tesseract

Zero setup — warm 512MB container (POST /reconcile & /mcp)

Proprietary cloud SDK

Duplicate & Invalid Files

Skipped locally

$0.00 Zero-Charge Gate + RFC 9457 copy_paste_patch

Charged per upload

Data Retention

Local disk

100% Zero-Retention (/tmp overwritten & unlinked immediately)

Stored unless Enterprise tier


Related MCP server: genpark-document-redaction-pii-scrubber-skill

1. Quickstart: Open-Source Local CLI (<= 25 Pages Free)

Install directly from GitHub (no API keys or cloud accounts required for local digital PDFs):

# Core digital PDF + bank statement reconciler + 5 ERP/XML compilers
pip install "git+https://github.com/ballostark-wq/bifrost-fin-reconcile.git"

# Optional: include local ONNX + Tesseract OCR dependencies for camera receipts / scanned PDFs
pip install "bifrost-fin-reconcile[ocr] @ git+https://github.com/ballostark-wq/bifrost-fin-reconcile.git"

Run Reconciler on Local Invoices, Receipts, or Encrypted Bank Statements

# Reconcile an invoice PDF and write QuickBooks CSV, Xero CSV, Peppol UBL 2.1 & Factur-X XML
bifrost-fin-reconcile ./sample_invoice.pdf \
  --formats json,quickbooks_csv,xero_csv,peppol_ubl_xml,facturx_cii_xml,ariba_cxml \
  --output-dir ./exports

# Unlock an AES-256 password-protected multi-page bank statement and verify every running balance row
bifrost-fin-reconcile ./mercury_statement.pdf \
  --password "YOUR_PDF_PASSWORD" \
  --type-hint bank_statement \
  --formats json,quickbooks_csv,xero_csv \
  --output-dir ./exports

# Run the deterministic 12-stage offline verification suite (0 external network calls)
bifrost-fin-reconcile --selftest

25-Page Local Funnel Cap: Workloads exceeding 25 pages per CLI invocation return exit code 2 with an RFC 9457 (status: 402, OSS_CLI_25_PAGE_CAP_EXCEEDED) pointer to the Hosted Standby HTTP & MCP Server for unlimited cloud batch & webhook automation.


2. Unlimited Cloud Webhooks: Synchronous Standby HTTP (POST /reconcile)

Skip Tesseract/Poppler Docker builds in production. Send S3/Drive/Dropbox presigned URLs, .zip archives, or raw application/pdf / image/jpeg bytes directly from n8n, Make.com, Zapier, or backend microservices:

curl -X POST "https://bifrost-data--invoice-bank-statement-ocr-erp-reconciler.apify.actor/reconcile" \
  -H "Authorization: Bearer $APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {
        "fileUrl": "https://your-s3-bucket.s3.amazonaws.com/vendor-invoice.pdf",
        "documentTypeHint": "auto"
      }
    ],
    "exportFormats": ["json", "quickbooks_csv", "xero_csv", "peppol_ubl_xml", "facturx_cii_xml", "ariba_cxml"],
    "strictMathReconciliation": true,
    "dedupeBySha256": true
  }'

One-Click Public Example Tasks on Apify Store


3. Connect to Claude Desktop, Cursor, Windsurf & Copilot (POST /mcp)

Add the hosted Streamable HTTP MCP endpoint (server.json included in repo root):

{
  "mcpServers": {
    "bifrost-fin-reconcile": {
      "type": "streamable-http",
      "url": "https://bifrost-data--invoice-bank-statement-ocr-erp-reconciler.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_API_TOKEN"
      }
    }
  }
}

Registered MCP Tools

  1. reconcile_financial_documents: Hybrid vector/OCR extraction + exact Decimal math audit + simultaneous QuickBooks, Xero, Peppol UBL 2.1, Factur-X CII, and Ariba cXML compilation.

  2. verify_bank_statement_running_balance: Multi-page chronological direction detection + row-by-row prev_balance - debit + credit == printed_balance verification ($0.01 precision).


4. What Zero-Hallucination Math Guard Verifies

  1. Line-Item Arithmetic: round(quantity * unit_price, 2) == line_total across every extracted line.

  2. Header Summation: sum(line_total) == subtotal and subtotal + tax_total + shipping_total - discount_total == grand_total.

  3. SEPA EPC-QR Cross-Check: Decodes European BCD payment QR codes and verifies QR EUR amount & beneficiary IBAN against OCR-extracted totals.

  4. Checksum Validation: Validates EU VAT numbers, US EIN, Korean BRN (10-digit weighted mod-10), and international IBAN (ISO 13616 MOD-97-10).

  5. Continuous Bank Running Balances: Audits both oldest-first and newest-first multi-page statements across page breaks, returning VERIFIED_EXACT, ROUNDING_TOLERANCE_1C, or DISCREPANCY_FLAGGED with pinpointed discrepancy_rows[].


License

Apache License 2.0 — see LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables accounts payable teams to extract invoice data from PDFs and images, detect duplicates, normalize vendor names, calculate payment terms, and validate invoice completeness. Supports local extraction for text PDFs and optional vision providers for scanned documents.
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables converting PDFs and CSV/spreadsheet files into spreadsheets, extracting bank statement or receipt data into clean CSV, cleaning messy CSV, and generating client-ready reports through an open MCP endpoint.
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables parsing of structured financial receipts, invoices, and bank statements, tolerance-based three-way reconciliation, detection of tax calculation drift and duplicate claims, and synthesis of double-entry bookkeeping journal entries.
      MIT