MemotivaMCP Advanced: STDIO Transport, Connection Handshake, Bidirectional Communication

What is the MCP connection handshake and why is it required?

MCP Advanced: STDIO Transport, Connection Handshake, Bidirectional Communication

Audio flashcard · 0:31

Nortren·

What is the MCP connection handshake and why is it required?

0:31

Every MCP connection must begin with a specific three-message handshake before any other communication can occur. First, the client sends an Initialize Request. Second, the server responds with an Initialize Result that includes its capabilities, describing which features like tools, resources, and prompts it supports. Third, the client sends an Initialized Notification confirming it has processed the server's capabilities. Only after this handshake completes can you send requests like tool calls, prompt listings, or resource reads. Skipping this sequence causes the server to reject requests.
modelcontextprotocol.io