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):
| Target | What it runs |
|---|---|
make check |
All gates (REQUIRED before commit) |
make test |
pytest --cov=pain001_mcp --cov-branch --cov-fail-under=100 |
make lint |
ruff check + black --check |
make type-check |
mypy --strict |
make docs |
interrogate --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_messageandgenerate_message_from_filereturn the XML as a string; no tool writes to disk. - XML parsing of
camt.053andpain.002is routed throughdefusedxml(via the corepain001library); 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.lockand audited bypip-auditand Bandit in CI.
To report a vulnerability, please use GitHub private vulnerability reporting rather than a public issue.
Documentation
- Runnable examples:
examples/ - Release history: CHANGELOG.md
- Core library docs: docs.pain001.com
- MCP specification: modelcontextprotocol.io
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:
| Server | Purpose |
|---|---|
pacs008-mcp |
Generate, validate, parse & scheme-check ISO 20022 pacs.008 FI-to-FI credit transfers + Nov-2026 address linting |
camt053-mcp |
Parse & reconcile ISO 20022 camt.053 bank-to-customer statements — CBPR+/HVPS+ ready |
acmt001-mcp |
Generate & validate ISO 20022 acmt account-management messages |
bankstatementparser-mcp |
Parse bank statements (BAI2, MT940/MT942, CAMT.053, OFX, CSV) into structured transactions |
noyalib-mcp |
Lossless 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pain001_mcp-0.0.70.tar.gz.
File metadata
- Download URL: pain001_mcp-0.0.70.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59bc6cdff9ca1ea52f3d0413fdb5a3777aab2c833632f67d4ed2c0aaebe42f85
|
|
| MD5 |
54d6886ddd972bd16b2bbb1c7ce42620
|
|
| BLAKE2b-256 |
4f897a4837d00d3b739ef0ad184465d53d8463ef0c4ec845a2eedac1f8f9ef92
|
Provenance
The following attestation bundles were made for pain001_mcp-0.0.70.tar.gz:
Publisher:
release.yml on sebastienrousseau/pain001-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pain001_mcp-0.0.70.tar.gz -
Subject digest:
59bc6cdff9ca1ea52f3d0413fdb5a3777aab2c833632f67d4ed2c0aaebe42f85 - Sigstore transparency entry: 2811598019
- Sigstore integration time:
-
Permalink:
sebastienrousseau/pain001-mcp@f23e62ad0531ea45750db387eb3a4bfa68725303 -
Branch / Tag:
refs/tags/v0.0.70 - Owner: https://github.com/sebastienrousseau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f23e62ad0531ea45750db387eb3a4bfa68725303 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pain001_mcp-0.0.70-py3-none-any.whl.
File metadata
- Download URL: pain001_mcp-0.0.70-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57607b893edf7c989f9fdc1788901bb510049f53897b23c318ac8ef75a7db324
|
|
| MD5 |
9c268e748b87ad2f134e27330165b68b
|
|
| BLAKE2b-256 |
6a94cc2df3ad8344525b3981dcd9e376ea40569cc8fe3c86ff4ca2c1d33de529
|
Provenance
The following attestation bundles were made for pain001_mcp-0.0.70-py3-none-any.whl:
Publisher:
release.yml on sebastienrousseau/pain001-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pain001_mcp-0.0.70-py3-none-any.whl -
Subject digest:
57607b893edf7c989f9fdc1788901bb510049f53897b23c318ac8ef75a7db324 - Sigstore transparency entry: 2811598099
- Sigstore integration time:
-
Permalink:
sebastienrousseau/pain001-mcp@f23e62ad0531ea45750db387eb3a4bfa68725303 -
Branch / Tag:
refs/tags/v0.0.70 - Owner: https://github.com/sebastienrousseau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f23e62ad0531ea45750db387eb3a4bfa68725303 -
Trigger Event:
push
-
Statement type: