MCP server for jPOS and ISO 8583. Deterministic payment protocol tools for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
mcp-name: io.github.mohisyed/jpos-mcp-server
The first open-source MCP server for jPOS and ISO 8583.

Claude validating a real ISO 8583 financial transaction request using deterministic tools. No guessing β every answer comes from verified data.
An MCP server that gives AI agents (Claude, Cursor, VS Code Copilot) deterministic, verified access to ISO 8583 field specs, MTI decoding, jPOS packager XML generation, deploy descriptor validation, message building, and jPOS documentation search.
No more guessing packager class names. No more scrolling a 300-page PDF. Call a tool, get the right answer.
Prerequisites: Python 3.11+ and uv package manager.
All 6 tools work immediately after step 1. Step 2 enables the search_jpos RAG tool with real documentation.
| Tool | Namespace | What It Does | Example Input |
|---|---|---|---|
lookup_field | iso | Return full ISO 8583 field spec (name, format, jPOS class, max length) | field_number: 35 |
decode_mti | iso | Decode MTI into version, class, function, origin + expected response | mti: "0200" |
generate_packager | jpos | Generate complete GenericPackager XML from plain English | "Visa auth fields 2,3,4,7,11,35,41,42 BCD" |
validate_descriptor | jpos | Lint a Q2 deploy descriptor (channel, QMUX, TM rules) | xml_content: "<qmux>..." |
build_message | msg | Validate ISO 8583 field dict (mandatory fields, lengths, PAN safety) | {"0":"0200", "2":"4111..."} |
search_jpos | docs | Semantic search over jPOS Programmer's Guide (RAG) | "How to configure QMUX" |
LLMs can guess that field 35 uses IFA_LLVAR, but they sometimes hallucinate class names like IFA_LLTRACK2 (doesn't exist). Our tools read from data/iso_fields.json β a verified lookup table β so the answer is always correct. The AI decides which tool to call; our code provides the facts.
The server is split into 4 domain-specific sub-servers mounted via FastMCP.mount(). Each sub-server is independently testable β a bug in the RAG pipeline doesn't prevent ISO field lookups from working. Adding a new domain is one file + one mount() call in main.py.
Every tool is wrapped with @with_timeout() using asyncio.wait_for(). If a tool hangs (e.g., ChromaDB cold start), it returns a structured error dict instead of blocking the entire MCP server. Timeout tiers:
| Tier | Timeout | Tools |
|---|---|---|
| Fast | 2s | lookup_field, decode_mti |
| Medium | 5s | build_message, validate_descriptor |
| Slow | 10s | generate_packager |
| RAG | 15s | search_jpos |
Payment systems have zero tolerance for wrong answers. A bad packager class name (IFA_LLVAR vs IFB_LLHEX) causes cryptic byte-level parsing errors that take hours to debug. Our tests verify that every tool returns correct, deterministic results across all input types.
| File | Layer | What it covers |
|---|---|---|
test_iso.py | unit | lookup_field, decode_mti β valid/invalid fields, MTI categories |
test_jpos_tools.py | unit | generate_packager (BCD/ASCII), validate_descriptor (QMUX, channel-adaptor, txnmgr, malformed XML) |
test_message.py | unit | build_message β valid messages, missing fields, length violations, PAN rejection |
test_rag.py | unit | Query expansion, mock collection responses, empty collection handling |
test_timeout.py | unit | @with_timeout β guardrail fires, fast passes, exceptions caught |
test_validators.py | unit | luhn_check, contains_likely_real_pan β Luhn edge cases, separators, test PAN whitelist |
test_logging.py | unit | PaymentSafeFormatter redaction, stderr handler config |
test_mcp_integration.py | integration | Tool registration, JSON Schema generation, end-to-end MCP protocol calls |
test_e2e.py | E2E workflow | Multi-step workflows: Visa auth packager build, reversal debugging, deploy descriptor validation, security boundary, RAG via MCP, system health, error handling |
When adding a tool, cover three categories:
All tools are async def, so use @pytest.mark.asyncio:
The search_jpos tool uses two-stage hybrid retrieval over jPOS documentation: a bi-encoder (mpnet) for fast candidate retrieval, followed by a cross-encoder reranker for high-precision ordering.
all-mpnet-base-v2 and stored in ChromaDB.ms-marco-MiniLM-L-6-v2) scores each (query, chunk) pair by attending across both inputs. This is significantly more accurate than cosine alone.The cross-encoder loads lazily on first call (~1s). Falls back to keyword-overlap reranking if the model can't load (offline environments).
The ingest script processes:
knowledge/sources/*.pdf β page-by-page chunking with cleanupdocs/*.md β section-aware chunking (splits on ## headings)knowledge/sources/*.md β for any additional docs you addNo reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/jpos-mcp-server)<a href="https://allmcps.com/mcp/jpos-mcp-server"><img src="https://allmcps.com/api/badge/jpos-mcp-server?style=directory" alt="JPOS MCP Server on AllMCPs" /></a>