camt053 Documentation#
camt053 is a Python library for the modern, AI-assisted treasury stack:
read ISO 20022 camt Bank-to-Customer Cash Management messages (camt.053 / 052 /
054), extract booked entries by return reason code, and generate validated
reversing entries. Generated reversals are validated against the official ISO
20022 camt.053.001.14 schema.
The headline workflow#
“Read this incoming bank statement XML, parse out the transactions with error code AC04, and automatically generate the reversing entry.”
from camt053 import services
reversal_xml = services.generate_reversal(statement_xml, reason_code="AC04")
Interfaces#
Four developer-facing surfaces sit on top of one shared service layer
(camt053.services), so they all behave identically:
Python API —
parse_statement/generate_reversal_for_statement/camt053.services.Command-line interface — the
camt053console command (parse,entries,reverse,message-types,reasons,validate-id).REST API — a FastAPI application (
camt053.api.app:app).MCP server — a Model Context Protocol server (
camt053-mcp) exposing the library as tools for AI agents.LSP server — a Language Server (
camt053-lsp) providing diagnostics, completion, and hover for reversing-entry data files in editors.
The MCP and LSP servers ship as companion packages (Python 3.10+):
pip install camt053-mcp camt053-lsp
Runnable, self-contained examples for every feature live in the examples/
directory (see examples/README.md).
Quick Start#
from camt053 import parse_statement, services
stmt = parse_statement(incoming_xml)
print(stmt.account.identifier(), len(stmt.entries), "entries")
ac04 = services.filter_entries(incoming_xml, "AC04")
reversal = services.generate_reversal(incoming_xml, reason_code="AC04")
Quickstart tutorial#
API Reference#
Schema-version support matrix#
Deployment cookbook#
Security & compliance#
Posts#
Design History File#
Design History File (DHF)