Skip to content

v0.18.0 in Streamable HTTP direct failed on OAuth 401 #982

@Rogdham

Description

@Rogdham

Inspector Version

Stopped working in v0.18.0

Confirmed working in v0.17.5

Describe the bug

I try to connect to an MCP server that requires OAuth. Transport type is Streamable HTTP, connection type is Direct.

MCP inspector in v0.18.0 performs a single POST request (excluding the OPTIONS one), to the given URL, to which the MCP server replies with

  • status code: 401
  • header www-authenticate: Bearer error="invalid_token", error_description="Authentication required", resource_metadata="https://redacted.example.com/.well-known/oauth-protected-resource/mcp"
  • body: {"error": "invalid_token", "error_description": "Authentication required"}

The following error is displayed on the console:

Failed to connect directly to MCP Server at: https://redacted.example.com/mcp: Error: Streamable HTTP error: Error POSTing to endpoint: {"error": "invalid_token", "error_description": "Authentication required"}

To Reproduce
Steps to reproduce the behavior:

  1. Go to MCP inspector
  2. Set transport type to Streamable HTTP
  3. Set the URL
  4. Set connection type to Direct
  5. Click on Connect
  6. See error in web console

Additional info

The “step by step” and “quick auth flow” modes accessible by opening the auth settings both still work properly in v0.18.0 for the same MCP server.

Environment (please complete the following information):

  • I am using the docker image
  • Browser: tested with both Chrome and Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions