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:
if hc, 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.
streamableClientConn.setMCPHeadersderives theMcp-Protocol-Versionheader exclusively fromc.initializedResult, which is populated only through the unexportedclientConnection.sessionUpdatedhook.Client.Connectreaches that hook via a type assertion on theConnectionreturned by theTransport:That assertion silently fails whenever the
Connectionis wrapped by another type that exposes only the exportedConnectioninterface.c.initializedResultthen staysnilfor the life of the session, and every SEP-2575 (>=2026-07-28) request sent through that connection is missing theMcp-Protocol-Versionheader. Servers that validate the header per spec reject the request with400 Bad Request, closing the connection.This is currently breaking the GitHub MCP with the 1.7-pre releases.