Skip to main content
Glama
iso20022-mcp

iso20022-mcp

iso20022-mcp

An MCP server that lets AI agents parse, validate, explain and test ISO 20022 payment messages — safely.

Agents handling payments fail in predictable ways: they invent reject codes, miss IBAN checksum errors, and follow instructions hidden in free-text fields like remittance information. This server gives them deterministic tools for the parts that must be exact, and treats message free text as untrusted data.

Tools

Tool

What it does

parse_message

pacs.008 / pacs.002 XML → structured JSON (namespace-agnostic, XXE-safe)

validate_message

IBAN mod-97, BIC format, amounts and currency decimals, required parties, counts, free-text limits, prompt-injection patterns — each issue mapped to its likely reject code

explain_message

Deterministic plain-language summary: who pays whom, how much, status and reasons

lookup_code

Status reason / transaction status / charge bearer codes — returns found: false instead of guessing

generate_test_message

Synthetic valid and defective messages for testing (no real customer data)

Related MCP server: camt053-mcp

Quick start

pip install -e ".[dev]"
pytest -q
iso20022-mcp            # runs the server over stdio

Claude Desktop / any MCP client config:

{ "mcpServers": { "iso20022": { "command": "iso20022-mcp" } } }

Security design

  • Free-text fields are returned with an _UNTRUSTED suffix and the server instructions tell agents to treat them as data.

  • validate_message flags instruction-like content in free text (severity security).

  • XML parsing disables entity resolution and network access.

  • Only synthetic data and public example IBANs/BICs are used anywhere in this repo.

Benchmark

evals/ contains a generator for a banking-agent task set (python evals/make_tasks.py) covering validation, rejection investigation and prompt injection, plus a deterministic scorer. Results across model families: coming soon.

Roadmap

  • Official XSD validation · pain.001 and camt.053 · MT103 → pacs.008 (subset) · remote HTTP deployment with auth and OpenTelemetry

Disclaimer

Not affiliated with ISO, SWIFT or any bank. Code sets here are a curated subset; consult the official ISO 20022 external code sets for production use.

Available Tools

5 tools
explain_messageC

Plain-language summary of who pays whom, how much, and status/reasons. Deterministic, no guessing.

Inputs: xml (required). Returns: result

generate_test_messageB

Generate a synthetic test message. kind: 'pacs.008' or 'pacs.002'. defect (pacs.008): none, bad_iban, bad_bic, missing_creditor_name, bad_decimals, count_mismatch, injection_in_remittance, missing_creditor_address. reason_code is used for pacs.002.

Inputs: kind, defect, reason_code. Returns: result

lookup_codeA

Look up an ISO 20022 status reason, transaction status or charge bearer code. Use this instead of guessing.

Inputs: code (required). Returns: result

parse_messageA

Parse an ISO 20022 pacs.008 (credit transfer) or pacs.002 (status report) XML message into structured JSON.

Inputs: xml (required). Returns: result

validate_messageA

Validate a pacs.008/pacs.002 message against business rules (IBAN checksum, BIC format, amounts, required parties, counts, free-text limits, prompt-injection patterns). Returns issues with likely reject codes.

Inputs: xml (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct action on the message lifecycle: reference lookup, synthetic generation, parsing, rule validation, and plain-language explanation. Although parse/validate/explain all take a message as input, their outputs (structured JSON, issue list with reject codes, prose summary) are unambiguous and non-overlapping.

    Naming Consistency5/5

    All five tools use a consistent snake_case verb_noun pattern (lookup_code, generate_test_message, parse_message, validate_message, explain_message) with predictable, domain-appropriate verbs. No mixed conventions or camelCase deviations.

    Tool Count5/5

    Five tools is well-scoped for a focused ISO 20022 helper: one reference lookup, one generator, and three message-processing operations. Nothing feels redundant or bolted on, and the surface is small enough to be navigable without packing in marginal tools.

    Completeness4/5

    The set covers the full practical loop for the two supported message types — look up a code, generate a fixture, parse, validate, and explain — which is coherent end-to-end. Minor gaps: only pacs.008 and pacs.002 are supported (no pacs.004, camt, or pain messages), and there is no tool to enumerate/repair codes or fix a failing message.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Pactus is an MCP server for parsing and validating ISO 20022 payment messages directly from chat. It exposes nine tools that let AI assistants inspect or validate pacs.008, pacs.002, pain.001, and camt.053 messages — the message types at the centre of the CBPR+ migration — without leaving the conversation.
      9
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server that enables AI agents to parse, validate, and reverse ISO 20022 bank statements, with tools for discovering message types and return reasons.
      24
      70 PyPI
      2
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol server that exposes the pain001 ISO 20022 Customer Credit Transfer Initiation library as agent tools, enabling AI assistants to generate and validate standardized payment XML messages.
      30
      953 PyPI
      1
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      An MCP server that exposes the pacs008 ISO 20022 FI-to-FI Customer Credit Transfer library as tools for AI agents and assistants, enabling generation, validation, and parsing of pacs.008 credit transfer XML messages.
      16
      49 PyPI
      1
      Apache 2.0