{"record":{"id":"523d91b7b632274f","repo":"Kuberwastaken/claurst","slug":"mcp-server-invalid-streamable-http-protocol","errorCode":null,"errorMessage":"MCP server '{}': invalid streamable HTTP protocol version '{}': {}","messagePattern":"MCP server '(.+?)': invalid streamable HTTP protocol version '(.+?)': (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-rust/crates/mcp/src/lib.rs","lineNumber":609,"sourceCode":"        pub async fn connect(config: &McpServerConfig, auth_token: Option<String>) -> anyhow::Result<Self> {\r\n            match config.server_type.as_str() {\r\n                \"stdio\" => Self::connect_stdio(config).await,\r\n                \"sse\" => {\r\n                    let backend = crate::rmcp_backend::RmcpClientBackend::connect_legacy_sse(\r\n                        config,\r\n                        auth_token,\r\n                    )\r\n                    .await?;\r\n                    Ok(Self::from_backend(Arc::new(backend)))\r\n                }\r\n                \"http\" => {\r\n                    let mut last_error = None;\r\n                    for &protocol_version in transport::STREAMABLE_HTTP_PROTOCOL_VERSIONS {\r\n                        let protocol_version = serde_json::from_value::<rmcp::model::ProtocolVersion>(\r\n                            Value::String(protocol_version.to_string()),\r\n                        )\r\n                        .map_err(|e| {\r\n                            anyhow::anyhow!(\r\n                                \"MCP server '{}': invalid streamable HTTP protocol version '{}': {}\",\r\n                                config.name,\r\n                                protocol_version,\r\n                                e\r\n                            )\r\n                        })?;\r\n                        let protocol_version_label = protocol_version.as_str().to_string();\r\n                        match crate::rmcp_backend::RmcpClientBackend::connect_http(\r\n                            config,\r\n                            auth_token.clone(),\r\n                            protocol_version,\r\n                        )\r\n                        .await\r\n                        {\r\n                            Ok(backend) => return Ok(Self::from_backend(Arc::new(backend))),\r\n                            Err(e) => {\r\n                                let message = e.to_string();\r\n                                if Self::is_unsupported_protocol_error(&message) {\r","sourceCodeStart":591,"sourceCodeEnd":627,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/mcp/src/lib.rs#L591-L627","documentation":"When connecting a streamable-HTTP MCP server, the client iterates STREAMABLE_HTTP_PROTOCOL_VERSIONS and deserializes each into rmcp::model::ProtocolVersion. This error fires if one of the compiled-in protocol version strings fails that deserialization — i.e. a library/build inconsistency, since these are constants the library itself controls.","triggerScenarios":"Transport::connect_http loop over transport::STREAMABLE_HTTP_PROTOCOL_VERSIONS where a version string (e.g. \"2025-03-26\") is not accepted by rmcp's ProtocolVersion deserializer — typically after a rmcp crate upgrade that dropped or changed accepted version formats.","commonSituations":"Mismatched rmcp dependency versions in Cargo.lock; someone edited STREAMABLE_HTTP_PROTOCOL_VERSIONS to an rmcp-unsupported string; vendored/patched rmcp with stricter parsing.","solutions":["Update the rmcp crate to a version whose ProtocolVersion accepts the strings in STREAMABLE_HTTP_PROTOCOL_VERSIONS","Remove/correct the offending entry in STREAMABLE_HTTP_PROTOCOL_VERSIONS (crates/mcp transport)","Run cargo update to reconcile duplicate rmcp versions in the workspace","Check the serde error in the message to see why the version string was rejected"],"exampleFix":"// before\npub const STREAMABLE_HTTP_PROTOCOL_VERSIONS: &[&str] = &[\"2026-01-01\"];\n// after\npub const STREAMABLE_HTTP_PROTOCOL_VERSIONS: &[&str] = &[\"2025-03-26\", \"2024-11-05\"];","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match connect(cfg).await {\n    Err(e) if e.to_string().contains(\"invalid streamable HTTP protocol version\") => {\n        // dependency/build issue: fail fast, surface upgrade guidance\n    }\n    r => r?,\n}","preventionTips":["Keep rmcp versions aligned across the workspace (cargo update)","Never hand-edit STREAMABLE_HTTP_PROTOCOL_VERSIONS without checking rmcp support","Pin and test rmcp upgrades in CI"],"tags":["mcp","protocol-version","serde","dependency"],"backgroundTag":"invalid-enum-value","analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}