
Ap2 Iso20022
io.github.sebastienrousseauPublished by GitHub account sebastienrousseauv0.0.7Updated Oct 24, 2026
Bridge AP2 / x402 agent-payment mandates into wire-valid ISO 20022 pain.001 / pacs.008 records.
Overview
Converts AP2 and x402 agent-payment mandates into ISO 20022 pain.001 and pacs.008 records, with guardrail checks, over stdio or HTTP.
- What you can do
- Normalise AP2 and x402 payment payloads into a canonical mandate
- Check a mandate's required fields, spending cap, expiry and authorisation proof
- Convert a canonical mandate into pain.001 customer credit transfer or pacs.008 FI-to-FI records
- Produce output whose field names and types match the pain001 and pacs008 generators, so it can feed XML generation
- When to use it
- Useful when an assistant handles agentic payments from AP2 or x402 and needs to turn an authorisation into a bank-rail ISO 20022 message, or to validate a mandate before acting on it. It only transforms and validates; it does not generate or send the payment itself.
- Requirements
- A local Python 3.10+ runtime; install the ap2-iso20022 package from PyPI or run it with uvx. The MCP server runs over stdio by default, or over streamable HTTP or SSE on 127.0.0.1:8000 with optional host and port flags. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open Ap2 Iso20022 in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
ap2-iso20022: Agent-payment mandates → wire-valid ISO 20022
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.7: 11 MCP tools over stdio, streamable HTTP or SSE, 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.
Why
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.
Install
MCP client config (e.g. Claude Desktop):
Transports
One command line, three transports:
--host and --port change the bind address (defaults 127.0.0.1 and
8000). The HTTP transports carry no authentication of their own: bind
loopback, or put the server behind a gateway you trust before binding a
routable address. Every release is verified over streamable HTTP with
scout in both protocol
eras and over SSE with the MCP SDK client; see
ADR 0001.
Flow: normalise → guardrail → convert
Tools
normalize_ap2— AP2 mandate payload → canonical mandate.normalize_x402— x402 payment payload → canonical mandate.check_mandate— Guardrail: required fields, spending cap, expiry (withas_of), authorisation proof.to_pain001— Canonical mandate →pain.001record (customer credit transfer).to_pacs008— Canonical mandate →pacs.008record (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.
Guardrails
check_mandate returns {ok, violations, warnings}:
- required fields — payer/payee name + account, amount, currency
- spending cap —
amount <= max_amountwhen a cap is present - expiry — refuses an expired mandate when you pass
as_of - authorisation proof — warns when no
proof_type/proof_valueis present
It never moves money; it tells you whether the mandate is safe to act on.
The suite
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).
Development
License
Licensed under the Apache License, Version 2.0 (LICENSE).
mcp-name: io.github.sebastienrousseau/ap2-iso20022
Source: README.md at commit 9fe3b15
Tools
0Version history
3- v0.0.7LatestOct 4, 2026
- v0.0.6Oct 4, 2026
- v0.0.5Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts