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.

已驗證STDIO僅桌面金融開發者工具

概覽

AI 產生的概覽

本機 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 解析器需額外安裝。
安裝前請注意
HTTP 傳輸本身不帶身分驗證,應綁定回環位址或置於可信任的閘道之後。整改工具可套用修補操作並回傳修改後的 XML,讓助理改寫訊息前應先檢視試跑預覽。訊息中的地址資料由伺服器在本機處理,說明中未提及將資料傳送給第三方。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Structured Address Fix Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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-mcp puts the readiness check and the fix in front of your agent — assess_message flags the offending parties, remediate_message proposes the compliant form, and get_cutover_date reports the binding date. v0.0.6, stdio, streamable HTTP and SSE transports, 13 tools, Python 3.12+.

Contents

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.

mermaid
flowchart LR    A["MCP client<br/>(Claude Desktop, IDE, agent)"] -->|stdio, streamable HTTP or SSE| B["structured-address-fix-mcp"]    B -->|delegates to| C["structured_address_fix.services"]    C -->|classify + assess + remediate| D["ISO 20022 postal addresses<br/>(pacs.008 / pain.001)"]

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.

ServerScopeInstallUse it when
structured-address-fix-mcpISO 20022 postal-address classification, assessment, and remediation for the Nov 2026 structured-address cliffpip install structured-address-fix-mcpYou need to get debtor/creditor addresses cliff-ready — this package
pacs008-mcpGenerate, validate, parse & scheme-check ISO 20022 pacs.008 FI-to-FI credit transfers, with Nov-2026 address lintingpip install pacs008-mcpYou work with pacs.008 messages end to end
pain001-mcpGenerate & validate ISO 20022 pain.001 payment-initiation files (v03–v12, pain.008, SEPA) with rulebook checkspip install pain001-mcpYou originate outbound payment files
camt053-mcpISO 20022 camt.05x bank statements: parse, validate, filter, reverse; MT94x migration; CBPR+ readinesspip install camt053-mcpYou work with bank-to-customer statements
iso20022-readiness-suite-mcpOrchestration gateway: detect → validate → clearing-profile lint → readiness score, plus remediation and pacs.002 simulation — a meta-client over the foundational serverspip install iso20022-readiness-suite-mcpYou want one high-level readiness / orchestration entry point over the suite
iso20022-bank-profile-mcpManages, validates and serves bank-specific clearing profiles / rule packs; premium rule-pack entitlement gatingpip install iso20022-bank-profile-mcpYou lint payments against your own institution's market practice
iso20022-evidence-pack-mcpCompiles readiness findings, remediation diffs and simulated responses into a sealed, Ed25519-signable audit evidence packpip install iso20022-evidence-pack-mcpYou need tamper-evident audit / certification artifacts

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.

sh
python -m pip install structured-address-fix-mcp
Using an isolated virtual environment (recommended)
sh
python -m venv venvsource venv/bin/activate        # macOS/Linuxvenv\Scripts\activate           # Windowspython -m pip install -U structured-address-fix-mcp

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):

sh
structured-address-fix-mcp

Register it with any MCP client (e.g. Claude Desktop) by adding it to the client's configuration:

json
{  "mcpServers": {    "structured-address-fix": { "command": "structured-address-fix-mcp" }  }}

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:

CommandTransportEndpointProtocol revisions
structured-address-fix-mcpstdiothe client spawns the process2026-07-28, 2025-11-25
structured-address-fix-mcp --transport streamable-httpStreamable HTTPhttp://127.0.0.1:8000/mcp2026-07-28 (stateless, server/discover) and 2025-11-25 (initialize, Mcp-Session-Id) on the same endpoint; responses stream as server-sent events, GET opens the server-to-client stream
structured-address-fix-mcp --transport sseHTTP+SSE (2024-11-05)http://127.0.0.1:8000/sse and /messages/for clients that still expect the older transport

--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.

json
{  "mcpServers": {    "structured-address-fix": { "url": "http://127.0.0.1:8000/mcp" }  }}

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 findings
  • assess_message — Assess every addressed party in a pacs.008 / pain.001 message against a policy
  • remediate_address — Propose the compliant form of an address, with the before/after and confidence-scored patch operations
  • remediate_message — Assess and remediate every addressed party in a message; optionally apply the operations and return the patched XML
  • preview_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 it
  • get_cutover_date — Return the binding November 2026 structured-address cutover date and the scheme that sets it
  • normalize_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 Europe
  • validate_postal_policy — Validate an address's post_code against 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 optional postal extra 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.

python
import asyncio
from structured_address_fix_mcp import server
# A fully unstructured address: two free-text lines, no structured fields.# At the 14 Nov 2026 cliff this form is rejected across the major schemes.unstructured = {    "address_lines": ["10 Downing St", "London SW1A 2AA"],    "country": "GB",}

async def main() -> None:    async def call(name, args):        result = await server.server.call_tool(name, args)        # mcp 2.x returns a CallToolResult (read .content); 1.x        # returns the content list, or a (content, meta) tuple.        content = getattr(result, "content", None)        if content is None:            content = result[0] if isinstance(result, tuple) else result        return content[0].text if content else ""
    # When does the cliff bite?    print(await call("get_cutover_date", {}))    # -> {"date": "2026-11-14", "scheme": "SWIFT CBPR+ UG2026"}
    # What shape is this address in right now?    print(await call("classify_address", {"address": unstructured}))    # -> {"classification": "unstructured"}
    # Propose the compliant form, with each change explained.    print(await call("remediate_address",                     {"address": unstructured, "policy_id": "cbpr-2026"}))    # -> {"policy_id": "cbpr-2026", "findings": [...], "suggestions": [...],    #     "is_compliant_before": false, "is_compliant_after": true, ...}

asyncio.run(main())

Run it directly:

sh
python examples/mcp_tools.py

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
pain001-mcpGenerate & validate ISO 20022 pain.001 payment files (v03–v12, pain.008, SEPA) with rulebook checks
camt053-mcpParse, validate, filter & reverse ISO 20022 camt.05x bank statements; MT94x migration; CBPR+ readiness
acmt001-mcpGenerate & validate ISO 20022 acmt account-management messages
iso20022-mcpUnified gateway: search / describe / validate / generate / parse across the pain · pacs · camt · acmt families

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-fix CLI 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-mcp or pain001-mcp to generate and validate the message itself.

Development

structured-address-fix-mcp uses Poetry and mise.

bash
git clone https://github.com/sebastienrousseau/structured-address-fix-mcp.git && cd structured-address-fix-mcpmise installpoetry installpoetry shell

Note: the server depends on the core structured-address-fix library. Until it is published to PyPI, the dev dependency group installs it from the sibling checkout (../structured-address-fix); see CONTRIBUTING.md.

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

bash
make check        # all gates (REQUIRED before commit): lint + type-check + test + examplesmake test         # pytestmake lint         # ruff + blackmake type-check   # mypy --strictmake security     # bandit

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


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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v0.0.6最新Oct 4, 2026
  2. v0.0.5Oct 4, 2026
  3. v0.0.4Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分