Protocol

Connection lifecycle

Every connection starts with a handshake. Both sides agree on a protocol version and declare what they support, so nothing gets called that the other side can't handle.

Clientinside the hostServerMCP server1. initializeprotocolVersion · capabilities · clientInfo2. resultprotocolVersion · capabilities · serverInfo3. notifications/initializedOperation: only the capabilities both sides declared may be used4. tools/list → tools/call → …5. notifications/tools/list_changedShutdown: close stdin / end the HTTP session
initialize → result (excerpt)json
{  "protocolVersion": "2025-11-25",  "capabilities": {    "tools": { "listChanged": true },    "resources": { "subscribe": true },    "prompts": {}  },  "serverInfo": { "name": "calculator", "version": "1.0.0" }}

Capability negotiation

A server that doesn't declare resources will never receive resources/read. A client that doesn't declare sampling will never be asked to run the model.

16 / 28