{"record":{"id":"1410a8574297a4e9","repo":"Kuberwastaken/claurst","slug":"mcp-server-timed-out-waiting-for-legacy-sse","errorCode":null,"errorMessage":"MCP server '{}': timed out waiting for legacy SSE endpoint event","messagePattern":"MCP server '(.+?)': timed out waiting for legacy SSE endpoint event","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/mcp/src/rmcp_backend.rs","lineNumber":327,"sourceCode":"            .await;\n\n            if let Err(e) = result {\n                tracing::warn!(server = %server_name, error = %e, \"Legacy SSE stream closed with error\");\n                if let Some(tx) = lock_recover(&endpoint_tx_for_task).take() {\n                    let _ = tx.send(Err(anyhow::anyhow!(e.to_string())));\n                }\n            } else if let Some(tx) = lock_recover(&endpoint_tx_for_task).take() {\n                let _ = tx.send(Err(anyhow::anyhow!(\n                    \"legacy SSE stream closed before announcing endpoint\"\n                )));\n            }\n        });\n        lock_recover(&self.background_tasks).push(task);\n\n        let endpoint = tokio::time::timeout(std::time::Duration::from_secs(10), endpoint_rx)\n            .await\n            .map_err(|_| {\n                anyhow::anyhow!(\n                    \"MCP server '{}': timed out waiting for legacy SSE endpoint event\",\n                    self.server_name\n                )\n            })?\n            .map_err(|_| {\n                anyhow::anyhow!(\n                    \"MCP server '{}': legacy SSE stream ended before endpoint discovery\",\n                    self.server_name\n                )\n            })??;\n        *lock_recover(&self.post_endpoint) = Some(endpoint);\n        Ok(())\n    }\n}\n\nimpl Drop for LegacySseRmcpTransport {\n    fn drop(&mut self) {\n        // Some upper-layer paths drop the backend instead of calling close()","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/mcp/src/rmcp_backend.rs#L309-L345","documentation":"Endpoint discovery for the legacy SSE transport exceeded its hard 10-second timeout: no endpoint (or error) event arrived on the discovery channel within tokio::time::timeout(Duration::from_secs(10)). The stream may still be alive but silent — the server never announced its POST endpoint in time.","triggerScenarios":"Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server latency; slow servers may not announce the endpoint within 10s","Verify the server actually sends the legacy SSE endpoint event","Retry the connection or switch to streamable-http transport"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}