Describe the MCP initialize/initialized handshake: what fields are exchanged, what is being negotiated, and what is the correct client behavior when the server proposes a protocol version the client does not support?
The initialize request exchanges protocolVersion, clientInfo, and capabilities; the initialized notification gates normal traffic; an unsupported version must abort, not silently degrade.
Think of two people meeting who speak slightly different dialects. Before they start working, they shake hands and agree: which dialect will we use, who am I, and what skills do I bring? The client says 'let us speak version 2025-06, here is my name, and I can do sampling and roots'. The server replies 'version 2025-06 works for me, and I offer tools and prompts'. Only after that handshake does the client say 'okay, I am ready' and real work begins. If the server answered in a dialect the client never learned, the right move is to politely end the meeting, not to nod along and guess. Pretending to understand leads to confusing mistakes later, where one side calls a feature the other never actually agreed to support.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: the three initialize fields, capability negotiation as nested objects, initialized as the operational gate, version downgrade handling, and abort versus silent decay on mismatch.
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"clientInfo": { "name": "claude-code", "version": "1.4.0" },
"capabilities": {
"roots": { "listChanged": true },
"sampling": {}
}
}
}Real products, models, and research that use this idea.
- Claude Code and Claude Desktop run this initialize handshake against every configured server at session start before exposing any tools to the model.
- The official mcp-inspector tool surfaces the initialize exchange so you can read the negotiated protocolVersion and both capability sets while debugging.
- Cursor and Zed, both MCP hosts in 2026, perform the same handshake, so a server written for one negotiates identically with the others.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does capability negotiation interact with the listChanged notifications a server can emit later in a session?
QWhat concrete failures appear if a client skips initialized and immediately calls tools/list?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating initialized as decorative and firing tools or prompts requests before it. The server is entitled to reject anything that arrives before the handshake completes.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.