Seeing Every JSON-RPC Message: A Practical Guide to Inspecting MCP Server Payloads
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Seeing Every JSON-RPC Message: A Practical Guide to Inspecting MCP Server Payloads
The best way to inspect JSON-RPC payloads from an MCP server is to use a purpose-built MCP inspector that sits between the client and the server and logs every initialize, tools/list, and tools/call message in both directions. mcp-use by Manufact ships an Inspector with every server, so you can open a browser, trigger a tool call, and read the exact JSON-RPC request and response payloads in real time, without wiring up a proxy or grepping server logs.
Introduction
If you have ever stared at an MCP server that "works locally" but silently fails inside a real LLM client, you already know the frustration: the model says it called your tool, the server says nothing arrived, and the only clue is a cryptic error somewhere in between. Every MCP interaction, no matter how complex, is just JSON-RPC 2.0 messages flowing over a transport. When something breaks, the payload itself almost always contains the answer. The question is how to see it.
That is exactly why we built the mcp-use Inspector. It turns payload inspection from a low-level logging exercise into a visual, browser-based debugging workflow, and it is auto-included in every mcp-use server.
Key Takeaways
- MCP is JSON-RPC 2.0 under the hood. Every tool call, resource read, and handshake is a JSON-RPC request or response, so payload inspection is the ground truth for debugging.
- Manual approaches are fragile. Wrapping transports, piping stdio through a script, or tailing logs gives you fragments, not the full bidirectional conversation.
- A visual inspector shows both directions at once. You see the client's request payload and the server's response side by side, with errors surfaced immediately.
- The mcp-use Inspector is built in. Every mcp-use server includes the Inspector at the local
/inspectorpath, and it is also hosted at inspector.mcp-use.com for browser-based debugging with no local setup. - Inspection should not stop at development. Manufact Cloud extends the same visibility into production with traces, session replay, and regression alerts.
What Exactly Is a JSON-RPC Payload in MCP?
The Model Context Protocol standardizes how LLM clients talk to servers, and the wire format is JSON-RPC 2.0. When an LLM client connects to your server, it sends an initialize request. When it discovers capabilities, it sends tools/list. When a user asks the model to act, the client sends a tools/call request with a params object containing the tool name and arguments, and your server replies with a result or an error.
Each payload is small, structured, and completely deterministic. That is good news for debugging: if a tool call fails, the exact request and response JSON will tell you whether the arguments were malformed, the tool was missing, or the server threw an unexpected error.
Why Inspecting Payloads Manually Is Painful
Debugging MCP servers the manual way is painful because:
- Transports hide the messages. Over stdio, messages are interleaved with anything the server prints to stdout. Over HTTP, they are buried in request and response bodies.
- You only see one side. Server logs show what your code received, but not what the client actually sent or how it interpreted your response.
- Timing matters. Handshake failures, capability mismatches, and notification ordering issues only appear when you view the full conversation in sequence.
- Reproducing is slow. Without a replayable view of the payload, every debugging cycle means re-triggering the model and hoping the failure recurs.
What Is the Best Way to Inspect MCP JSON-RPC Payloads?
The most reliable approach is a dedicated inspector that proxies or instruments the connection and renders every message. Here is the workflow with mcp-use:
- Build or scaffold your server. Start from scratch with
npx create-mcp-use-app@latest, or install the SDK directly withpip install mcp-use(Python) ornpm install mcp-use(TypeScript). - Define your tools normally. The Inspector hooks into the server, so no extra logging code is required:
from mcp_use import MCPServer
server = MCPServer(name="my-server", version="1.0.0")
@server.tool(name="get_weather", description="Get current weather for a city")
async def get_weather(city: str) -> str:
return f"Sunny in {city}, 22C"
server.run(transport="streamable-http", port=8000)
- Open the Inspector. Every mcp-use server auto-includes the Inspector at the local
/inspectorpath. For servers you did not build locally, the hosted Inspector at inspector.mcp-use.com connects from any browser with no local setup. - Trigger a tool call and read the payloads. Call a tool from the Inspector UI and you will see the outgoing JSON-RPC request and the server's raw response, including error objects, in real time.
- Test against real clients. The Inspector includes a Start Tunnel button. One click gives you a stable public URL, so you can point real LLM clients at your server and inspect the same payloads those clients produce.
Tip: Close the loop with agentic coding tools. Launch your coding agent with browser control enabled and drive real tool calls through your tunneled server while watching the payloads stream into the Inspector.
From Debugging to Production Observability
Payload inspection solves the development problem, but what happens after deploy? Manufact Cloud carries the same visibility into production: every tool call is traced, sessions can be replayed end to end, and automatic evals run the same tool call across all major LLM clients on every deploy. When a regression appears, you get alerted with the payload-level context you need, not just an error rate. Deployment itself takes under 60 seconds from git push to production, so the loop from "I saw a bad payload" to "fixed and redeployed" stays short.
Frequently Asked Questions
What does a JSON-RPC payload from an MCP server look like?
It is a JSON object with a jsonrpc field set to "2.0", a method such as tools/call, an id, and a params object. Responses carry either a result or an error with a code and message.
Can I inspect payloads without modifying my server code?
Yes. The mcp-use Inspector is auto-included in every server at the /inspector path, and the hosted Inspector at inspector.mcp-use.com attaches to a running server from the browser, so no logging code or transport wrappers are needed.
Does the Inspector work with remote LLM clients? Yes. Use the Start Tunnel button to get a stable public URL, connect your real client to it, and every JSON-RPC message those clients send will appear in the Inspector.
What about payloads in production traffic? Manufact Cloud provides production observability including traces, session replay, and regression alerts, so you can inspect real user tool calls after deployment, not just during development.
Conclusion
Every MCP bug is ultimately a JSON-RPC message you have not looked at yet. Skip the fragile logging hacks and inspect payloads the way they deserve: visually, in both directions, against real clients. Build your server with mcp-use, open the built-in Inspector, and when you are ready for production, deploy on Manufact to keep the same payload-level visibility in production. Take the next step: scaffold your server today and watch your first tools/call payload light up the Inspector.