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
Timeline (last 90 days)
Negotiating a connection handshake on every execution incurs a CPU overhead that is unaffordable in high-frequency, short-task scenarios.
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.
Wrapping database drivers inside JSON-RPC adds latency on the critical path.
JSON-RPC has three indispensable steps in every interaction: serialization, network transmission, and deserialization.
In stdio transport, MCP server logs must be written to standard error (stderr), because extraneous standard output will corrupt the protocol stream.
A protocol error means the request itself is malformed (e.g., calling a non-existent tool name) and is returned as a standard JSON-RPC error.
Moka's Inspector feature displays the complete details of each tool call, including the raw JSON-RPC request and response, token consumption count, and call time overhead.
A JSON-RPC request contains a method, params, and a unique id, and the server returns a result or error corresponding to that id.
The stdio transport sends and receives JSON-RPC messages by spawning a child process and using standard input/output streams, requiring no network ports.
Communication protocols between agents (such as those based on JSON-RPC or specific agent communication layers) can complete requirement descriptions, capability announcements, quote generation, and contract confirmation within milliseconds.
6 more timeline events
All Facts (20)
MCP采用客户端-服务器架构,基于标准化的JSON-RPC通信协议
90%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%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%UnverifiedNegotiating a connection handshake on every execution incurs a CPU overhead that is unaffordable in high-frequency, short-task scenarios.
50%UnverifiedJSON-RPC has three indispensable steps in every interaction: serialization, network transmission, and deserialization.
50%UnverifiedWrapping database drivers inside JSON-RPC adds latency on the critical path.
50%UnverifiedEven 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.
50%UnverifiedIn stdio transport, MCP server logs must be written to standard error (stderr), because extraneous standard output will corrupt the protocol stream.
50%UnverifiedA protocol error means the request itself is malformed (e.g., calling a non-existent tool name) and is returned as a standard JSON-RPC error.
50%UnverifiedMoka's Inspector feature displays the complete details of each tool call, including the raw JSON-RPC request and response, token consumption count, and call time overhead.
50%UnverifiedA JSON-RPC request contains a method, params, and a unique id, and the server returns a result or error corresponding to that id.
50%UnverifiedThe stdio transport sends and receives JSON-RPC messages by spawning a child process and using standard input/output streams, requiring no network ports.
50%UnverifiedCommunication protocols between agents (such as those based on JSON-RPC or specific agent communication layers) can complete requirement descriptions, capability announcements, quote generation, and contract confirmation within milliseconds.
50%