JSON-RPC
A lightweight protocol for remote calls encoded as JSON objects, with requests, results, errors and notifications matched by id.
In more detail
Every MCP message is JSON-RPC 2.0. A request has a method and an id, a reply carries the same id with either a result or an error with an integer code, and a notification has no id and must never get a reply.
Example
{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}Related terms
- Model Context Protocol — An open standard that connects AI applications to tools and data through servers that any compatible host can use.
- JSON — A simple text format for structured data made of keys, values, lists and nested objects.
- RPC — A remote procedure call: calling a function in another program over a network as if it were a local function call.
Taught in
- What MCP Is — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents
- Remote Servers And Trust — AI Engineering: LLM Apps, RAG & Agents
- Capstone: The Tasks Assistant — AI Engineering: LLM Apps, RAG & Agents
References
- JSON-RPC 2.0 Specification
- MCP 2026-07-28: Base protocol overview (messages, _meta, error codes, statelessness)