Payment Intelligence

io.github.Raafet57由 GitHub 账号 Raafet57 发布v0.3.2更新于 Nov 1, 2026

Offline ISO 20022 payment tools: explain and scrub pacs/camt, CBPR+, SSI checks, IBAN and BIC.

概览

AI 生成的概览

离线 MCP 服务器,让助手在本机解释、脱敏和校验 ISO 20022 支付报文、IBAN、BIC 与 SSI 文件。

可以做什么
  • 解释与解码报文:为 pacs.008、pacs.009 和 camt.053 生成通俗叙述,为 pacs.002、pacs.004、camt.052/054 及案件或 Tracker 报文做字段投影,并解释状态与原因代码。
  • 脱敏报文:把名称、IBAN、账号、UETR 和参考号替换为一致的化名,可选择文件到文件模式,使原始数据不进入对话。
  • 检查就绪度与生命周期:给出 CBPR+ 就绪提示,并把 ACK/NACK、pacs 和 camt 文件按标识符归并为带时间线的线程。
  • 校验标识符:IBAN 结构、MOD-97 校验位、IBAN 构建、BIC 语法与国家代码、LEI 校验位。
  • 查询与核对参考数据:在自有的 SWIFTRef 或 CSV/TSV 文件中查询 BIC、各国清算码和 LEI,校验 SSI 文件,并核对付款是否符合 SSI。
适用场景
适用于支付运营、调查和 ISO 20022 迁移场景:希望助手读取 pacs/camt 文件、梳理退汇与调查案件,或核对 IBAN、BIC 与 SSI 信息,同时不把支付数据发送给第三方。
运行要求
以 stdio 在本机运行;需要 Node.js 20.10 或更高版本,或通过 npx 运行 npm 包 payment-intelligence-mcp。无需账号、API 密钥或网络访问。参考数据查询需要自有的已授权参考文件,可通过 PAYMENT_INTELLIGENCE_REFERENCE_PATH 设置指向其目录。
安装前请注意
只有 scrub_payment_message 会写入,且仅写入指定的 output_path,并拒绝覆盖已有文件。脱敏结果只是化名化而非匿名化,仍可能属于个人数据,分享前应抽查。结果仅为提示:有效 IBAN 不代表账户存在,BIC 与 SSI 检查不能证明路由或可达性,CBPR+ 检查也不是完整的用法规则校验。不提供实时追踪或案件管理。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Payment Intelligence,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Payment Intelligence: ISO 20022 tools for AI assistants

Offline ISO 20022 tools for payment operations, investigations and migration teams, packaged for Claude Code, OpenAI Codex, GitHub Copilot, VS Code, Gemini CLI, Cursor and any MCP client. It is built on the same libraries as the Payment Intelligence Modules browser suite.

Nothing leaves your machine. The plugin runs a local MCP server over stdio. It makes no network calls, sends no telemetry and has no account. It only reads files you name, and writes only the scrubbed copy you ask for.

We don't provide reference data. The plugin works on your own. No SwiftRef, BIC Directory or SSI data is shipped, sold or downloaded. Your institution already licenses that data; the tools read the files you point them at, on your machine: your own reference files, your own SSI file and your own payment messages. It is provider-agnostic:

  • SWIFTRef, current format: unzipped BIC Directory and Payments Directory folders (IDENTIFIERS including historical, PARTICIPANTS and RELATIONSHIPS files; layouts are read from the STRUCTURES file in the same download).
  • SWIFTRef, legacy products: BIC Plus, BIC Directory 2018, Bank Directory Plus, IBAN Plus, SEPA routing, Reach Plus, gpi, and SSI Plus.
  • Any other provider or in-house system: CSV/TSV exports. Common column names are recognised automatically, column_map covers any other layout, and any column it cannot map is listed in the result, so there is no lock-in to one data vendor.

The only data built in is public format rules: the SWIFT IBAN Registry structures, ISO country and currency codes, and the ISO 20022 External Code Sets (2Q2026 v3, August 2026) for payment status, reason and investigation codes.

Messages are read by element, not by schema version. The tests run the payment, statement and cancellation samples on their CBPR+ SR2025 version and on the latest ISO version (for example pacs.008.001.13 and pacs.002.001.15) and expect the same result.

