Kuberwastaken/claurst · error
rmcp client ' ' failed to initialize
Error message
rmcp {} client '{}' failed to initialize: {} What it means
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.
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:177 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10).
Data as JSON: /api/errors/aeda383a6843cd94.
Report an issue: GitHub.
Appendix: source
Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:177
let transport = LegacySseRmcpTransport::connect(config, auth_token).await?;
let client_info = build_client_info(rmcp_model::ProtocolVersion::V_2024_11_05);
Self::connect_with_transport(config, transport, client_info, "sse").await
}
async fn connect_with_transport<T, E, A>(
config: &claurst_core::config::McpServerConfig,
transport: T,
client_info: rmcp_model::ClientInfo,
transport_label: &str,
) -> anyhow::Result<Self>
where
T: rmcp::transport::IntoTransport<RoleClient, E, A>,
E: std::error::Error + Send + Sync + 'static,
{
let (notifications_tx, notifications_rx) = mpsc::unbounded_channel();
let handler = RmcpNotificationClient::new(notifications_tx, client_info);
let running = handler.serve(transport).await.map_err(|e| {
anyhow::anyhow!(
"rmcp {} client '{}' failed to initialize: {}",
transport_label,
config.name,
e
)
})?;
let peer = running.peer().clone();
let snapshot = build_snapshot(config, &peer).await?;
Ok(Self {
snapshot,
peer,
running: Mutex::new(running),
notifications_rx: Arc::new(Mutex::new(notifications_rx)),
})
}
}View on GitHub (pinned to b0637c97ec)