SWIFT Message Parser
Parse SWIFT MT103, MT940 and MT202 messages into fields: sender and receiver BIC, amount, currency and beneficiary.
Pay by wallet (x402)
swift-message-parse Example
Example answer
{
"amount": null,
"fields": [],
"charges": null,
"currency": null,
"direction": null,
"reference": null,
"raw_blocks": {
"block1": null,
"block2": null,
"block3": null,
"block4": null
},
"sender_bic": null,
"value_date": null,
"beneficiary": null,
"message_type": "unknown",
"receiver_bic": null,
"remittance_info": null,
"ordering_customer": null,
"message_description": null
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
message | string | Yes | Raw SWIFT message text |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
amount | number | Always (present in every successful answer) |
currency | string | Always (present in every successful answer) |
sender_bic | string | Always (present in every successful answer) |
message_type | string | Always (present in every successful answer) |
receiver_bic | string | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "swift-message-parse",
"inputs": {
"message": "{1:F01BANKBEBBAXXX0000000000}{2:I103BANKDEBBXXXXN}{4:\n:20:REFTEST001\n:23B:CRED\n:32A:230115EUR1500,00\n:50K:SENDER NAME\nSENDER STREET 1\n:59:RECEIVER NAME\nRECEIVER STREET 1\n:71A:SHA\n-}"
},
"max_price_cents": 2
}' {
"tool": "strale_execute",
"arguments": {
"slug": "swift-message-parse",
"inputs": {
"message": "{1:F01BANKBEBBAXXX0000000000}{2:I103BANKDEBBXXXXN}{4:\n:20:REFTEST001\n:23B:CRED\n:32A:230115EUR1500,00\n:50K:SENDER NAME\nSENDER STREET 1\n:59:RECEIVER NAME\nRECEIVER STREET 1\n:71A:SHA\n-}"
},
"max_price_cents": 2
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "swift-message-parse",
inputs: {
"message": "{1:F01BANKBEBBAXXX0000000000}{2:I103BANKDEBBXXXXN}{4:\n:20:REFTEST001\n:23B:CRED\n:32A:230115EUR1500,00\n:50K:SENDER NAME\nSENDER STREET 1\n:59:RECEIVER NAME\nRECEIVER STREET 1\n:71A:SHA\n-}"
},
max_price_cents: 2,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="swift-message-parse",
inputs={
"message": "{1:F01BANKBEBBAXXX0000000000}{2:I103BANKDEBBXXXXN}{4:\n:20:REFTEST001\n:23B:CRED\n:32A:230115EUR1500,00\n:50K:SENDER NAME\nSENDER STREET 1\n:59:RECEIVER NAME\nRECEIVER STREET 1\n:71A:SHA\n-}",
},
max_price_cents=2,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/swift-message-parse?message=%7B1%3AF01BANKBEBBAXXX0000000000%7D%7B2%3AI103BANKDEBBXXXXN%7D%7B4%3A%0A%3A20%3AREFTEST001%0A%3A23B%3ACRED%0A%3A32A%3A230115EUR1500%2C00%0A%3A50K%3ASENDER+NAME%0ASENDER+STREET+1%0A%3A59%3ARECEIVER+NAME%0ARECEIVER+STREET+1%0A%3A71A%3ASHA%0A-%7D' Limitations
MX and ISO 20022 messages are not supported
Parses MT message formats (MT103, MT202, etc.) — MX/ISO 20022 XML messages are not supported
What to do instead: For ISO 20022 messages, use xml-to-json to parse the XML structure first