inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Streamable-HTTP: Authorization Header is not getting applied when specified

Open santthosh opened this issue 8 months ago • 1 comments

Describe the bug If we switch to Streamable HTTP Transport Type and use the Authentication section to specify a Authorization header and Bearer Token, they are not being used.

To Reproduce Steps to reproduce the behavior:

  1. Switch to Streamable HTTP Transport Type
  2. Connect to an MCP server that requires Authorization header and Bearer Token per the specification
  3. The connection would fail with 401 error.

Here is a set of logs that show this behavior

Image

Expected behavior Connection would succeed buy properly passing the Authorization header with the contents of Bearer Token

Logs If applicable, add logs to help explain your problem.

[1] Connected to Streamable HTTP transport
[1] Connected MCP client to backing server transport
[1] Created streamable web app transport ddbc1a4d-1ce5-4541-b7a0-facd36fbc967
[1] Error from MCP server: Error: Error POSTing to endpoint (HTTP 401): {"error":"missing_authorization_header"}
[1]     at StreamableHTTPClientTransport.send (/Users/santthosh.selvadurai/Desktop/Projects/inspector/node_modules/@modelcontextprotocol/sdk/src/client/streamableHttp.ts:414:15)
[1]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[1] Error from MCP server: Error: Error POSTing to endpoint (HTTP 401): {"error":"missing_authorization_header"}
[1]     at StreamableHTTPClientTransport.send (/Users/santthosh.selvadurai/Desktop/Projects/inspector/node_modules/@modelcontextprotocol/sdk/src/client/streamableHttp.ts:414:15)

santthosh avatar May 01 '25 05:05 santthosh

Fix for this in PR 370

santthosh avatar May 01 '25 05:05 santthosh