Skip to main content
ClaudeWave

Bridge AP2 / x402 agent-payment mandates into wire-valid ISO 20022 pain.001 / pacs.008 records, with guardrails. MCP server.

MCP ServersOfficial Registry1 stars0 forks● PythonApache-2.0Updated today
ClaudeWave Trust Score
95/100
✓ Verified
Passed
  • ✓Open-source license (Apache-2.0)
  • ✓Actively maintained (<30d)
  • ✓Clear description
  • ✓Topics declared
  • ✓Documented (README)
Last scanned: 10/5/2026
Install in Claude Code / Claude Desktop
Method: UVX (Python) · ap2-iso20022-mcp
Claude Code CLI
claude mcp add ap2-iso20022 -- uvx ap2-iso20022-mcp
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "ap2-iso20022": {
      "command": "uvx",
      "args": ["ap2-iso20022-mcp"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Use cases

MCP Servers overview

<!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->

# ap2-iso20022: Agent-payment mandates → wire-valid ISO 20022

[![Glama MCP server score](https://glama.ai/mcp/servers/sebastienrousseau/ap2-iso20022/badges/score.svg)](https://glama.ai/mcp/servers/sebastienrousseau/ap2-iso20022)

**Bridge [AP2][ap2] (Google's Agent Payments Protocol) and [x402][x402]
(Coinbase's HTTP-402) mandates into ISO 20022 `pain.001` / `pacs.008` records —
with spending-cap, expiry and authorisation guardrails, and an [MCP][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 into
> [`pain001`][pain001-mcp] / [`pacs008`][pacs008-mcp] to generate wire-valid XML.
> Part of the [ISO 20022 MCP suite](#the-suite).

<p align="center">
  <img src=".github/demo.gif" alt="ap2-iso20022 Demo" width="100%" />
</p>

---

## 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

```sh
pip install ap2-iso20022
# or run the MCP server without installing:
uvx --from ap2-iso20022 ap2-iso20022-mcp
```

MCP client config (e.g. Claude Desktop):

```json
{
  "mcpServers": {
    "ap2-iso20022": {
      "command": "ap2-iso20022-mcp"
    }
  }
}
```

## Transports

One command line, three transports:

| Command | Transport | Endpoint | Protocol revisions |
| :--- | :--- | :--- | :--- |
| `ap2-iso20022-mcp` | stdio | the client spawns the process | 2026-07-28, 2025-11-25 |
| `ap2-iso20022-mcp --transport streamable-http` | Streamable HTTP | `http://127.0.0.1:8000/mcp` | 2026-07-28 (stateless, `server/discover`) and 2025-11-25 (`initialize`, `Mcp-Session-Id`) on the same endpoint; responses stream as server-sent events, `GET` opens the server-to-client stream |
| `ap2-iso20022-mcp --transport sse` | HTTP+SSE (2024-11-05) | `http://127.0.0.1:8000/sse` and `/messages/` | for clients that still expect the older transport |

`--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](https://github.com/sebastienrousseau/scout) in both protocol
eras and over SSE with the MCP SDK client; see
[ADR 0001](docs/adr/0001-three-transports-one-command-line.md).

```json
{
  "mcpServers": {
    "ap2-iso20022": { "url": "http://127.0.0.1:8000/mcp" }
  }
}
```

## Flow: normalise → guardrail → convert

```python
from ap2_iso20022 import bridge

# 1. Normalise the protocol payload into a canonical mandate.
mandate = bridge.from_ap2({
    "intent_id": "AP2-CoffeeRun-7",
    "payer": "Alice's Shopping Agent",
    "payer_account": "DE89370400440532013000",
    "merchant_name": "Blue Bottle Coffee",
    "payee_account": "GB29NWBK60161331926819",
    "amount": "12.50", "currency": "EUR", "memo": "oat latte",
    "spending_limit": "50.00",
    "signature": "eyJ...", "signature_type": "jws",
})

# 2. Guardrail before it becomes a payment.
check = bridge.check_mandate(mandate, as_of="2026-03-02T09:00:00")
assert check["ok"]          # required fields ok, within cap, not expired, signed

# 3. Convert to a pain.001 record that feeds pain001 -> wire-valid XML.
record = bridge.to_pain001(mandate)   # exact pain001 field names + JSON number amounts
```

## Tools

- `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.

## Guardrails

`check_mandate` returns `{ok, violations, warnings}`:
- **required fields** — payer/payee name + account, amount, currency
- **spending cap** — `amount <= max_amount` when a cap is present
- **expiry** — refuses an expired mandate when you pass `as_of`
- **authorisation proof** — warns when no `proof_type`/`proof_value` is 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`][iso20022-mcp] — unified gateway across the families.
- [`pain001-mcp`][pain001-mcp] · [`pacs008-mcp`][pacs008-mcp] — generate the XML this bridge feeds.
- [`reconcile-mcp`][reconcile-mcp] — statement/payment reconciliation.
- [`camt-exceptions`][camt-exceptions] — E&I messages (cancellation, investigation).

## Development

```sh
git clone https://github.com/sebastienrousseau/ap2-iso20022
cd ap2-iso20022
python -m venv .venv && . .venv/bin/activate
pip install -e . && pip install pytest pytest-cov ruff black mypy
pytest                      # 100% branch coverage gate
ruff check ap2_iso20022 tests && black --check ap2_iso20022 tests && mypy ap2_iso20022
```

## License

Licensed under the Apache License, Version 2.0 (LICENSE).

---

`mcp-name: io.github.sebastienrousseau/ap2-iso20022`

[mcp]: https://modelcontextprotocol.io
[ap2]: https://github.com/google-agentic-commerce/AP2
[x402]: https://www.x402.org
[iso20022-mcp]: https://github.com/sebastienrousseau/iso20022-mcp
[pain001-mcp]: https://github.com/sebastienrousseau/pain001-mcp
[pacs008-mcp]: https://github.com/sebastienrousseau/pacs008-mcp
[reconcile-mcp]: https://github.com/sebastienrousseau/reconcile-mcp
[camt-exceptions]: https://github.com/sebastienrousseau/camt-exceptions
agent-paymentsap2fintechiso-20022mcpmcp-servermodel-context-protocolpacs008pain001x402

What people ask about ap2-iso20022

What is sebastienrousseau/ap2-iso20022?

+

sebastienrousseau/ap2-iso20022 is mcp servers for the Claude AI ecosystem. Bridge AP2 / x402 agent-payment mandates into wire-valid ISO 20022 pain.001 / pacs.008 records, with guardrails. MCP server. It has 1 GitHub stars and its last recorded update is dated 2026-10-04.

How do I install ap2-iso20022?

+

You can install ap2-iso20022 by cloning the repository (https://github.com/sebastienrousseau/ap2-iso20022) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is sebastienrousseau/ap2-iso20022 safe to use?

+

Our security agent has analyzed sebastienrousseau/ap2-iso20022 and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains sebastienrousseau/ap2-iso20022?

+

sebastienrousseau/ap2-iso20022 is maintained by sebastienrousseau. The last recorded GitHub activity is dated 2026-10-04, with 1 open issues.

Are there alternatives to ap2-iso20022?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy ap2-iso20022 to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: sebastienrousseau/ap2-iso20022
[![Featured on ClaudeWave](https://claudewave.com/api/badge/sebastienrousseau-ap2-iso20022)](https://claudewave.com/repo/sebastienrousseau-ap2-iso20022)
<a href="https://claudewave.com/repo/sebastienrousseau-ap2-iso20022"><img src="https://claudewave.com/api/badge/sebastienrousseau-ap2-iso20022" alt="Featured on ClaudeWave: sebastienrousseau/ap2-iso20022" width="320" height="64" /></a>

More MCP Servers

ap2-iso20022 alternatives