inspector
inspector copied to clipboard
Streamable-HTTP: Authorization Header is not getting applied when specified
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:
- Switch to
Streamable HTTPTransport Type - Connect to an MCP server that requires
Authorizationheader andBearer Tokenper the specification - The connection would fail with 401 error.
Here is a set of logs that show this behavior
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)
Fix for this in PR 370