Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

JSON RPC

JSON-RPC is a lightweight, transport-agnostic remote procedure call (RPC) protocol that uses JSON to encode requests and responses. A client sends an object with jsonrpc "2.0", a method name, optional params (positional or named), and an id; the server replies with either a result or an error (including standardized error codes), and it also supports notifications (no id, no response) and request batching.

JSON-RPC is a lightweight, transport-agnostic remote procedure call protocol that encodes requests and responses as JSON. A client sends an object naming a method, optional params, and an id; the server replies with either a result or a structured error. It is deliberately minimal — the spec fits on a single page — which is exactly why it keeps showing up wherever a simple call-and-response contract is needed.

  • Method and params - A request names a procedure and passes arguments positionally or by name, keeping the call model close to an ordinary function call.
  • Result or error - Every response returns one or the other, with standardized error codes for parse, invalid-request, method-not-found, and internal failures.
  • Notifications - A request with no id expects no reply, supporting fire-and-forget messaging.
  • Batching - Multiple calls can be sent as a single array, cutting round trips.
  • Transport-agnostic - It rides over HTTP, WebSockets, stdio, or anything that moves bytes, since the protocol says nothing about transport.

In real API operations JSON-RPC is the quiet workhorse behind action-oriented interfaces where REST’s resource model does not fit — blockchain nodes, language servers, and increasingly the tool layer of the agentic turn. The Model Context Protocol builds its message framing directly on JSON-RPC, so as agents call tools over stdio and HTTP, this decades-old protocol is carrying much of that traffic. Its simplicity and stable error contract make it easy for machine clients to call methods and reason about failures without a heavy specification behind them.