Skip to content

ResponseBody not printed verbatim after receiving 401 status. #2297

Description

@tulshi

Which version line?

v2 — current (@modelcontextprotocol/inspector@latest)

Which client?

Web

Inspector version

latest

Node version

v26.4.0

Operating system (and browser, for the web client)

No response

Transport

Streamable HTTP

MCP server under inspection

Not tested with an MCP Server on my end. I visually analyzed the code.

Steps to reproduce

  1. Run MCP Inspector
  2. Get your MCP Server to respond with a 401 error
  3. Notice that the output does not show the responseBody.

Expected behavior

The responseBody should be printed in the logs so that one can see the OAuth Protected Resource Metadata in the WWW-Authenticate header, and the optional scope parameter.

Actual behavior

ResponseBody is not printed when the client receives a 401 status from the server.

Logs, errors, or screenshots

No response

Already prototyped a fix?

No response

Before you submit

  • I searched existing issues and this is not a duplicate.
  • This is not a security vulnerability report (those go through the private advisory process).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv2Issues and PRs for v2

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions