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.
Connect a client
Section titled “Connect a client”There are two ways to connect:
- Hosted, no install — point a streamable-HTTP client at
https://mcp.wiretapsol.com/mcpand pass your key as aBearertoken (see the Hosted (HTTP) tab). Nothing to install; the key scopes every tool call to your account. - Local (stdio) — run the
@wiretap-labs/mcppackage (binarywiretap-mcp) vianpx. It readsWIRETAP_API_URL(defaulthttp://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.
claude mcp add wiretap \ --env WIRETAP_API_URL=http://127.0.0.1:8790 \ -- npx -y @wiretap-labs/mcp// claude_desktop_config.json → "mcpServers"{ "mcpServers": { "wiretap": { "command": "npx", "args": ["-y", "@wiretap-labs/mcp"], "env": { "WIRETAP_API_URL": "http://127.0.0.1:8790" } } }}{ "mcpServers": { "wiretap": { "command": "npx", "args": ["-y", "@wiretap-labs/mcp"], "env": { "WIRETAP_API_URL": "http://127.0.0.1:8790" } } }}// programmatic client against the hosted streamable-HTTP transport (port 8791).// The API key travels as a Bearer token and scopes every tool call to your account.import { Client } from "@modelcontextprotocol/sdk/client/index.js";import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "my-agent", version: "1.0.0" });await client.connect( new StreamableHTTPClientTransport(new URL("https://mcp.wiretapsol.com/mcp"), { requestInit: { headers: { Authorization: `Bearer ${process.env.WIRETAP_API_KEY}` } }, }),);const answer = await client.callTool({ name: "why", arguments: { sig: "4h2K…" } });| 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…")] …Try it against the demo stack
Section titled “Try it against the demo stack”No mainnet program needed — the self-hosted demo gives the tools real data:
docker compose -f infra/docker-compose.yml --profile full up -d # seeded demo datapnpm 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/mcpOn 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.