Ee're injecting MCP-Session-Id in the middleware is in the HTTP response headers at MCP Server, but the MCP SDK's session.initialize() only returns the parsed JSON-RPC result, not the HTTP headers.
The middleware IS adding the header to the HTTP response (both for the initial SSE GET and for the subsequent POST requests to /messages/), but the MCP SDK doesn't expose those headers to us.
Our MCP Server using the mcp.server.fastmcp Python SDK.