Hmbown/CodeWhale · error
Unsupported MCP transport
Error message
Unsupported MCP transport '{transport}'. Supported values: sse What it means
The legacy SSE detection path validates the optional 'transport' field of an MCP server config. Only the value 'sse' (case-insensitive) is accepted in this code path; any other value causes an immediate bail. This prevents silently misinterpreting a transport the code cannot speak.
Solutions
- Set transport to "sse" (the only supported value here)
- Remove the transport field entirely to use the default transport handling
- Move the server to a stdio command-based config if it is a local server
Example fix
// before
{ "url": "https://example.com/mcp", "transport": "streamable-http" }
// after
{ "url": "https://example.com/mcp", "transport": "sse" } Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED: [&str; 1] = ["sse"];
if let Some(t) = cfg.transport {
assert!(SUPPORTED.iter().any(|s| s.eq_ignore_ascii_case(t.trim())), "unsupported transport: {t}");
} Prevention
- Only set transport when the value is "sse"
- Copy configs from this project's docs, not other clients
- Validate configs at load time
When it happens
Trigger: Setting transport to a value other than 'sse' (e.g. "streamable-http", "websocket", "SSE " with odd casing is fine, but "http" is not) in an MCP server config reaching this legacy-SSE validation.
Common situations: Copying an MCP config written for another client that supports 'streamable-http' or 'websocket' transports; typos like 'sse2' or 'stdio' leaking into a remote-server config.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- {error}
- Failed to parse MCP config
- Failed to parse MCP config
- Failed to parse MCP config; file contents were omitted
- Failed to read MCP config
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/a93d0af07ab52bf2.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/mcp.rs:1539
}
}
fn is_legacy_sse_transport(config: &McpServerConfig) -> bool {
config
.transport
.as_deref()
.map(|transport| transport.trim().eq_ignore_ascii_case("sse"))
.unwrap_or(false)
}
pub fn validate_mcp_transport(transport: Option<&str>) -> Result<()> {
let Some(transport) = transport else {
return Ok(());
};
if transport.trim().eq_ignore_ascii_case("sse") {
return Ok(());
}
anyhow::bail!("Unsupported MCP transport '{transport}'. Supported values: sse");
}
fn response_id_matches(id: Option<&serde_json::Value>, expected_id: &str) -> bool {
let Some(id) = id else {
return false;
};
if id.as_str() == Some(expected_id) {
return true;
}
id.as_u64()
.map(|id| id.to_string() == expected_id)
.unwrap_or(false)
}
// === McpConnection - Async Connection Management ===
/// Manages a single async connection to an MCP server
pub struct McpConnection {View on GitHub (pinned to 73e0f67d83)