Skip to content

MCP server

After this page, Claude (or any MCP client) can answer “why did this transaction fail?” about your program, with real data behind every answer.

The MCP server exposes each of the nine questions as a tool. Your agent composes them: paste a signature and ask what happened; ask whether the spike is your fault or the RPC’s; ask what changed since the last deploy.

There are two ways to connect:

  • Hosted, no install — point a streamable-HTTP client at https://mcp.wiretapsol.com/mcp and pass your key as a Bearer token (see the Hosted (HTTP) tab). Nothing to install; the key scopes every tool call to your account.
  • Local (stdio) — run the @wiretap-labs/mcp package (binary wiretap-mcp) via npx. It reads WIRETAP_API_URL (default http://127.0.0.1:8790) and, for a hosted API, WIRETAP_API_KEY. Against a self-hosted API on localhost, no key is needed.

Getting a key: grab one from your account dashboard, or — on a self-hosted/dev stack — wiretap init bootstraps a dev key and saves it to ~/.wiretap.json.

Terminal window
claude mcp add wiretap \
--env WIRETAP_API_URL=http://127.0.0.1:8790 \
-- npx -y @wiretap-labs/mcp
Tool Question it answers
why(sig) Why did this transaction fail? Decoded IDL error, instruction, CU, issue history
diagnose_drop(sig) Why didn’t it land? Drop classification with evidence
baseline(program) Is it us, the RPC, or the network? Program vs ecosystem vs per-provider
release_diff(program) Did the deploy break something? Pre/post regression table
top_issues(program, window?) What are real users hitting most? Bot-segmented
cu_headroom(program) Are we near the compute budget? Per-instruction p95 + trend
wallet_history(program, wallet) What happened to this user?
provider_report(program) Which RPC provider actually lands? Measured drop rate per provider

Example exchange:

You: This tx from a user report keeps coming up: 4h2K…. What happened?
Agent: [calls why("4h2K…")]
It failed on-chain in `swap` with SlippageExceeded (6001). This is issue
v1:9c41ae…, seen 14× this week, all real users. The rate jumped after
your deploy at slot 312 440 001 — want the release diff?
You: Yes.
Agent: [calls release_diff("DemoAMM…")] …

No mainnet program needed — the self-hosted demo gives the tools real data:

Terminal window
docker compose -f infra/docker-compose.yml --profile full up -d # seeded demo data
pnpm demo # prints a real failing signature
# then run the stdio server and ask your MCP client "why did <that sig> fail?"
WIRETAP_API_URL=http://127.0.0.1:8790 npx -y @wiretap-labs/mcp

On localnet you can instead generate live failures with the demo program’s traffic driver (pnpm --filter @wiretap/demo-program traffic), which fires slippage (6001), guard (6000), and compute-budget-exhaustion transactions on purpose.