JSON-RPC
JSON-RPC is a lightweight remote procedure call (RPC) protocol that uses JSON as its data exchange format. It allows clients to invoke methods on a remote server over a network and supports both request-response and notification (one-way message) communication patterns. The protocol is characterized by its simple structure, transport-layer independence, and cross-language compatibility, and can operate over multiple transport protocols including HTTP and WebSocket.
Core Facts
MCP采用客户端-服务器架构,基于标准化的JSON-RPC通信协议
Anthropic officially released the MCP specification at the end of 2024, adopting JSON-RPC 2.0 as the underlying communication protocol.
MCP基于JSON-RPC 2.0协议构建,支持请求-响应和通知两种消息模式
Timeline (last 90 days)
Among JSON-RPC standard error codes, -32700 indicates a parse error, -32601 indicates method not found, and -32602 indicates invalid params.
Message-based protocols such as JSON-RPC carry no framing information over pipes, so the writer must define message boundaries itself (such as line delimiting or length prefixes), and the SDK only forwards bytes.
Unlike REST APIs, JSON-RPC does not rely on HTTP verbs and URL paths to express semantics, but encapsulates operation intent in the message body, making it better suited to Agent scenarios that require dynamic discovery capability and bidirectional communication.
In the Python servers, the error code for an unknown tool changed from an isError result to a JSON-RPC -32602 error (Unknown tool: <name>), in both protocol eras.
With the stdio transport, the server runs as a child process of the client, exchanging JSON-RPC messages over standard input and output, with standard error used for logs.
Calling eth_getCode on any address: returning empty indicates an ordinary EOA, returning data beginning with 0xef0100 indicates it has been delegated, and the following 20 bytes are the delegation address; a delegated account can have a completely clean and very short transaction history.
In MCP, JSON schema is used to describe tool input parameters; the host can use it to automatically generate call forms, validate parameters or reject invalid parameters in advance, but it does not constrain whether a tool should be called or whether a call is authorized.
JSON-RPC has three indispensable steps in every interaction: serialization, network transmission, and deserialization.
Wrapping database drivers inside JSON-RPC adds latency on the critical path.
Even with connection multiplexing via SSE, each tool call still requires completing a JSON-RPC-layer handshake and negotiation, which is fundamentally different from directly reusing a database driver connection pool.
12 more timeline events
All Facts (20)
MCP采用客户端-服务器架构,基于标准化的JSON-RPC通信协议
90%VerifiedAnthropic officially released the MCP specification at the end of 2024, adopting JSON-RPC 2.0 as the underlying communication protocol.
80%VerifiedMCP基于JSON-RPC 2.0协议构建,支持请求-响应和通知两种消息模式
80%VerifiedBy defining a unified JSON-RPC 2.0 communication protocol, MCP simplifies the M×N adaptation problem into M+N.
80%VerifiedThe JSON-RPC 2.0 specification was first published by the JSON-RPC Working Group in 2010.
80%VerifiedThe Language Server Protocol (LSP) decouples language intelligence suggestion logic from the editor, enabling any programming language to implement the protocol once and obtain auto-completion and error detection in all LSP-compatible editors.
75%VerifiedIn MCP, JSON schema is used to describe tool input parameters; the host can use it to automatically generate call forms, validate parameters or reject invalid parameters in advance, but it does not constrain whether a tool should be called or whether a call is authorized.
65%VerifiedIn stdio transport, MCP server logs must be written to standard error (stderr), because extraneous standard output will corrupt the protocol stream.
65%VerifiedLSP compresses the M×N relationship of editor-language integration into M+N, communicating through a standardized JSON-RPC protocol.
65%UnverifiedMCP协议中AI模型通过标准化的JSON-RPC调用来触发硬件操作
85%UnverifiedMCP通过标准化的JSON-RPC通信格式让模型调用外部能力,采用全量加载的设计哲学
85%UnverifiedMCP选择JSON-RPC而非REST或GraphQL,是因为JSON-RPC天然支持双向通信和异步调用,更适合模型与工具之间需要实时响应的交互场景
80%UnverifiedLSP communicates based on the JSON-RPC 2.0 protocol, and language servers typically run as independent processes, communicating with editors via stdin/stdout or TCP.
60%UnverifiedACP is essentially a JSON-RPC-based protocol that typically communicates with subprocesses via standard input/output (stdio).
60%UnverifiedAmong JSON-RPC standard error codes, -32700 indicates a parse error, -32601 indicates method not found, and -32602 indicates invalid params.
50%UnverifiedMessage-based protocols such as JSON-RPC carry no framing information over pipes, so the writer must define message boundaries itself (such as line delimiting or length prefixes), and the SDK only forwards bytes.
50%UnverifiedUnlike REST APIs, JSON-RPC does not rely on HTTP verbs and URL paths to express semantics, but encapsulates operation intent in the message body, making it better suited to Agent scenarios that require dynamic discovery capability and bidirectional communication.
50%UnverifiedIn the Python servers, the error code for an unknown tool changed from an isError result to a JSON-RPC -32602 error (Unknown tool: <name>), in both protocol eras.
50%UnverifiedWith the stdio transport, the server runs as a child process of the client, exchanging JSON-RPC messages over standard input and output, with standard error used for logs.
50%UnverifiedCalling eth_getCode on any address: returning empty indicates an ordinary EOA, returning data beginning with 0xef0100 indicates it has been delegated, and the following 20 bytes are the delegation address; a delegated account can have a completely clean and very short transaction history.
50%