Skip to main content
It lets AI assistants such as Claude, Cursor and other MCP clients parse, build, validate and explain ISO 8583 messages directly. With the server connected you can ask things like:
  • “Explain this message: 0100702405800...”
  • “Why was this transaction declined?”
  • “Generate a Mastercard authorization for $25 and the matching approval response.”
  • “What’s different between these two messages?”

Installation

The server runs over stdio:
You don’t normally run this yourself. Your MCP client starts it.

Client Setup

Claude Code

To share the server with everyone working in a repository, add it to .mcp.json at the project root:

Claude Desktop

Open Settings > Developer > Edit Config and add the server to claude_desktop_config.json:
Restart Claude Desktop after saving.

Cursor

Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

Running without installing

With uv, a client can run the server without a separate install step:
Virtual environments. If you installed iso8583sim in a virtual environment, use the full path to the command, for example /path/to/.venv/bin/iso8583sim. GUI apps such as Claude Desktop don’t see your shell’s PATH.

Tools

Test keys only. The PIN and MAC tools take keys and clear PINs as plain text, and anything you give the assistant is sent to your AI provider. Use them only with test keys and test PINs.
Conventions shared by all tools:
  • Messages are ASCII strings: MTI, hex bitmap, then field data.
  • Field numbers in fields are strings, for example {"2": "4111111111111111", "4": "000000001000"}.
  • version is "1987" (default), "1993" or "2003".
  • network is optional: VISA, MASTERCARD, AMEX, DISCOVER, JCB or UNIONPAY. Most tools detect it from the PAN when you leave it out.
Invalid input returns a tool error that explains the problem, for example Unknown network 'DINERS' or Invalid MTI format - must be numeric.

Allowed hosts for send_to_host

send_to_host only connects to hosts listed in the ISO8583SIM_ALLOWED_HOSTS environment variable of the MCP server, so an assistant can’t be used to reach arbitrary machines. The default is this machine only. Entries are a host (any port) or host:port, comma separated:
Pair it with iso8583sim serve for a local mock issuer. See Networking.

Resources

Prompts

Example

A conversation with the server connected:
You: Generate a Visa auth for $10 and explain the response if the issuer declines it for insufficient funds. Assistant calls generate_test_message, then create_response with response_code: "51", then explain_message: MTI 0110: authorization response from acquirer. Card network: VISA. Card: 411111******1111. Transaction type: Purchase. Amount: 10.00. Response code 51: Insufficient funds. Terminal: TERM0001. Merchant: MERCHANT123456.

Using the server from Python

The server is a regular MCP Python SDK server, so you can also call it in-process, for example in tests:

Privacy

The server runs locally and makes no network calls. Messages you give the assistant are sent to your AI provider as part of the conversation, like any other text you paste, so use test data rather than real card numbers. explain_message masks the PAN in its summary.