Which message format do MCP clients and servers use?
- Exam domain
- Model Context Protocol (MCP)
- Difficulty
- Hard
- In this mock
- 5 questions on this domainPractise this domain
Why C is the answer
JSON-RPC 2.0
MCP's data layer is built on JSON-RPC 2.0. Requests carry an id and the response echoes it; notifications have no id and get no response.
Remember: MCP speaks JSON-RPC 2.0.
In detail
- JSON-RPC 2.0 messages.
- The same format over stdio and Streamable HTTP.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. GraphQL queriesWrong
GraphQL is not used by MCP.
B. Protocol Buffers over gRPCWrong
Protocol Buffers are not MCP's format.
C. JSON-RPC 2.0Right
MCP speaks JSON-RPC 2.0.
D. SOAP envelopesWrong
SOAP is not used by MCP.
Use case
An illustrative scenario, not a real incident.
Illustrative: a developer debugs a server by reading the JSON-RPC request and response for one tools/call.
See it in different ways
flowchart LR S0["tools/list"] --> S1["Model picks a tool"] --> S2["tools/call"] --> S3["Result content"]
How to read this chart
- Read it in order: tools/list, then Model picks a tool, then tools/call, then Result content.
sequenceDiagram participant P0 as Client participant P1 as Server P0->>P1: Request with an id P1-->>P0: Response with the same id
How to read this chart
- 1. Client sends "Request with an id" to Server.
- 2. Client gets a reply from Server: "Response with the same id".