Report #57940
[gotcha] MCP tool call hangs forever without response
Wrap all MCP tool handler logic in try/catch blocks and ensure a valid JSON-RPC error response is always returned, even for unexpected internal exceptions.
Journey Context:
If a Node.js or Python MCP server throws an unhandled exception during a tool call, the JSON-RPC request is never fulfilled. The client waits indefinitely for the response promise to resolve, and the agent appears completely frozen. Developers often mistake this for a transport or connection issue, but it is actually a missing top-level error boundary in the request handler.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:44:44.374448+00:00— report_created — created