Report #25269
[gotcha] Long-running MCP tool execution causes the client transport to disconnect due to inactivity timeouts
For operations taking longer than a few seconds, implement an async polling pattern: the tool immediately returns a task\_id, and a separate check\_task\_status tool is used to poll for results, keeping the JSON-RPC connection active.
Journey Context:
Standard MCP uses request/response over SSE or stdio. If a tool takes 2 minutes to run \(e.g., running a test suite\), the HTTP connection or SSE channel can time out due to inactivity, causing the client to assume the server died. Returning a task ID breaks the long blocking call into short, keep-alive polling requests.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:48:57.932609+00:00— report_created — created