zed-industries/zed · error
Unsupported protocol version
Error message
Unsupported protocol version: {:?} What it means
initialize sends the MCP initialize request advertising the latest protocol version; if the context server responds with a version string the client cannot accept, this error reports the unsupported version (shown via Debug). The server's negotiated version is the input at fault.
Solutions
- Update the context server to one supporting a compatible MCP protocol version
- Check the server's advertised protocol_version in its initialize response
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/context_server/src/protocol.rs:57 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/76a85e5e0d8c7882.
Report an issue: GitHub.
Appendix: source
Thrown at crates/context_server/src/protocol.rs:57
client_info: types::Implementation,
) -> Result<InitializedContextServerProtocol> {
let params = types::InitializeParams {
protocol_version: types::ProtocolVersion(types::LATEST_PROTOCOL_VERSION.to_string()),
capabilities: types::ClientCapabilities {
experimental: None,
sampling: None,
roots: None,
},
meta: None,
client_info,
};
let response: types::InitializeResponse = self
.inner
.request(types::requests::Initialize::METHOD, params)
.await?;
anyhow::ensure!(
Self::supported_protocols().contains(&response.protocol_version),
"Unsupported protocol version: {:?}",
response.protocol_version
);
log::trace!("mcp server info {:?}", response.server_info);
// Per MCP 2025-06-18, HTTP transport must attach the negotiated version
// as `MCP-Protocol-Version` on every post-initialize request.
self.inner
.set_protocol_version(&response.protocol_version.0);
let initialized_protocol = InitializedContextServerProtocol {
inner: self.inner,
initialize: response,
};
initialized_protocol.notify::<types::notifications::Initialized>(())?;View on GitHub (pinned to f4178619ac)