Odel
pain001 mcp

pain001 mcp

Local
@sebastienrousseau1PythonUpdated 1w ago

MCP server for ISO 20022 pain.001/pain.008 payment-file generation and validation.

|stdio| B["pain001-mcp"]
B -->|delegates to| C["pain001"]
C -->|render + validate| D["ISO 20022 pain.001 XML"]

---

## When not to use pain001-mcp

- **You're not driving an MCP-aware agent.** Use the CLI
  (`pain001 …`) or the REST API (`pain001 serve`) directly — both expose
  the same surface with less indirection.
- **You need editor diagnostics, not agent tools.** Use
  [`pain001-lsp`](https://pypi.org/project/pain001-lsp/) — it speaks
  the Language Server Protocol to VS Code, Neovim, Helix, Emacs, etc.
- **You need to extend the tool surface in-tree.** The companion
  [`pain001[mcp]`](https://github.com/sebastienrousseau/pain001) extra
  exposes the same FastMCP instance and is easier to fork inside an
  organisation's pain001 install.

---

## Development

`pain001-mcp` uses [Poetry](https://python-poetry.org/) and
[mise](https://mise.jdx.dev/).

```bash
git clone https://github.com/sebastienrousseau/pain001-mcp.git
cd pain001-mcp
mise install
poetry install

A Makefile orchestrates the quality gates (kept in lockstep with CI):

TargetWhat it runs
make checkAll gates (REQUIRED before commit)
make testpytest --cov=pain001_mcp --cov-branch --cov-fail-under=100
make lintruff check + black --check
make type-checkmypy --strict
make docsinterrogate --fail-under=100 (docstring coverage)

Current state (v0.0.57): 71 tests passing, 100% line + branch coverage against a 100% enforced floor, mypy --strict clean, interrogate 100%.


Security

  • No filesystem writes from tools. generate_message and generate_message_from_file return the XML as a string; no tool writes to disk.
  • XML parsing of camt.053 and pain.002 is routed through defusedxml (via the core pain001 library); XXE and entity expansion are rejected.
  • Validation failures are returned as structured {"error": ...} payloads — never as stack traces — so the agent never sees an internal path leak.
  • Dependencies are pinned via poetry.lock and audited by pip-audit and Bandit in CI.

To report a vulnerability, please use GitHub private vulnerability reporting rather than a public issue.


Documentation


Contributing

Contributions are welcome — see the contributing instructions. Thanks to all the contributors who have helped build pain001-mcp.


Related MCP Servers

Part of the ISO 20022 MCP Suite — open-source, Apache-2.0 licensed MCP servers for banking and financial-services AI agents:

ServerPurpose
pacs008-mcpGenerate, validate, parse & scheme-check ISO 20022 pacs.008 FI-to-FI credit transfers + Nov-2026 address linting
camt053-mcpParse & reconcile ISO 20022 camt.053 bank-to-customer statements — CBPR+/HVPS+ ready
acmt001-mcpGenerate & validate ISO 20022 acmt account-management messages
bankstatementparser-mcpParse bank statements (BAI2, MT940/MT942, CAMT.053, OFX, CSV) into structured transactions
noyalib-mcpLossless YAML 1.2 parsing, formatting & validation (Rust, 100% spec compliance)

MCP Registry

mcp-name: io.github.sebastienrousseau/pain001-mcp


License

Licensed under the Apache License, Version 2.0. Any contribution submitted for inclusion shall be licensed as above, without additional terms.


pain001.com · PyPI · GitHub