Payment Intelligence

io.github.Raafet57Published by GitHub account Raafet57v0.3.2Updated Nov 1, 2026

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

Overview

AI-generated overview

Offline MCP server that lets an assistant explain, scrub and check ISO 20022 payment messages, IBANs, BICs and SSI files on your own machine.

What you can do
  • Explain and decode payment messages: plain-language narratives for pacs.008, pacs.009 and camt.053, field projections for pacs.002, pacs.004, camt.052/054 and case or Tracker messages, plus status and reason code meanings.
  • Scrub messages: replace names, IBANs, accounts, UETRs and references with consistent pseudonyms, optionally file-to-file so the original never enters the conversation.
  • Check readiness and lifecycle: CBPR+ readiness hints and grouping of ACK/NACK, pacs and camt files into threads with a timeline.
  • Validate identifiers: IBAN structure and MOD-97 checks, IBAN building, BIC syntax and country codes, LEI check digits.
  • Look up and check reference data: BICs, national clearing…
When to use it
For payment operations, investigations and ISO 20022 migration work where you want an assistant to read pacs/camt files, triage returns and investigations, or check IBAN, BIC and SSI details without sending payment data to a third party.
Requirements
Runs locally over stdio; Node.js 20.10 or later, or the npm package payment-intelligence-mcp via npx. No account, API key or network access. Reference lookups need your own licensed reference files, optionally pointed to by the PAYMENT_INTELLIGENCE_REFERENCE_PATH setting.
Before you install
Only scrub_payment_message writes, to the output_path you give, and it refuses to overwrite existing files. Scrubbed output is pseudonymised, not anonymised, and may still be personal data, so spot-check before sharing. Results are hints only: a valid IBAN does not prove an account exists, BIC and SSI checks do not prove routing or reachability, and CBPR+ checks are not full usage-rule validation. No live tracking or case management.

Installation

In SourceWeft

  1. Open Payment Intelligence in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit da7202c

Tools

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.

Parametersibanrequired

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.

Parametersfieldscountry_coderequired

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.

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

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

Parametersxmlpath

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.

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

Parametersxmlpath

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.

Parameterspathsdocuments

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.

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

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

Parameterscode

Version history

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

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts