Anatomy of a JSON-RPC Call
id, method, and params in a real MCP message.
Anatomy of a JSON-RPC Call is a free MCP Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MCP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Open the Envelope
Let us dissect one real MCP message field by field. A JSON-RPC call is a small JSON object, and four keys carry all of its meaning.
The jsonrpc Version Tag
Every message starts with jsonrpc set to the string 2.0. It marks the dialect so both sides parse the rest the same way.
{"jsonrpc": "2.0"}The id Ties Things Together
The id is a number or string that labels a request. The matching response repeats it, so replies never get confused across many calls.
{"jsonrpc": "2.0", "id": 42}method Names the Action
The method string says what you want, like tools/call or resources/read. MCP groups methods with a slash, namespace before the verb.
{"method": "tools/call"}params Carries the Inputs
The params object holds the arguments for that method. For a tool call it names the tool and the values it should receive.
{"params": {"name": "add", "arguments": {"a": 2, "b": 3}}}A Full Request
Put the four keys together and you have a complete request. This one asks the server to run the add tool with two numbers.
{"jsonrpc": "2.0", "id": 42, "method": "tools/call",
"params": {"name": "add", "arguments": {"a": 2, "b": 3}}}params Is Optional
Some methods need no input at all. When that happens you simply omit params, as tools/list does when it just wants the full catalog.
{"jsonrpc": "2.0", "id": 5, "method": "tools/list"}Named, Not Positional
MCP always passes params as a JSON object with named keys, not a bare list. Names make the arguments self-documenting and order-independent.
The Response Mirror
The reply mirrors the request: same jsonrpc, same id, but method and params are gone. In their place sits a single result field.
{"jsonrpc": "2.0", "id": 42, "result": {"content": []}}Keys You Will See Most
Across MCP traffic you mostly meet tools/list, tools/call, resources/read, and prompts/get. Spot these methods and the intent jumps right out.
Read It at a Glance
Now any MCP line is readable: jsonrpc is the version, id pairs the reply, method is the verb, and params are the inputs. Four keys, full clarity.
Quick Check
In a JSON-RPC request, which field holds the arguments for the method?
Recap: Four Keys
You can now read any call: jsonrpc sets the version, id pairs the reply, method names the action, and params supplies its inputs. That is the whole anatomy.
Frequently asked questions
Is the “Anatomy of a JSON-RPC Call” lesson free?
Yes — the full text of “Anatomy of a JSON-RPC Call” is free to read here on the web, and the MCP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MCP Academy course, upgrade to CoddyKit PRO.
What will I learn in “Anatomy of a JSON-RPC Call”?
id, method, and params in a real MCP message. You practise MCP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start MCP Academy?
No prior experience is required. MCP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Anatomy of a JSON-RPC Call” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this MCP Academy lesson?
Yes. Every MCP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Requests, Responses & Notifications
- Anatomy of a JSON-RPC Call
- The Initialize Handshake
- Reading Errors in the Wire