{
  "markdown": "# pacs008-mcp: An MCP Server for ISO 20022 FI-to-FI Credit Transfers\n\n![pacs008-mcp banner][banner]\n\n[![PyPI Version][pypi-badge]][07]\n[![Python Versions][python-versions-badge]][07]\n[![PyPI Downloads][pypi-downloads-badge]][07]\n[![Licence][licence-badge]][01]\n[![Tests][tests-badge]][tests-url]\n[![Quality][quality-badge]][quality-url]\n[![Documentation][docs-badge]][docs-url]\n\n**A [Model Context Protocol][mcp] server that exposes the [`pacs008`][core]\nISO 20022 FI-to-FI Customer Credit Transfer library as tools for AI agents and\nassistants** — discover message types and scheme profiles, validate records\nagainst the JSON Schema and against a rail's usage guidelines, generate\nvalidated XML, validate raw XML against the bundled XSD, and parse inbound\nmessages, all from your favourite MCP client.\n\n> **Latest release: v0.0.6** — 15 MCP tools over stdio, all backed by the\n> `pacs008` library, for Python 3.10+. Adds `convert_mt103`, the legacy SWIFT\n> MT103 → pacs.008 (MT→MX) migration path.\n\n## Contents\n\n- [Overview](#overview)\n- [Install](#install)\n- [Quick Start](#quick-start)\n- [Tools](#tools)\n- [November 2026 structured-address cliff](#november-2026-structured-address-cliff)\n- [Using the tools](#using-the-tools)\n- [Development](#development)\n- [Licence](#licence)\n- [Contribution](#contribution)\n- [Acknowledgements](#acknowledgements)\n\n## Overview\n\nThe [Model Context Protocol][mcp] (MCP) is an open standard that lets AI agents\nand assistants discover and call external tools in a uniform way. **pacs008-mcp**\nis an MCP server that turns the [`pacs008`][core] library into a set of\nfirst-class agent tools, so an assistant can generate, validate, and parse\n**ISO 20022 `pacs.008` FI-to-FI Customer Credit Transfer XML messages** — and\nthe related pacs.002/.004 status and return messages — directly from a\nconversation.\n\nEvery tool is a thin, typed wrapper over the `pacs008` library — the same\npackage used by the CLI and REST API — so all interfaces behave identically.\nTools return JSON-serialisable data; on a validation error they return an\n`{\"error\": ...}` payload rather than raising.\n\n- **Website:** <https://pacs008.com>\n- **Source code:** <https://github.com/sebastienrousseau/pacs008-mcp>\n- **Bug reports:** <https://github.com/sebastienrousseau/pacs008-mcp/issues>\n\n```mermaid\nflowchart LR\n    A[\"MCP client<br/>(Claude Desktop, IDE, agent)\"] -->|stdio| B[\"pacs008-mcp\"]\n    B -->|delegates to| C[\"pacs008 library\"]\n    C -->|render + validate| D[\"ISO 20022 pacs XML\"]\n```\n\n## Install\n\n**pacs008-mcp** runs on macOS, Linux, and Windows and requires **Python 3.10+**\nand **pip**. It pulls in the core `pacs008` library and the MCP SDK\nautomatically.\n\n```sh\npython -m pip install pacs008-mcp\n```\n\n> **Note:** while the core `pacs008` library is not yet on PyPI, install it from\n> source first:\n>\n> ```sh\n> python -m pip install \"git+https://github.com/sebastienrousseau/pacs008.git\"\n> python -m pip install pacs008-mcp\n> ```\n\n## Quick Start\n\nLaunch the server over stdio (the FastMCP default transport):\n\n```sh\npacs008-mcp\n```\n\nRegister it with any MCP client (e.g. Claude Desktop) by adding it to the\nclient's configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"pacs008\": { \"command\": \"pacs008-mcp\" }\n  }\n}\n```\n\n## Tools\n\nAll tools wrap the `pacs008` library, so they behave identically to the CLI and\nREST API.\n\n- `list_message_types` — List the 20 supported ISO 20022 pacs message types\n- `list_schemes` — List the registered scheme / usage-guideline profiles\n- `get_scheme` — Inspect a scheme profile's rules\n- `get_required_fields` — Required input fields for a message type\n- `get_input_schema` — Full input JSON Schema for a message type\n- `validate_records` — Validate flat records against a message type's schema\n- `validate_scheme` — Validate records against a scheme's usage guidelines\n- `generate_message` — Generate a validated pacs XML message\n- `validate_xml` — Validate a raw XML string against the bundled XSD\n- `parse_message` — Parse & classify an inbound ISO 20022 message\n- `convert_mt103` — Convert a legacy SWIFT MT103 into pacs.008-ready records (MT→MX migration)\n- `classify_address` — Classify a postal address as structured / hybrid / unstructured\n- `validate_address` — Validate one postal address against an address policy\n- `repair_address` — Upgrade legacy unstructured address lines toward hybrid/structured form\n- `validate_addresses` — Batch-validate every party address across payment rows\n\n## November 2026 structured-address cliff\n\nOn **14 November 2026**, fully unstructured postal addresses are decommissioned\nacross SWIFT CBPR+, HVPS+, TARGET2 RTGS, CHAPS, Fedwire and Lynx — after that\ndate, any cross-border or high-value payment carrying an unstructured-only\npostal address is **rejected at the rail**. The four address tools above wrap\nthe `pacs008` library's `standards.address` module so an agent can get ahead of\nthe deadline: `classify_address` shows where an address stands, `validate_address`\n/ `validate_addresses` enforce a policy (defaulting to the cliff rule\n`hybrid_or_structured`, which rejects unstructured addresses), and\n`repair_address` runs country-aware heuristics (`GB`, `US`, `DE`, `FR`, `JP`,\nplus a best-effort fallback) to lift legacy address lines into hybrid form.\nThe repair step is experimental — audit its output before submitting downstream.\n\n## Using the tools\n\nYou can invoke the tools in-process — without a transport — straight through the\nFastMCP instance. This mirrors what an agent receives over stdio. The runnable\nversion of this snippet lives in [`examples/mcp_tools.py`](examples/mcp_tools.py).\n\n```python\nimport asyncio\n\nfrom pacs008_mcp.server import server\n\nrecord = [\n    {\n        \"msg_id\": \"MSG001\",\n        \"creation_date_time\": \"2026-01-15T10:30:00\",\n        \"nb_of_txs\": \"1\",\n        \"settlement_method\": \"CLRG\",\n        \"interbank_settlement_date\": \"2026-01-15\",\n        \"end_to_end_id\": \"E2E001\",\n        \"interbank_settlement_amount\": \"1000.00\",\n        \"interbank_settlement_currency\": \"EUR\",\n        \"charge_bearer\": \"SHAR\",\n        \"debtor_name\": \"Debtor Corp\",\n        \"debtor_agent_bic\": \"DEUTDEFF\",\n        \"creditor_agent_bic\": \"COBADEFF\",\n        \"creditor_name\": \"Creditor Ltd\",\n    }\n]\n\n\nasync def main() -> None:\n    async def call(name, args):\n        result = await server.call_tool(name, args)\n        content = result[0] if isinstance(result, tuple) else result\n        return content[0].text if content else \"\"\n\n    print(await call(\"list_schemes\", {}))\n    xml = await call(\"generate_message\",\n                     {\"message_type\": \"pacs.008.001.08\", \"records\": record})\n    print(xml[:46])  # -> <?xml version=\"1.0\" encoding=\"UTF-8\"?> ...\n\n\nasyncio.run(main())\n```\n\nRun it directly:\n\n```sh\npython examples/mcp_tools.py\n```\n\n## Development\n\n**pacs008-mcp** uses [Poetry](https://python-poetry.org/) and\n[mise](https://mise.jdx.dev/).\n\n```bash\ngit clone https://github.com/sebastienrousseau/pacs008-mcp.git && cd pacs008-mcp\nmise install\npoetry install\npoetry shell\n```\n\n> This package depends on the core `pacs008` library. Until it is on PyPI,\n> install it from source first:\n> `pip install \"git+https://github.com/sebastienrousseau/pacs008.git\"`.\n\nA `Makefile` orchestrates the quality gates (kept in lockstep with CI):\n\n```bash\nmake check        # all gates (REQUIRED before commit)\nmake test         # pytest\nmake lint         # ruff + black\nmake type-check   # mypy --strict\n```\n\n---\n\n## Related MCP Servers\n\nPart of the **ISO 20022 MCP Suite** — open-source, Apache-2.0 licensed MCP servers for banking and financial-services AI agents:\n\n| Server | Purpose |\n|---|---|\n| [`pain001-mcp`](https://github.com/sebastienrousseau/pain001-mcp) | Generate & validate ISO 20022 pain.001 payment files (v03–v12, pain.008, SEPA) with rulebook checks |\n| [`camt053-mcp`](https://github.com/sebastienrousseau/camt053-mcp) | Parse & reconcile ISO 20022 camt.053 bank-to-customer statements — CBPR+/HVPS+ ready |\n| [`acmt001-mcp`](https://github.com/sebastienrousseau/acmt001-mcp) | Generate & validate ISO 20022 acmt account-management messages |\n| [`bankstatementparser-mcp`](https://github.com/sebastienrousseau/bankstatementparser-mcp) | Parse bank statements (BAI2, MT940/MT942, CAMT.053, OFX, CSV) into structured transactions |\n| [`noyalib-mcp`](https://github.com/sebastienrousseau/noyalib) | Lossless YAML 1.2 parsing, formatting & validation (Rust, 100% spec compliance) |\n\n---\n\n## MCP Registry\n\n`mcp-name: io.github.sebastienrousseau/pacs008-mcp`\n\n---\n\n## Licence\n\nLicensed under the [Apache Licence, Version 2.0][01]. Any contribution submitted\nfor inclusion shall be licensed as above, without additional terms.\n\n## Contribution\n\nContributions are welcome — see the [contributing instructions][04]. Thanks to\nall [contributors][05].\n\n## Acknowledgements\n\nBuilt on the [`pacs008`][core] ISO 20022 FI-to-FI Customer Credit Transfer\nlibrary and the [Model Context Protocol][mcp] Python SDK.\n\n[01]: https://opensource.org/license/apache-2-0/\n[04]: https://github.com/sebastienrousseau/pacs008-mcp/blob/main/CONTRIBUTING.md\n[05]: https://github.com/sebastienrousseau/pacs008-mcp/graphs/contributors\n[07]: https://pypi.org/project/pacs008-mcp/\n[core]: https://github.com/sebastienrousseau/pacs008\n[mcp]: https://modelcontextprotocol.io\n[banner]: https://kura.pro/pacs008-mcp/images/banners/banner-pacs008-mcp.svg 'pacs008-mcp'\n[docs-badge]: https://img.shields.io/badge/Docs-pacs008.com-blue?style=for-the-badge\n[docs-url]: https://pacs008.com/\n[licence-badge]: https://img.shields.io/pypi/l/pacs008-mcp?style=for-the-badge\n[pypi-badge]: https://img.shields.io/pypi/v/pacs008-mcp?style=for-the-badge\n[pypi-downloads-badge]: https://img.shields.io/pypi/dm/pacs008-mcp.svg?style=for-the-badge\n[python-versions-badge]: https://img.shields.io/pypi/pyversions/pacs008-mcp.svg?style=for-the-badge\n[quality-badge]: https://img.shields.io/github/actions/workflow/status/sebastienrousseau/pacs008-mcp/ci.yml?branch=main&label=Quality&style=for-the-badge\n[quality-url]: https://github.com/sebastienrousseau/pacs008-mcp/actions/workflows/ci.yml\n[tests-badge]: https://img.shields.io/github/actions/workflow/status/sebastienrousseau/pacs008-mcp/ci.yml?branch=main&label=Tests&style=for-the-badge\n[tests-url]: https://github.com/sebastienrousseau/pacs008-mcp/actions/workflows/ci.yml\n",
  "bytes": 10308,
  "sha": "4e78dcc5679c7fb7f631368d721fb1d5e39f663388be54b2528768165a9051fa",
  "repo_slug": "sebastienrousseau/pacs008-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sebastienrousseau_pacs008_mcp_00805e88/readme"
}