What is negotiated during the MCP initialize handshake and what should happen on version mismatch?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
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.
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.
What an interviewer would ask next. Try answering before peeking at the approach.
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.