HTTP MCP servers with OAuth don't trigger browser auth flow

Resolved 💬 2 comments Opened Mar 16, 2026 by GonChalamish-Novee Closed Mar 16, 2026

Description

HTTP MCP servers that require OAuth authentication (e.g., HubSpot at https://mcp.hubspot.com/anthropic) fail to connect in Claude Code CLI because the OAuth browser flow is never triggered.

Steps to Reproduce

  1. Add an OAuth-based HTTP MCP server:

``
claude mcp add hubspot --transport http -s user https://mcp.hubspot.com/anthropic
``

  1. Check status with claude mcp get hubspot → shows ✗ Failed to connect
  2. The server returns 401 Unauthorized with www-authenticate: Bearer header, indicating OAuth is required
  3. No browser window opens to complete the OAuth authorization flow
  4. Running /mcp to reconnect also does not trigger the OAuth flow

Expected Behavior

Claude Code should detect the OAuth requirement (via the www-authenticate header / .well-known/oauth-protected-resource metadata) and open a browser window for the user to authorize, similar to how the Claude desktop app handles it.

Actual Behavior

The connection silently fails with no OAuth prompt. The same MCP server works correctly in the Claude desktop app, which does complete the OAuth flow.

Environment

  • Claude Code CLI (claude-code)
  • macOS (Darwin 25.3.0)
  • Server: https://mcp.hubspot.com/anthropic (HTTP transport, OAuth-protected)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