You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mcp-Protocol-Version header missing when client Connection is wrapped #1109
streamableClientConn.setMCPHeaders derives the Mcp-Protocol-Version header exclusively from c.initializedResult, which is populated only through the unexported clientConnection.sessionUpdated hook. Client.Connect reaches that hook via a type assertion on the Connection returned by the Transport:
ifhc, ok:=cs.mcpConn.(clientConnection); ok {
hc.sessionUpdated(cs.state)
}
That assertion silently fails whenever the Connection is wrapped by another type that exposes only the exported Connection interface. c.initializedResult then stays nil for the life of the session, and every SEP-2575 (>= 2026-07-28) request sent through that connection is missing the Mcp-Protocol-Version header. Servers that validate the header per spec reject the request with 400 Bad Request, closing the connection.
This is currently breaking the GitHub MCP with the 1.7-pre releases.
Activity
mcp: derive Mcp-Protocol-Version header from the outgoing message (mo…
mcp: prefer the negotiated protocol version over the request context
mcp: prefer the negotiated protocol version over the request context (#…