Why did MCP pick JSON-RPC 2.0 as its wire format instead of REST or gRPC?
JSON-RPC 2.0 gives MCP a lightweight, transport-independent message envelope with built-in request/response/notification semantics. MCP layers its method set and lifecycle on top.
Imagine sending a sticky note to a coworker asking them to do something. The note has a fixed layout: a version number, a verb (what you want done), a details section, and a tracking number so the reply can be matched back. JSON-RPC 2.0 is that sticky-note format, written as JSON. MCP is a set of agreed-upon verbs written on those notes: 'list the tools you have,' 'call this tool with these arguments,' 'read this resource.' The note format is JSON-RPC. The verbs are MCP.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: define JSON-RPC 2.0 concisely, list the required request fields, name three MCP methods layered on top, explain the split (JSON-RPC owns the envelope, MCP owns the method set and lifecycle), and close with the JSON-RPC error vs MCP tool error distinction.
Real products, models, and research that use this idea.
- MCP Inspector and the @modelcontextprotocol/inspector CLI show raw JSON-RPC frames so you can verify the version field, method name, id correlation, and result/error split while debugging a server.
- Stdio MCP servers (filesystem, sqlite, git) emit newline-delimited JSON-RPC 2.0 messages on stdout, which you can pipe through jq to read by hand during development.
- Streamable HTTP transport (replaced SSE in 2025) carries the same JSON-RPC 2.0 messages as stdio; the transport changed but the message shape stayed identical.
- Public MCP SDKs (TypeScript, Python, Kotlin, Go) all expose typed wrappers over JSON-RPC and let you intercept or log raw messages for protocol-level debugging.
What an interviewer would ask next. Try answering before peeking at the approach.
QWalk through a JSON-RPC 2.0 error object. How does it differ from an MCP tool error?
QWhy did MCP pick JSON-RPC 2.0 instead of REST or gRPC?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Describing MCP as a brand new protocol built from scratch. MCP reuses JSON-RPC 2.0 as its wire format and layers an AI-specific method set, lifecycle, and capability model on top.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.