DEV Community

Cover image for MCP Initialization and Handshake - Deprecated
Abhinav Sachdeva
Abhinav Sachdeva

Posted on

MCP Initialization and Handshake - Deprecated

The MCP initialization phase is a strict 3-step JSON-RPC handshake that negotiates the protocol version, exchanges supported capabilities, and establishes session state before any normal operations (tools/list, resources/read, etc.) can run.

The 3-Step Handshake Sequence

Initialize Request (Client → Server)

The client initiates the connection as the very first message. It declares the highest protocolVersion it supports, its capabilities (e.g., roots, elicitation), and its clientInfo (name/version).

{
   "jsonrpc":"2.0",
   "id":1,
   "method":"initialize",
   "params":{
      "protocolVersion":"2025-11-25",
      "capabilities":{
         "roots":{
            "listChanged":true
         },
         "elicitation":{

         }
      },
      "clientInfo":{
         "name":"client-name",
         "version":"1.0.0"
      }
   }
}
Enter fullscreen mode Exit fullscreen mode

Initialize Response (Server → Client)

The server responds with the negotiated protocolVersion (either matching the client's version or falling back to a supported one), its capabilities (tools, resources, prompts, logging, completions), serverInfo, and optional instructions (system-level hints for the host LLM on how to use the server).

{
   "jsonrpc":"2.0",
   "id":1,
   "result":{
      "protocolVersion":"2025-11-25",
      "capabilities":{
         "tools":{
            "listChanged":true
         },
         "resources":{
            "subscribe":true,
            "listChanged":true
         },
         "prompts":{
            "listChanged":false
         },
         "logging":{

         }
      },
      "serverInfo":{
         "name":"internal-knowledge-server",
         "version":"2.1.0"
      },
      "instructions":"Use search_docs before querying raw database resources."
   }
}
Enter fullscreen mode Exit fullscreen mode

notifications/initialized Notification (Client → Server)

Once the client validates the server's response and confirms it supports the negotiated protocol version, it sends a one-way JSON-RPC notification (notifications/initialized, with no id field) to signal that the session is ready.

{
  "jsonrpc": "2.0",
  "method": "notifications/initialized"
}
Enter fullscreen mode Exit fullscreen mode

What Happens Immediately After Initialization?

The initialize response only tells the client which capability categories exist (e.g., "tools": {}); it does not return the actual tool schemas, resource URIs, or prompt definitions.

Immediately after sending notifications/initialized, the client fires discovery requests (tools/list, resources/list, prompts/list) for whichever capabilities the server advertised.

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

The fallback line in the Initialize Response is the part I keep coming back to — the server can answer with a lower protocolVersion than the client offered, which is neat in theory, but in practice, how often do servers you have worked with actually fall back cleanly versus just rejecting when 2025-11-25 is newer than what they support? And since notifications/initialized carries no id and gets no reply, how do you tell a session that is live from one where the server quietly dropped it right after the handshake?