The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Ap2 Iso20022 listing page.
Bridge AP2 (Google's Agent Payments Protocol) and x402
(Coinbase's HTTP-402) mandates into ISO 20022 pain.001 / pacs.008 records —
with spending-cap, expiry and authorisation guardrails, and an MCP
server. These agentic-payment protocols authorise a payment; this library
turns that authorisation into the bank-rail message that actually settles it
— the rail the card networks and stablecoins don't cover.
Latest release: v0.0.1 — 5 MCP tools over stdio, pure-Python (only
mcp), 100% branch coverage, for Python 3.10+. Output feeds straight intopain001/pacs008to generate wire-valid XML. Part of the ISO 20022 MCP suite.
An agent with a signed AP2 mandate (or an x402 payment authorisation) can prove
it's allowed to pay — but nothing in those protocols emits the pain.001 a
bank needs to move the money. ap2-iso20022 is that missing hop. And because
moving money is consequential, it only transforms and validates — producing
the ISO record is deliberately separate from generating and sending it, so the
actual payment stays an explicit, guarded step.
MCP client config (e.g. Claude Desktop):
normalize_ap2 — AP2 mandate payload → canonical mandate.normalize_x402 — x402 payment payload → canonical mandate.check_mandate — Guardrail: required fields, spending cap, expiry (with as_of), authorisation proof.to_pain001 — Canonical mandate → pain.001 record (customer credit transfer).to_pacs008 — Canonical mandate → pacs.008 record (FI-to-FI).The output field names and types match what pain001 / pacs008 expect
(validated against their JSON schemas), so to_pain001(mandate) → pain001
generate_message → XSD-valid pain.001 with no glue.
check_mandate returns {ok, violations, warnings}:
amount <= max_amount when a cap is presentas_ofproof_type/proof_value is presentIt never moves money; it tells you whether the mandate is safe to act on.
Part of a family of vendor-neutral, Python-native ISO 20022 MCP servers:
iso20022-mcp — unified gateway across the families.pain001-mcp · pacs008-mcp — generate the XML this bridge feeds.reconcile-mcp — statement/payment reconciliation.camt-exceptions — E&I messages (cancellation, investigation).Licensed under the Apache License, Version 2.0.
mcp-name: io.github.sebastienrousseau/ap2-iso20022