Skip to content
Agentmart
Submit a tool

What is JSON-RPC?

JSON-RPC is a stateless, lightweight remote procedure call protocol that encodes requests and responses as JSON objects and does not depend on any particular transport.

Also written: JSON-RPC 2.0, JSON RPC

Explained

JSON-RPC 2.0 is a short specification for calling methods on a remote system using JSON. It mainly defines data structures and the rules for processing them, so the same messages can travel inside one process, over sockets, over HTTP, or through other message-passing channels.

A request object carries a jsonrpc field that must be exactly "2.0", a method name, optional params given either as an array or as a named object, and an id chosen by the client. The server copies that id into its response so the client can match replies to calls. A request without an id is a notification, and the server must not reply to it.

A response holds either a result or an error, never both. An error object has an integer code, a short message, and optional data. The spec predefines codes such as -32700 for a parse error and -32601 for a method that was not found. A client may also send an array of requests as a batch and receive an array of responses in any order.

MCP encodes its messages as JSON-RPC 2.0. Both of MCP's standard transports, stdio and Streamable HTTP, carry these JSON-RPC messages.

Primary source

JSON-RPC 2.0 Specification (jsonrpc.org), read Oct 26, 2026

This entry paraphrases the page above. Sources change; check it for the current wording.

Listings that use this

The 5 top-ranked listings tagged for JSON-RPC. Rank weighs adoption, freshness, documentation and publisher identity; how we rank and grade. Money never changes the order.

Cite this page

What is JSON-RPC?. Agent Mart. https://agentmart.dev/glossary/json-rpc (last updated 2026-10-26)

Written Oct 26, 2026, updated Oct 26, 2026. All glossary terms