-
Notifications
You must be signed in to change notification settings - Fork 996
Description
Describe the bug
The protocol version header doesn't get sent for subsequent requests for streamable HTTP transport (and others too looking at the implementation). It's getting dropped at the proxy transport layer.
As per https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#protocol-version-header , protocol version should be sent by the client for all subsequent requests post init. The inspector client running at 6274 does send this, but it gets dropped by the proxy running at 8080 (the default ports in inspector)
To Reproduce
Steps to reproduce the behavior:
- Run https://github.com/modelcontextprotocol/servers/tree/main/src/everything (or any other MCP server) locally with a single change
Added a log line to https://github.com/modelcontextprotocol/servers/blob/4b6ce397924982a93f8af25390b1e7d45073b282/src/everything/streamableHttp.ts#L13 so that we can check the logs.
app.post('/mcp', async (req: Request, res: Response) => {
console.log('Received MCP POST request:', req.body);
console.log('Request headers:', req.headers);
console.error('Received MCP POST request');
-
Run the inspector - tried both quick start and with cloning the repo locally.
-
Connect and then try list tools or any tool call.
Headers on inspector contains the MCP-Protocol-Version header :
Headers received on the server doesn't contain the protocol version header :
Expected behavior
Headers sent from the proxy should contain the MCP-Protocol-Version header.
Logs
Added screenshots of logs. Let me know if anything else is needed.
Additional context
This might also be applicable for last-event-id ?
Not sure if it's the responsibility of the StreamableHTTPClientTransport to make sure that this is passed.