What you can ask

  • "Explain this pacs.008 / pacs.004 / camt.053."
  • "Scrub payments/batch-0412.xml before I send it to the vendor."
  • "Why was this payment returned? Here are the pacs.008, pacs.002 and pacs.004."
  • "Here is the camt.110 we received and the original pacs.008. What are they asking, and has it been answered?"
  • "What did the responder confirm in this camt.111?" or "What do these Tracker notifications say about our case?"
  • "Is DE89 3704 0044 0532 0130 00 a valid IBAN?" or "Build a French IBAN from these bank and account numbers."
  • "Is this message CBPR+ ready?"
  • "Validate our SSI file ssi/master.tsv." or "Does this pacs.009 pay Nova through the correspondent in our SSI file?"
  • "Look up DEUTDEFF in our BIC Directory at ~/swiftref/2026-02." or "Which BIC does sort code 400501 route to?"
  • "Check this pacs.009 against the SSIs in our Payments Directory RELATIONSHIPS file."

Components

TypeNameWhat it does
MCP toolexplain_payment_messageNarrative for pacs.008, pacs.009 and camt.053, field projection for pacs.002, pacs.004, camt.052/054 and case messages (camt.110/111, camt.056/029, the older camt.026/027/028/087, trck.003 and trck.005 Tracker messages), plus insights.
MCP toolscrub_payment_messageConsistent pseudonyms for parties, IBANs, accounts, UETRs and references. File-to-file mode keeps originals out of chat.
MCP toolcheck_cbpr_readinessAppHdr/Document namespace, schema-profile coverage, UETR, BIC, IBAN and LEI hints, and SR2025 usage rules (BizSvc, From/To vs agents, NbOfTxs, references, charges).
MCP toolanalyze_payment_lifecycleGroups ACK/NACK, pacs and camt files into threads with a timeline and warnings. Investigations and cancellations join the payment they quote.
MCP tooldecode_reason_codeMeaning of status and reason codes (RJCT, AC01, MD07, …) from the ISO External Code Sets, with notes for common ones.
MCP toolvalidate_ibanCountry, length, BBAN structure and MOD-97 checks against a bundled SWIFT IBAN Registry snapshot.
MCP toolvalidate_leiLEI length, characters and ISO 7064 MOD 97-10 check digits (ISO 17442). Registration status comes from your own LEI file through lookup_reference_data.
MCP toolbuild_ibanBuilds an IBAN from BBAN fields and computes check digits.
MCP toolcheck_bicISO 9362 syntax and ISO 3166 country-code checks. With your reference files, also looks the BIC up: name, location, current or expired.
MCP toollookup_reference_dataLooks up BICs, national clearing codes and LEIs in your own reference files: records, successors, linked national IDs, service participation.
MCP toolvalidate_ssi_fileChecks an SSI file (SWIFTRef SSI Plus V3, Payments Directory RELATIONSHIPS, CSV or TSV): formats, required fields, dates, staleness, conflicts.
MCP toolcheck_payment_against_ssiChecks a pacs.008 or pacs.009 (or explicit route) against the preferred, effective SSI in the user's own file.
Skillexplain-payment-messageHow to present a message to an operator.
Skillscrub-before-sharingFile-to-file scrubbing workflow that never reads the original.
Skilltriage-payment-exceptionTimeline, root cause, repair and open questions for a failed payment, including its investigation and cancellation cases.
Skillcheck-payment-identifiersIBAN and BIC checks with the right caveats.
Skillcheck-ssiValidates SSI files and checks payments against them, never opening the file itself.

The SSI and reference tools read your files locally, return only the records that match your request, and mask every account number they return.

To avoid naming your reference folder in every request, set PAYMENT_INTELLIGENCE_REFERENCE_PATH to it in the shell you start your agent from (for example export PAYMENT_INTELLIGENCE_REFERENCE_PATH=~/swiftref/latest).

Only scrub_payment_message writes anything. It writes the scrubbed file to the output_path you give, refuses to overwrite an existing file, and never touches the original.

