Report #22627
[gotcha] MCP tool calls fail or hang immediately after connection — server not initialized
Complete the full MCP initialization handshake before making any tool calls: \(1\) send initialize request, \(2\) receive capabilities response, \(3\) send initialized notification. Only then send tools/call or resources/read requests. Guard against race conditions in async connection code.
Journey Context:
MCP mandates a specific lifecycle: the client sends an initialize request, the server responds with its capabilities, and the client sends an initialized notification. Only after this three-step handshake is the server ready to accept requests. If you skip this — common when writing custom clients or when async connection logic has a race — the server will reject requests or silently drop them. The error message \(if any\) is often unhelpful, like a generic JSON-RPC internal error, because the server hasn't yet negotiated which features it supports.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:23:09.952888+00:00— report_created — created