JSON-RPC is a protocol for remote procedure calls, in which one program invokes a function in another, with messages encoded in JSON. A request carries the method name, its parameters and an identifier, and a response carries either a result or an error. Version 2.0 is the widely used edition.
Because it is not tied to a particular transport, it can run over HTTP, WebSocket or standard input and output. The Language Server Protocol used by developer tools and the Model Context Protocol for connecting AI tools both use it.