Limits (read before relying on it)

  • CBPR+ checks are readiness hints. They cover the SR2025 usage rules named in the tool description. Postal address and party or agent option rules are not checked.
  • No BIC directory is bundled. Without your reference files, BIC checks are syntax and country code only. With them, a current directory record still does not prove the institution can be reached for a given payment: service participation, routing and bilateral relationships are separate checks. Never use either alone for routing or compliance decisions.
  • Use full reference files. Monthly delta files list only changes, so a lookup in a delta file alone is incomplete. The tools say when a file is a delta. IBAN Plus is used to link national IDs to BICs; IBANs themselves are still validated against the public IBAN Registry structures only.
  • A valid IBAN doesn't mean the account exists. There is no Verification of Payee or account-holder matching.
  • No live tracking. Lifecycle analysis covers only the files you supply. There is no gpi, scheme or settlement lookup.
  • Case messages are read, not managed. camt.110, camt.111, camt.056, camt.029, the older camt.026, camt.027, camt.028 and camt.087, and Swift Tracker messages (trck.003 alerts, trck.005 case status) are explained and threaded from your files. The plugin is not connected to Swift Case Management, keeps no case state, and does not draft, answer or close a case. It projects their fields for triage and does not validate them against usage-guideline rules; MT 199 copies are read, not translated.
  • Pseudonymised, not anonymised. Scrubbed output may still count as personal data under GDPR and similar laws. Spot-check it before sharing.
  • Reason codes come from the ISO External Code Sets 2Q2026 v3 (August 2026). This copy is not the official source; the latest code sets are at iso20022.org. Codes added after that release are not known to the plugin, and a scheme can allow fewer codes than ISO lists.
  • SSI checks are only as good as your SSI file. They test format and consistency, not whether a BIC or account exists, and do not replace confirming SSI changes with the counterparty.

Install

Requires Node.js 20.10 or later. Each agent reads its own manifest from this repository.

AgentInstall
Claude Code/plugin marketplace add Raafet57/payment-intelligence-plugin, then /plugin install payment-intelligence@payment-intelligence
OpenAI Codex (CLI, IDE)codex plugin marketplace add Raafet57/payment-intelligence-plugin, then codex plugin add payment-intelligence@payment-intelligence
GitHub Copilot CLIcopilot plugin marketplace add Raafet57/payment-intelligence-plugin, then copilot plugin install payment-intelligence@payment-intelligence
VS Code (agent plugins)Add the same repository as a plugin marketplace in VS Code, or use the npm package below as an MCP server
Gemini CLIgemini extensions install https://github.com/Raafet57/payment-intelligence-plugin
CursorCursor Marketplace (once listed), or the npm package below as an MCP server
Any MCP clientRun npx -y [email protected] as a stdio MCP server (skills are not included this way)

Then start a new session and try one of the requests above. To try it without your own data, use the sample messages in samples/.

How it is built

