Skip to content

Streamable HTTP: header Mcp-Session-Id is not set for "notifications/initialized" requestΒ #905

@ashakirin

Description

@ashakirin

Inspector Version

  • 0.17.2

Describe the bug
Connect to MCP server supported Streamable HTTP transport.

  1. MCP Inspector sends initialization request { "method": "initialize", "params": { "protocolVersion": "2025-06-18", "capabilities": { "sampling": {}, "elicitation": {}, "roots": { "listChanged": true } }, "clientInfo": { "name": "inspector-client", "version": "0.17.2" } }, "jsonrpc": "2.0", "id": 0 }
  1. MCP Server responds with capabilities and sends Mcp-Session-Id in header:
    mcp-session-id d29151a7-b085-4e5d-b08e-258dde3c4ffa
    { "jsonrpc": "2.0", "id": 0, "result": { "protocolVersion": "2025-06-18", "capabilities": { "completions": {}, "logging": {}, "prompts": { "listChanged": true }, "resources": { "subscribe": false, "listChanged": true }, "tools": { "listChanged": true } }, "serverInfo": { "name": "mcp-server-weather-streamable", "version": "1.0.0" } } }
  2. Because of some reason, MCP Inspector doesn't send the Mcp-Session-Id header in next request, for initialize notifications:
    accept application/json, text/event-stream accept-encoding gzip, deflate, br, zstd accept-language en-US,en;q=0.9,de-DE;q=0.8,de;q=0.7,ru-RU;q=0.6,ru;q=0.5 authorization Bearer XXX connection keep-alive content-length 54 content-type application/json host localhost:8090 mcp-protocol-version 2025-06-18 origin http://localhost:6274 referer http://localhost:6274/ sec-ch-ua "Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141" sec-ch-ua-mobile ?0 sec-ch-ua-platform "macOS" sec-fetch-dest empty sec-fetch-mode cors sec-fetch-site same-site user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

{method: "notifications/initialized", jsonrpc: "2.0"} jsonrpc : "2.0" method : "notifications/initialized"

To Reproduce

  1. Configure MCP Server supporting stateful Streamable MCP communication
  2. Click on connect
  3. See error:
    Connection Error - Check if your MCP server is running and proxy token is correct

Expected behavior
Send Mcp-Session-Id header in all requests after initialization, like spec requires:
If an Mcp-Session-Id is returned by the server during initialization, clients using the Streamable HTTP transport MUST include it in the Mcp-Session-Id header on all of their subsequent HTTP requests.

  • OS: Mac OS
  • Browser Chrome
Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues and PRs related to authorizationbugSomething isn't workingneeds-triageNeeds to be triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions