
Ap2 Iso20022
io.github.sebastienrousseau由 GitHub 账号 sebastienrousseau 发布v0.0.7更新于 Oct 24, 2026
Bridge AP2 / x402 agent-payment mandates into wire-valid ISO 20022 pain.001 / pacs.008 records.
概览
将 AP2 与 x402 智能体支付授权转换为 ISO 20022 pain.001 / pacs.008 记录,并提供校验护栏,支持 stdio 或 HTTP 传输。
- 可以做什么
- 把 AP2 与 x402 支付载荷规范化为标准授权对象
- 检查授权的必填字段、消费上限、有效期与授权凭证
- 将标准授权转换为 pain.001 客户贷记转账或 pacs.008 金融机构间记录
- 输出字段名与类型与 pain001、pacs008 生成器一致,可直接用于生成 XML
- 适用场景
- 当助手处理 AP2 或 x402 智能体支付,需要把支付授权转成银行通道的 ISO 20022 报文,或在执行前校验授权是否合规时使用。它只做转换与校验,不生成也不发送实际付款。
- 运行要求
- 需要本地 Python 3.10 及以上运行环境,从 PyPI 安装 ap2-iso20022 或用 uvx 直接运行。MCP 服务器默认走 stdio,也可用 streamable HTTP 或 SSE 在 127.0.0.1:8000 上运行,并可指定 host 与 port。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Ap2 Iso20022,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
来源:README.md,提交 9fe3b15
工具
0版本历史
3- v0.0.7最新Oct 4, 2026
- v0.0.6Oct 4, 2026
- v0.0.5Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分