server/runtime/ is plain, readable JavaScript with no dependencies and no install step. Every agent runs it with node. Each file is generated from the TypeScript sources of the Payment Intelligence Modules browser suite, so the plugin and the web app share one copy of the payment logic, and each file names the source it came from.

  • The libraries were written for the browser. runtime/dom-shim.mjs gives them a DOMParser in Node, using an unmodified vendored copy of @xmldom/xmldom (MIT).
  • runtime/mcp.mjs is a small hand-written MCP server over stdio. It handles initialize, tools/list and tools/call, and checks every tool call against the tool's input schema.
  • evals/ holds a claude plugin eval suite (Claude Code's eval runner). It checks that the skills trigger, that the right tools are called (scrubbing never reads the original file), and that unrelated requests leave the plugin alone.

License

MIT. See LICENSE.

来源:README.md,提交 da7202c

工具

11

validate_iban

Validate IBAN

Validate an IBAN offline against the bundled SWIFT IBAN Registry snapshot: country, length, BBAN structure and MOD-97 check digits. Does not confirm the account exists.

输入参数iban必填

build_iban

Build IBAN

Build an IBAN from its BBAN fields and compute the MOD-97 check digits. Call without `fields` first to get the country's field template.

输入参数fieldscountry_code必填

check_bic

Check BIC syntax

ISO 9362 BIC syntax and ISO 3166 country-code checks. No bank directory is bundled. With `reference_path` (or the PAYMENT_INTELLIGENCE_REFERENCE_PATH setting), also looks the BIC up in the user's own BIC Directory, Payments Directory, BIC Plus or other provider export: name, location, current or expired, successor BIC, and service participation. A directory record does not prove reachability for a specific payment; never use it alone for routing or compliance decisions.

输入参数bic必填as_ofreference_path

lookup_reference_data

Look up identifiers in your reference data

Look up BICs (BIC8 or BIC11), national clearing codes (sort codes, ABA, IFSC, CNAPS, ...) and LEIs in the user's own reference files, read locally: SWIFTRef BIC Directory and Payments Directory folders (IDENTIFIERS, including historical, PARTICIPANTS and RELATIONSHIPS files; layouts come from the STRUCTURES file), legacy SWIFTRef products (BIC Plus, BIC Directory 2018, Bank Directory Plus, IBAN Plus, SEPA routing, Reach Plus, gpi), or a CSV/TSV export from any provider or in-house system. Returns per identifier: directory records (name, town, country, current or expired, successor), national IDs linked to a BIC, service participation, and SSI relationship counts with masked accounts. Only matching records are returned. No reference data ships with the plugin.

输入参数ids必填pathas_ofcolumn_map

explain_payment_message

Explain payment message

Explain an ISO 20022 payment message. pacs.008, pacs.009 and camt.053 get a plain-language narrative; pacs.002, pacs.004, camt.052 and camt.054 get a structured field projection. Case messages (camt.056 cancellation request, camt.029 resolution, camt.110 investigation request, camt.111 investigation response, the older camt.026, camt.027, camt.028 and camt.087, and the Swift Tracker messages trck.003 alert and trck.005 case status) get the projection plus a `case` field: case id, investigation type, status, reason, the underlying payment's UETR and references, camt.111 answer details (booking confirmation, payment status, amendments, compensation, value date adjustment) and any MT 199 copy Swift embedded in a delivered camt.110, with what it leaves out. All get an operator summary and quick insights. Field projection for triage, not usage-guideline rule validation.

输入参数xmlpath

scrub_payment_message

Scrub payment message

Replace names, IBANs, account ids, UETRs and references in a pacs/camt message with consistent pseudonyms. With `path` + `output_path`, writes the scrubbed copy to disk and returns only masked statistics, so the original data never enters the conversation. Never overwrites an existing file.

输入参数xmlpathoptionsoutput_path

check_cbpr_readiness

Check CBPR+ readiness

Local CBPR+ readiness hints: AppHdr/Document namespaces, schema-profile coverage, UETR, BIC and IBAN syntax. Readiness hints, not usage-rule validation.

输入参数xmlpath

analyze_payment_lifecycle

Analyze payment lifecycle

Group a set of ACK/NACK, pacs and camt files by shared identifiers (UETR, EndToEndId, TxId) into threads with a timeline and warnings. Case messages (camt.026, camt.027, camt.028, camt.029, camt.056, camt.087, camt.110, camt.111) and Tracker messages (trck.003, trck.005) join the thread of the payment they quote; a camt.111 or trck.005 joins its camt.110 by EIR. Works only on the files given.

输入参数pathsdocuments

validate_ssi_file

Validate SSI file

Validate a standing settlement instruction (SSI) file: a SWIFTRef SSI Plus V3 extract or a CSV/TSV export. Checks BIC, ISO country, ISO 4217 currency and SSI asset-category formats, required fields, preferred flags, lifecycle dates, staleness, and conflicts (two preferred correspondents, overlapping active instructions). Rule ids match SSI Control Tower. Accounts are masked in the output.

输入参数as_ofssi_pathcolumn_mapssi_contentmax_findings

check_payment_against_ssi

Check payment against SSI file

Check that a payment pays the beneficiary institution through the correspondent and account in the user's own SSI file. Reads the route from a pacs.008 (creditor agent, last intermediary, CdtrAgtAcct) or pacs.009 (creditor, creditor agent, CdtrAcct), or from explicit fields, then looks up owner BIC + currency + asset category and compares with the preferred SSI effective on the value date. Returns MATCH, ACCOUNT_MISMATCH, AGENT_MISMATCH, NOT_PREFERRED, AMBIGUOUS_SSI, NO_EFFECTIVE_SSI or NO_SSI per transaction. Accounts are masked.

输入参数xmlpathaccountcurrencyssi_pathowner_biccolumn_mapvalue_datessi_contentasset_categoryaccount_holder_bic

decode_reason_code

Decode status or reason code

Explain an ISO 20022 status or reason code such as RJCT, AC01 or MD07. Omit `code` to list the curated set.

输入参数code

版本历史

4
  1. v0.3.2最新Oct 25, 2026
  2. v0.3.1Oct 22, 2026
  3. v0.1.1Oct 21, 2026
  4. v0.1.0Oct 21, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分