Which client?
Web
The problem
The SDK's assertSecureTokenEndpoint throws InsecureTokenEndpointError when an OAuth token endpoint is plain http: on a host outside its loopback exemption (localhost / 127.0.0.1 / ::1). That string appears nowhere in the Inspector's source, so the error falls through to the generic auth-failure path and the UI renders a "Re-authentication required" banner with a Re-authenticate button.
That button cannot possibly work. The SDK special-cases this error to rethrow rather than fall through to a fresh /authorize redirect — it is a deliberate hard stop, not a transient auth failure. InsecureTokenEndpointError also does not extend OAuthError, precisely so it is not treated as retryable.
So the Inspector presents a terminal configuration error as a retryable auth error. The user clicks Re-authenticate, the same error is thrown again, and nothing in the UI ever says what is actually wrong or what to do about it.
Reported from the outside on modelcontextprotocol/typescript-sdk#2591, where it is the reason the underlying problem was hard to diagnose.
Expected behavior
Recognize the error and surface it as what it is: a configuration problem with a concrete cause and a concrete fix, and no Re-authenticate affordance.
The message should name the offending endpoint, say that OAuth token requests must use TLS, and point at the two things that actually resolve it — use https:, or make the endpoint genuinely loopback (localhost / 127.0.0.1 / ::1). Where a per-server Token URL override exists (#1906), that is the lever to mention.
Notes
Which client?
Web
The problem
The SDK's
assertSecureTokenEndpointthrowsInsecureTokenEndpointErrorwhen an OAuth token endpoint is plainhttp:on a host outside its loopback exemption (localhost/127.0.0.1/::1). That string appears nowhere in the Inspector's source, so the error falls through to the generic auth-failure path and the UI renders a "Re-authentication required" banner with a Re-authenticate button.That button cannot possibly work. The SDK special-cases this error to rethrow rather than fall through to a fresh
/authorizeredirect — it is a deliberate hard stop, not a transient auth failure.InsecureTokenEndpointErroralso does not extendOAuthError, precisely so it is not treated as retryable.So the Inspector presents a terminal configuration error as a retryable auth error. The user clicks Re-authenticate, the same error is thrown again, and nothing in the UI ever says what is actually wrong or what to do about it.
Reported from the outside on
modelcontextprotocol/typescript-sdk#2591, where it is the reason the underlying problem was hard to diagnose.Expected behavior
Recognize the error and surface it as what it is: a configuration problem with a concrete cause and a concrete fix, and no Re-authenticate affordance.
The message should name the offending endpoint, say that OAuth token requests must use TLS, and point at the two things that actually resolve it — use
https:, or make the endpoint genuinely loopback (localhost/127.0.0.1/::1). Where a per-server Token URL override exists (#1906), that is the lever to mention.Notes
*.localhostdomains #1944. Fixing the*.localhostcase upstream shrinks how often this fires but does not fix the presentation for every other insecure-endpoint case (host.docker.internal, a LAN hostname, a reverse-proxy name).