JSON-RPC in One Minute
MCP doesn't invent a message format. It uses JSON-RPC 2.0, which has three shapes. A request names a method, carries params and has an id. A response echoes that id and carries a result or an error, never both. A notification has a method and no id, and nobody answers it.
Two Rules MCP Adds
An id is a string or an integer, and "unlike base JSON-RPC, the ID MUST NOT be null." It also can't repeat an id the sender is still waiting on. That's how a client with several calls in flight matches each answer to its question.
Two Versions You Will Meet
MCP versions are dates. Up to and including 2025-11-25, a connection opens with a handshake: the client sends initialize, both sides settle on a version and on what each supports, and the client confirms with a notification. Everything after depends on it.
Version 2026-07-28 makes MCP stateless. Its changelog removes "the initialize/notifications/initialized handshake" and protocol-level sessions with it. Each request now carries its protocol version and the client's capabilities in params._meta, so any server instance can answer any request. A client that wants to know a server first can call server/discover.
Servers move at their own pace, and the spec lets one serve both versions on the same URL, choosing by how the client opens. As of 2026-11-25, Homing's server speaks the handshake version, 2025-11-25, through the official Python SDK. It already runs without sessions, though, so you can send it any request cold.
Step Through It
Pick a tab: the handshake version, the stateless version, or Break It, where we feed the server four mistakes. Each step shows what crossed the wire and what to notice. Arrow keys move between steps, and each step has its own link.
1 initialize
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_…
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": { "name": "learn-capture", "version": "1.0" } } }2 result
HTTP/1.1 200 OK Content-Type: text/event-stream event: message data: …
{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-11-25", "capabilities": { "prompts": { "listChanged": false }, "resources": { "subscribe": false, "listChanged": false }, "tools": { "listChanged": false } }, "serverInfo": { "name": "homing", "version": "1.30.0", "websiteUrl": "https://tryhoming.com" }, "instructions": "Call send_message only after the user asked to send. …" } }3 notifications/initialized
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2025-11-25
{ "jsonrpc": "2.0", "method": "notifications/initialized" }HTTP/1.1 202 Accepted
4 tools/list
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2025-11-25
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} }5 result
{ "jsonrpc": "2.0", "id": 2, "result": { "tools": [ { "name": "ping", "title": "Verify Homing connection", "description": "Confirm this install reaches Homing and return your handle, …", "inputSchema": { "type": "object", "properties": {} }, "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true, "openWorldHint": false } }, { "name": "send_message", … }, { "name": "check_inbox", … } ] } }6 tools/call ping
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2025-11-25
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "ping", "arguments": {} } }7 result
{ "jsonrpc": "2.0", "id": 3, "result": { "content": [ { "type": "text", "text": "{\"status\":\"ok\",\"handle\":\"ripley\",…}" } ], "structuredContent": { "status": "ok", "summary": "Connected to Homing as @ripley. …", "handle": "ripley", "inbox_url": "https://app.tryhoming.com/inbox" }, "isError": false } }8 tools/call (misspelled)
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2025-11-25
{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "send_mesage", "arguments": {} } }9 result, isError
{ "jsonrpc": "2.0", "id": 4, "result": { "content": [{ "type": "text", "text": "Unknown tool: send_mesage" }], "isError": true } }
Captured from Homing's MCP server on 2026-11-25. The handle and links are a sample account's; the key and long strings are cut short.
1 server/discover
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2026-07-28 Mcp-Method: server/discover
{ "jsonrpc": "2.0", "id": 1, "method": "server/discover", "params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientInfo": { "name": "learn-capture", "version": "1.0" }, "io.modelcontextprotocol/clientCapabilities": {} } } }2 result
{ "jsonrpc": "2.0", "id": 1, "result": { "resultType": "complete", "supportedVersions": ["2026-07-28"], "capabilities": { "tools": {}, "resources": {}, "prompts": {} }, "_meta": { "io.modelcontextprotocol/serverInfo": { "name": "homing", "version": "…" } }, "instructions": "Call send_message only after the user asked to send. …", "ttlMs": 3600000 } }3 tools/call ping
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2026-07-28 Mcp-Method: tools/call Mcp-Name: ping
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "ping", "arguments": {}, "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {} } } }4 result
{ "jsonrpc": "2.0", "id": 2, "result": { "resultType": "complete", "content": [ { "type": "text", "text": "{\"status\":\"ok\",\"handle\":\"ripley\",…}" } ], "structuredContent": { "status": "ok", "handle": "ripley", … }, "isError": false } }
Constructed from the 2026-07-28 spec: the same ping, shaped for that version. Homing's server doesn't speak it yet, so these four messages are ours, not a capture.
1 No key
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} }2 401 + where to sign in
HTTP/2 401 www-authenticate: Bearer resource_metadata="https://api.tryhoming.com/.well-known/oauth-protected-resource/mcp", scope="profile email"
{ "error": "unauthorized", "error_description": "Sign in to Homing or use an API key" }3 Wrong key
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_notarealkey…
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} }4 401, no pointer
HTTP/1.1 401 Unauthorized www-authenticate: Bearer error="invalid_token", error_description="Sign in to Homing or use an API key"
{ "error": "invalid_token", "error_description": "Sign in to Homing or use an API key" }5 tools/run
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2025-11-25
{ "jsonrpc": "2.0", "id": 5, "method": "tools/run", "params": {} }6 Protocol error
{ "jsonrpc": "2.0", "id": 5, "error": { "code": -32602, "message": "Invalid request parameters", "data": "" } }7 read_message, no id
POST /mcp HTTP/1.1 Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer home_live_… MCP-Protocol-Version: 2025-11-25
{ "jsonrpc": "2.0", "id": 7, "method": "tools/call", "params": { "name": "read_message", "arguments": {} } }8 isError, with advice
{ "jsonrpc": "2.0", "id": 7, "result": { "isError": true, "structuredContent": { "status": "failed", "error": "invalid_request", "summary": "read_message was not run: `message_id` is required. Do not retry this request as is: change it, or stop." }, "content": [{ "type": "text", "text": "…the same JSON as text…" }] } }
Four failures, captured from Homing's MCP server on 2026-11-25 (step 2 from production, the rest from a sandbox). Request ids are cut.
Inside the Server: What ping Does
The protocol ends at the server's front door. What happens inside is up to the server, and it's where most of the interesting decisions live. Here is Homing's ping, from step 6 above, followed through the server.
1 tools/call ping
2 Who is this?
3 Account attached
4 First time?
5 Receipt
{ "status": "ok", "summary": "Connected to Homing as @ripley for the first time. …", "first_connection": true, "first_note": { "subject": "Hello from your agent", … }, "handle": "ripley", "inbox_url": "https://app.tryhoming.com/inbox", "plan": { "name": "free", … }, "agents": [ … ], "context": { "version": 0 } }6 After the answer
Traced from Homing's server code on 2026-11-25, simplified.
When Versions Disagree
In the handshake version, the client asks for a version and the server must answer with one it supports. We sent Homing an initialize asking for 2026-07-28. It answered with 2025-11-25. A client that can't speak the version offered "SHOULD disconnect."
In 2026-07-28 there's no handshake to bargain in, so the server refuses the request itself. The error carries code -32022 and lists the versions it does speak, and the client retries with one of them.
Two Kinds of Error
A protocol error is a JSON-RPC error object: the request itself was wrong, such as a method that doesn't exist. The host deals with it, and the model may never see it.
A tool error is a normal result with isError: true: the request was fine, but the tool failed, say because the service behind it is down. The spec says clients "SHOULD provide tool execution errors to language models," because the model can often recover. It can fix an argument, wait, or tell you.
Servers draw the line in slightly different places. The spec's example treats an unknown tool name as a protocol error (-32602); Homing's server returns it as a tool error, as step 9 of the handshake showed, and answers an unknown method with -32602 where JSON-RPC reserves -32601 (the Break It tab). Handle both shapes. And if you write a server, write error text for the model that will read it. For example, Homing's answer to a call with a missing argument ends: "Do not retry this request as is: change it, or stop."
Check Yourself
Questions
Does MCP still use the initialize handshake?
Up to version 2025-11-25, yes. Version 2026-07-28 removed it: every request carries its protocol version and the client's capabilities in params._meta, and server/discover replaces the handshake's answer.
Is SSE deprecated in MCP?
The old HTTP+SSE transport, which used two endpoints, has been deprecated since 2025-03-26. Streamable HTTP replaced it, and a Streamable HTTP server may still answer a request as a one-event SSE stream.
What is the difference between an MCP protocol error and isError?
A protocol error is a JSON-RPC error object: the request was invalid. isError: true is a normal result for a tool that ran and failed, and the host passes it to the model so it can recover.
Try It
Speak MCP by hand. First, knock without a key: Homing turns you away, and the refusal tells a client where to sign in. Then, with a key from the app saved as HOMING_API_KEY, replay steps 4 to 7. You don't need to initialize first, because the server keeps no session.
What You Should See
- 1:
HTTP/2 401and a headerwww-authenticate: Bearer resource_metadata="…". Open that URL. It names the server that signs you in. - 2: one tool name per line, starting with
ping. - 3:
"status": "ok"and your own handle.
Sources
For Agents and Search Engines
Where the key comes from, and how a client sends it on every request.