Request and response ID matching
Pair JSON-RPC requests with responses, then flag missing responses, duplicate request IDs and orphan responses that cannot be tied to a request.
MCP TraceLab is a free MCP debugger that matches JSON-RPC request IDs, checks the initialize handshake, identifies tool-call and stdio failures, redacts common secrets, and turns raw logs into a practical fix list—entirely inside your browser.
Paste a client or server capture below. The inspector reconstructs the JSON-RPC timeline, matches IDs, highlights protocol failures and recommends the next check.
Privacy: analysis and redaction run in this page. Before sharing any export, still review it for project-specific secrets.
Take the diagnosis into your issue, PR or incident notes. The export includes the summary, recommended checks and redacted timeline.
Each check answers a concrete debugging question: what was sent, what returned, what is missing and where the protocol first diverged.
Pair JSON-RPC requests with responses, then flag missing responses, duplicate request IDs and orphan responses that cannot be tied to a request.
Check the initialize flow, initialized notification, protocol version, tools/call failures and returned JSON-RPC error codes.
Mask common credentials before display and export a Markdown report with reproducible evidence, fixes to try and a redacted timeline.
Preserve the failing capture, isolate the first broken protocol expectation, and rerun one controlled change at a time.
Include the initialize exchange and the request that failed. You can use JSON, JSONL or a timestamped client/server capture.
Start with the earliest missing response, handshake break, error object or non-JSON stdio line instead of changing several settings at once.
Rerun the same client action, inspect the new timeline and export the redacted report when you need to share reproducible evidence.
Each example follows the same pattern: identify the failing message, confirm the observable result, then apply the smallest configuration or code correction.
Use when the client reports “server disconnected,” “initialize timed out” or never lists tools.
→ {"jsonrpc":"2.0","id":1,
"method":"initialize", ...}
← {"jsonrpc":"2.0","id":1,
"result":{
"protocolVersion":"...",
"capabilities":{},
"serverInfo":{...}
}}
→ {"jsonrpc":"2.0",
"method":"notifications/initialized"}
initialize.protocolVersion and capabilities.notifications/initialized.{
"mcpServers": {
"my-server": {
"command": "node",
"args": [
"/absolute/path/server.js"
],
"env": {
"LOG_LEVEL": "error"
}
}
}
}
Use when a tool is discovered successfully but fails as soon as the client invokes it.
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "search_docs",
"arguments": {
"limit": "10"
}
}
}
{
"jsonrpc": "2.0",
"id": 12,
"error": {
"code": -32602,
"message": "Invalid params"
}
}
In this example, limit was sent as a string. Compare every argument with the tool’s published inputSchema.
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "search_docs",
"arguments": {
"limit": 10
}
}
}
Use when the client reports malformed JSON, an unexpected token or a connection that closes immediately.
Server started on port 3000
{"jsonrpc":"2.0","id":1,"result":{...}}
The banner is not a JSON-RPC message. On a stdio transport, the client may attempt to parse it as protocol data.
// Avoid for application logs:
console.log("Server started");
// Write diagnostics to stderr:
console.error("Server started");
// Keep protocol writes on stdout:
process.stdout.write(
JSON.stringify(message) + "\n"
);
Short answers for the failure modes developers most often need to isolate before changing client or server configuration.
An MCP debugger analyzes Model Context Protocol JSON-RPC messages so you can follow initialize requests, responses, notifications, tool calls and errors in execution order. MCP TraceLab focuses on log evidence: matching IDs, identifying missing messages and showing the next protocol check.
No. Parsing, analysis, redaction and Markdown generation run locally in your browser. The page does not need to send pasted text or opened files to a server. Because project-specific secret formats vary, review any downloaded report before sharing it.
First confirm that the configured command starts the intended process. Then capture the initialize request and verify a response returns with the same ID. Check protocolVersion, capabilities, the subsequent notifications/initialized message and non-JSON stdout. See the initialize timeout walkthrough.
Every JSON-RPC request containing an id should be paired with a response carrying that same ID. Paste both directions of the capture into the inspector. It reports unmatched requests, duplicate request IDs and responses for which no request appears in the supplied log.
A stdio client expects protocol data on stdout. Startup banners, debug statements and progress messages may be parsed as JSON-RPC and trigger malformed JSON errors. Send application diagnostics to stderr and reserve stdout for protocol messages. Use the stdio stream example.
Error -32602 means invalid parameters. Compare params.arguments with the tool’s inputSchema: required properties, number versus string types, enum values, nested object shapes and unexpected keys. See the corrected tools/call example.
You can inspect a JSON array, JSON Lines, a single JSON-RPC object, concatenated multi-line objects or a capture with timestamps and direction labels around the JSON. Wrapper objects using common fields such as message, payload, request or response are also examined.
The local redactor masks common authorization headers, bearer tokens, API keys, access and refresh tokens, passwords, cookies, private keys, JWT-like strings and sensitive URL query parameters. It is a safety aid, not a guarantee against every proprietary credential format.
Get a Markdown checklist immediately. If you have analyzed a log, the download also includes its diagnostics, matched-request summary and redacted timeline.