{"record":{"id":"aeda383a6843cd94","repo":"Kuberwastaken/claurst","slug":"rmcp-client-failed-to-initialize","errorCode":null,"errorMessage":"rmcp {} client '{}' failed to initialize: {}","messagePattern":"rmcp (.+?) client '(.+?)' failed to initialize: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/mcp/src/rmcp_backend.rs","lineNumber":177,"sourceCode":"        let transport = LegacySseRmcpTransport::connect(config, auth_token).await?;\n        let client_info = build_client_info(rmcp_model::ProtocolVersion::V_2024_11_05);\n        Self::connect_with_transport(config, transport, client_info, \"sse\").await\n    }\n\n    async fn connect_with_transport<T, E, A>(\n        config: &claurst_core::config::McpServerConfig,\n        transport: T,\n        client_info: rmcp_model::ClientInfo,\n        transport_label: &str,\n    ) -> anyhow::Result<Self>\n    where\n        T: rmcp::transport::IntoTransport<RoleClient, E, A>,\n        E: std::error::Error + Send + Sync + 'static,\n    {\n        let (notifications_tx, notifications_rx) = mpsc::unbounded_channel();\n        let handler = RmcpNotificationClient::new(notifications_tx, client_info);\n        let running = handler.serve(transport).await.map_err(|e| {\n            anyhow::anyhow!(\n                \"rmcp {} client '{}' failed to initialize: {}\",\n                transport_label,\n                config.name,\n                e\n            )\n        })?;\n\n        let peer = running.peer().clone();\n        let snapshot = build_snapshot(config, &peer).await?;\n\n        Ok(Self {\n            snapshot,\n            peer,\n            running: Mutex::new(running),\n            notifications_rx: Arc::new(Mutex::new(notifications_rx)),\n        })\n    }\n}","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/mcp/src/rmcp_backend.rs#L159-L195","documentation":"The rmcp client failed during the MCP `initialize` handshake over the labelled transport (stdio, streamable-http, or sse). The connection was established but the protocol negotiation/initialization round-trip failed — version mismatch, the peer not speaking MCP, or the connection dropping during init.","triggerScenarios":"Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the remote is a real MCP server speaking a compatible protocol version","Check server logs for why initialization was rejected","Confirm the server did not exit or close the connection immediately after accept"],"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"}