
Structured Address Fix Mcp
io.github.sebastienrousseau由 GitHub 账号 sebastienrousseau 发布v0.0.6更新于 Oct 24, 2026
MCP server for ISO 20022 postal-address remediation ahead of the Nov 2026 CBPR+ cliff.
概览
本地 MCP 服务器,让助手在 2026 年 11 月切换前对 ISO 20022 邮政地址以及 pacs.008 / pain.001 报文中的相关方进行分类、评估与整改。
- 可以做什么
- 对单个邮政地址按所选策略进行分类、评估与整改,给出前后对比和带置信度的补丁操作
- 评估并整改 pacs.008 或 pain.001 报文中的每个地址相关方,可选择应用补丁并返回修改后的 XML,也可先做试运行预览
- 列出可用的地址策略并解释发现代码的含义
- 报告强制切换日期,并按各国格式策略校验邮政编码
- 把国家名称和别名规范为 ISO 3166-1 alpha-2 代码,把街道行拆分为街道、建筑和子建筑,并把自由文本地址解析为 ISO 20022 字段
- 适用场景
- 适用于处理 ISO 20022 支付报文、需要判断债务人或债权人地址是否会在 2026 年 11 月结构化地址切换时被拒收,并在对话中生成合规替代形式。它只专注地址,不负责生成或校验报文本身。
- 运行要求
- 作为本地进程运行:需要 Python 3.12+ 和 pip,从 PyPI 包安装,由 MCP 客户端通过 stdio 启动。可用参数启用可选的 streamable HTTP 或 SSE 传输,默认绑定 127.0.0.1:8000。未声明任何账号、API 密钥或环境变量。可选的 libpostal 解析器需要额外安装。
安装
在 SourceWeft 中
- 打开 控制台中的 Structured Address Fix Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
structured-address-fix-mcp: An MCP Server for ISO 20022 Postal Addresses
[PyPI Version] [Python Versions] [License] [Tests] [Quality] [OpenSSF Scorecard] [Documentation] [Glama MCP server score]
[structured-address-fix-mcp Demo]
A Model Context Protocol server that exposes the
structured-address-fix ISO 20022 postal-address library as tools for
AI agents and assistants — classify an address's shape, assess it against a
scheme policy, and remediate it (or a whole pacs.008 / pain.001 message) into
the structured form the November 2026 cutover requires, all from your
favourite MCP client.
The 14 November 2026 cliff. On that date CBPR+, HVPS+, T2, CHAPS, and Fedwire stop accepting fully unstructured postal addresses: a payment whose debtor/creditor address is a free-text blob is rejected.
structured-address-fix-mcpputs the readiness check and the fix in front of your agent —assess_messageflags the offending parties,remediate_messageproposes the compliant form, andget_cutover_datereports the binding date. v0.0.6, stdio, streamable HTTP and SSE transports, 13 tools, Python 3.12+.
Contents
- Overview
- The ISO 20022 MCP Suite
- Install
- Quick Start
- Transports — stdio, streamable HTTP (2026-07-28 and 2025-11-25) and SSE from one command line
- Tools
- Using the tools
- Related MCP Servers
- When not to use structured-address-fix-mcp
- Development
- Security
- Documentation
- License
- Contributing
- Acknowledgements
Overview
The Model Context Protocol (MCP) is an open standard that lets AI agents
and assistants discover and call external tools in a uniform way.
structured-address-fix-mcp is an MCP server that turns the
structured-address-fix library into a set of first-class agent tools,
so an assistant can read a postal address — or every addressed party in an
ISO 20022 pacs.008 / pain.001 message — and bring it into line with the
structured-address rules that become mandatory on 14 November 2026,
directly from a conversation.
The headline capability is the one-shot remediation workflow: assess a message, find the parties whose addresses will be rejected at the cliff, and emit the compliant form with each change explained and confidence-scored.
Every tool is a thin, typed wrapper over structured_address_fix.services —
the single shared facade also used by the CLI — so all interfaces behave
identically. Tools return JSON-serialisable data; on an error they return an
{"error": ...} payload rather than raising.
- Website: https://sebastienrousseau.github.io/structured-address-fix/
- Source code: https://github.com/sebastienrousseau/structured-address-fix-mcp
- Bug reports: https://github.com/sebastienrousseau/structured-address-fix-mcp/issues
The ISO 20022 MCP Suite
structured-address-fix-mcp is the postal-address specialist in a set of
coordinated, vendor-neutral MCP servers for the ISO 20022 migration.
Dependency ranges are kept aligned across the suite, so the servers co-install
cleanly in a single Python environment: start with one, add the rest as your
workflow grows.
The suite also includes the iso20022-mcp
gateway (unified search / describe / validate / generate / parse
meta-tools across the whole message catalogue) and
acmt001-mcp (account
management). Where pacs008-mcp lints a message for address problems,
structured-address-fix-mcp is the specialist that classifies, assesses, and
fixes the addresses themselves against per-scheme policies.
Install
structured-address-fix-mcp runs on macOS, Linux, and Windows and requires
Python 3.12+ and pip. It pulls in the core structured-address-fix
library and the MCP SDK automatically.
Using an isolated virtual environment (recommended)
Quick Start
For the 10-minute install → MCP client config → first conversation
tutorial, see docs/quickstart.md.
Launch the server over stdio (the default transport):
Register it with any MCP client (e.g. Claude Desktop) by adding it to the client's configuration:
The command speaks MCP on stdin/stdout by default — it is meant to be launched by an MCP client, not used interactively. For a shared deployment or an HTTP client, see Transports. The agent can then call the tools below to assess and remediate postal addresses on demand.
Transports
One command line, three transports:
--host and --port change the bind address (defaults 127.0.0.1 and
8000). The HTTP transports carry no authentication of their own: bind
loopback, or put the server behind a gateway you trust before binding a
routable address. Every release is verified over streamable HTTP with
scout in both protocol
eras and over SSE with the MCP SDK client; see
ADR 0001.
Tools
All tools delegate to the shared structured_address_fix.services layer, so
they behave identically to the CLI. Tools return JSON-serialisable data; on a
domain, validation, or value error they return an {"error": ...} payload.
list_policies— List every available address policy (rulebook) with its tier (e.g.cbpr-2026,sepa,hvps-plus,generic-structured)classify_address— Classify a postal address as structured, hybrid, or unstructured (a quick shape check)assess_address— Score a single address against a policy and return its findingsassess_message— Assess every addressed party in a pacs.008 / pain.001 message against a policyremediate_address— Propose the compliant form of an address, with the before/after and confidence-scored patch operationsremediate_message— Assess and remediate every addressed party in a message; optionally apply the operations and return the patched XMLpreview_patch— Return the patch operations remediation would apply to a message (a dry run)explain_finding— Explain what a finding code (e.g.SAF001) means and how to resolve itget_cutover_date— Return the binding November 2026 structured-address cutover date and the scheme that sets itnormalize_country_code— Resolve a country name or code to its ISO 3166-1 alpha-2 code, accepting English names, local endonyms (Deutschland, España, Nippon) and everyday aliases (UK, USA, Holland, UAE)split_street_and_building— Split a street line into street name, building and sub-building, handling both the leading-number convention (10 Downing Street) and the trailing-number one used across much of continental Europevalidate_postal_policy— Validate an address'spost_codeagainst a country's format policy (US ZIP / ZIP+4, GB alphanumeric, and others)parse_address_libpostal— Parse a free-text address into ISO 20022 postal fields; uses libpostal's statistical parser when the optionalpostalextra is installed, and a deterministic fallback otherwise
Optional parameters shared across the assessment/remediation tools: policy_id
(defaults to cbpr-2026), as_of (an YYYY-MM-DD date that decides the cliff
wording; defaults to today), and country_hint (an ISO 3166-1 alpha-2 code to
assume when an address carries no country of its own).
Using the tools
You can invoke the tools in-process — without a transport — straight through the
FastMCP instance. This mirrors what an agent receives over stdio. The runnable
version of this snippet lives in examples/mcp_tools.py.
Run it directly:
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:
When not to use structured-address-fix-mcp
- You have no MCP client. This server only makes sense paired with an
MCP-aware host (Claude Desktop, the IDE plugins, an agent framework). For
scripted / CI use, the
structured-address-fixCLI covers the same ground without the stdio protocol overhead. - You need an authenticated, multi-tenant service. The HTTP transports (Transports) carry no authentication of their own and bind loopback by default; put them behind a gateway you trust. OAuth 2.1 resource-server auth and tenant scoping are on the roadmap, not in this release.
- You need streaming responses. Tool calls return whole values, not streams. Large messages are assessed and remediated in one call, not chunked over multiple responses.
- You need to build the pacs.008 / pain.001 message. Out of scope; this
server fixes the addresses inside a message. Use
pacs008-mcporpain001-mcpto generate and validate the message itself.
Development
structured-address-fix-mcp uses Poetry and mise.
Note: the server depends on the core
structured-address-fixlibrary. Until it is published to PyPI, the dev dependency group installs it from the sibling checkout (../structured-address-fix); seeCONTRIBUTING.md.
A Makefile orchestrates the quality gates (kept in lockstep with CI):
Security
structured-address-fix-mcp is a thin wrapper — every tool delegates to
structured_address_fix.services, where the defence-in-depth for XML parsing
(defusedxml) lives. Tools catch the documented domain, validation, and value
errors and return an {"error": ...} envelope per the suite convention; they
never propagate raw exceptions to the MCP client. Reporting practice, supported
versions, and the full supply-chain posture (SLSA L3 provenance, PEP 740
attestations, SBOMs, and the NIST SP 800-218 SSDF practice mapping) are
documented in SECURITY.md. Vulnerabilities go via GitHub
Private Vulnerability Reporting, not public issues.
Documentation
README.md— this fileCHANGELOG.md— release notesSECURITY.md— disclosure + supported versionsSUPPORT.md— how to get helpROADMAP.md— what's next (OAuth on the HTTP transports, observability, entitlement gating)MAINTAINERS.md— who can mergedocs/quickstart.md— 10-minute install → first conversationdocs/deployment-cookbook.md— client configs (Claude Desktop, Cursor, containers) and the HTTP transportsdocs/adr/— architecture decision recordsARCHITECTURE.md— a map of the codebaseRELEASING.md— how a release is cutexamples/— runnable scriptsglama.json— Glama directory manifest
MCP Registry
mcp-name: io.github.sebastienrousseau/structured-address-fix-mcp
License
Licensed under the Apache License, Version 2.0. Any contribution submitted for inclusion shall be licensed as above, without additional terms.
Contributing
Contributions are welcome — see the contributing instructions. Thanks to all contributors.
Acknowledgements
Built on the structured-address-fix ISO 20022 postal-address library
and the Model Context Protocol Python SDK.
来源:README.md,提交 932b7d6
工具
0版本历史
3- v0.0.6最新Oct 4, 2026
- v0.0.5Oct 4, 2026
- v0.0.4Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分