# Expose Crypto KAT Runners as MCP Tools Instead of Pasting Hex

> Source: <https://dev.to/infracore/expose-crypto-kat-runners-as-mcp-tools-instead-of-pasting-hex-122l>
> Published: 2026-09-18 21:27:45+00:00

When a Known Answer Test fails on a crypto primitive, the cause is often byte-ordering or padding. Pasting that raw hex plus the ACVP JSON into a chat window works once, but it does not scale to large vector files.

A credible baseline stays manual: run the KAT binary locally, copy only the failing vector ID and byte offset into the prompt, fix, and re-run. For a single algorithm and a small file, that loop is sufficient and easier to audit than adding server code.

The gap appears with massive ACVP payloads and repeated re-runs. One method is to put the runner behind Model Context Protocol over stdio:

`run_crypto_kat(target, algorithm)` returning structured status, failing case ID, and diff window`load_acvp_vectors(path)` with filtering or paging instead of dumping the whole file
Keep tool outputs small and typed: verdict, file, case, expected vs actual slice, and next command. Let the agent request more context explicitly rather than pushing the whole file by default.

What workaround do you use today to keep large KAT vectors out of the prompt while still giving the agent enough to fix the byte-level bug?
