Report #49006
[gotcha] MCP tool calls fail with cryptic errors immediately after server connection because initialization handshake is incomplete
Always complete the full MCP initialization handshake \(send initialize request, receive initialize response, send initialized notification\) before making any tool calls. Implement connection state tracking. Queue tool requests until initialization is confirmed. Treat any pre-init tool call as a programmer error, not a retryable failure.
Journey Context:
The MCP protocol lifecycle requires a three-step initialization: client sends initialize request, server responds with its capabilities, client sends initialized notification. Only after this handshake completes are tool calls valid. If the client sends a tools/call request before initialization completes, the server MUST return an error per spec. In practice, async client implementations sometimes fire tool calls before the handshake finishes, especially on reconnect or when the server is slow. The error message varies by server implementation and can be confusing \('Method not found' or 'Invalid request' instead of 'Not initialized'\), sending developers debugging in the wrong direction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:44:18.380343+00:00— report_created — created