Kuberwastaken/claurst · error · anyhow::Error
MCP server ' ': unsupported transport type
Error message
MCP server '{}': unsupported transport type '{}' What it means
McpClient::connect dispatches on config.server_type ("stdio", "sse", streamable-http). Any other string hits the catch-all arm and produces this error naming the server and the unrecognized transport type.
Solutions
- Set server_type to one of the supported values: "stdio", "sse", or the streamable-http value used by this library
- Check spelling/casing of the server_type field in the MCP config
- Consult docs for the exact accepted strings and update the config schema
- If you need a new transport, implement it in connect's match rather than inventing a server_type
Example fix
// before
{"name": "fs", "server_type": "streamable_http", ...}
// after
{"name": "fs", "server_type": "streamable-http", ...} Defensive patterns
Strategy: validation
Validate before calling
const VALID: &[&str] = &["stdio", "sse", "streamable-http"];
assert!(VALID.contains(&cfg.server_type.as_str()), "bad server_type: {}", cfg.server_type); Prevention
- Validate server_type against an enum at config-load time
- Use a serde enum with deny_unknown_fields for server configs
- Copy transport names from the library docs, not other MCP clients
When it happens
Trigger: An McpServerConfig whose server_type field is misspelled or an unsupported value (e.g. "http", "websocket", "streamable_http", empty string) passed to McpClient::connect.
Common situations: Hand-written settings.json with `"type": "streamable_http"` instead of the accepted spelling; newer/older config schema mixing; copy-pasted config from a different MCP client using different transport names.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Unknown MCP server
- invalid legacy SSE base URL
- MCP server ' ' not found or not connected
- Unknown MCP server
- MCP server ' ' has no URL configured (required for OAuth)
AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10).
Data as JSON: /api/errors/3c1895a75244954e.
Report an issue: GitHub.
Appendix: source
Thrown at src-rust/crates/mcp/src/lib.rs:648
protocol_version = %protocol_version_label,
error = %message,
"Streamable HTTP protocol version unsupported; trying fallback"
);
last_error = Some(e);
continue;
}
return Err(e);
}
}
}
Err(last_error.unwrap_or_else(|| {
anyhow::anyhow!(
"MCP server '{}': no supported streamable HTTP protocol version found",
config.name
)
}))
}
other => Err(anyhow::anyhow!(
"MCP server '{}': unsupported transport type '{}'",
config.name,
other
)),
}
}
pub(crate) fn is_unsupported_protocol_error(message: &str) -> bool {
// rmcp, servers, and gateways do not emit a single stable
// protocol-negotiation error string, so match the known variants
// conservatively to keep downgrade fallback working.
let lower = message.to_ascii_lowercase();
lower.contains("unsupported protocol version")
|| lower.contains("unsupported mcp-protocol-version")
|| (lower.contains("protocol version") && lower.contains("unsupported"))
|| (lower.contains("mcp-protocol-version") && lower.contains("bad request"))
}
View on GitHub (pinned to b0637c97ec)