pacs008-mcp¶
Model Context Protocol server exposing the pacs008 ISO 20022 FI-to-FI Customer Credit Transfer library as agent tools.
Contents
What it is¶
Sixteen tools, three resources and one prompt over the pacs008 library,
served to any MCP client (Claude Desktop, IDEs, agents) over stdio,
streamable HTTP or SSE. Every tool is a thin, typed wrapper over the same
library the CLI and REST API use, so all interfaces behave identically.
A tool never raises: on bad input it returns an {"error": ...} payload
the agent can read.
Why¶
An agent building an interbank payment needs to discover the exact message type, learn the fields, validate the records against the JSON Schema and against the rail’s usage guidelines, and only then generate XML. This server exposes each of those steps as a separate, closed-world tool with JSON Schema enums for the closed sets, so the client can constrain inputs before the call and the model cannot guess a message type or skip a validation gate.
Install¶
pip install pacs008-mcp # Python 3.11+
pip install 'pacs008-mcp[online]' # adds httpx for verify_bic_online
Transports¶
One command line, three transports:
Command |
Transport |
Endpoint |
|---|---|---|
|
stdio |
the client spawns the process |
|
Streamable HTTP (2026-07-28 and 2025-11-25) |
|
|
HTTP+SSE (2024-11-05) |
|
--host and --port change the bind address. The HTTP transports carry
no authentication of their own: bind loopback, or put the server behind a
gateway you trust. See ADR 0001.
Tools¶
Tool |
Does |
|---|---|
|
List every supported pacs message type and its human name |
|
List every registered scheme / usage-guideline profile |
|
Return the rule attributes of one scheme profile |
|
List the required input fields for a message type |
|
Return the full input JSON Schema for a message type |
|
Validate flat records against the message type’s JSON Schema |
|
Validate records against a scheme’s usage-guideline rules |
|
Generate XSD-validated pacs XML from in-memory records |
|
Validate a raw XML string against the bundled XSD |
|
Parse and classify an inbound ISO 20022 message |
|
Convert a legacy SWIFT MT103 into pacs.008 records |
|
Classify a postal address as structured, hybrid or unstructured |
|
Validate one postal address against an address policy |
|
Upgrade legacy unstructured address lines toward structured form |
|
Batch-validate every party address across payment rows |
|
Check a BIC structurally, with an optional directory lookup |
Resources: pacs008://message-types, pacs008://schemes and the
templated pacs008://scheme/{scheme_id}. Prompt: build_pacs008_message,
which teaches the recommended tool order.