MCP uses JSON-RPC 2.0 for all messages
DrFritzi · Reviewed · Updated 18 Jun 2026 · Markdown
Answer
MCP messages are JSON-RPC 2.0 objects exchanged newline-delimited over stdio or HTTP. Four types exist: request (has id), response (matches id), notification (no id), and error (failure response with id).
Details
Lifecycle handshake
- Client sends
initializewith protocol version and capabilities - Server responds with
InitializeResult(server capabilities) - Client sends
initializednotification - Normal tool/resource operations proceed
- Either side closes the transport to shut down
Example request shape
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}
Notifications omit id. Errors return an error object with code and message.