[BUG] MCP server (HTTP/SSE type) times out after OAuth authentication completes

Resolved 💬 2 comments Opened May 19, 2026 by CarmelaML Closed Jun 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

After completing the OAuth flow successfully, Claude Code fails to establish the MCP connection and times out. The error shown is:

▎ _Got new credentials, but reconnecting to [server] failed: MCP server "[server]" connection timed out after 30000ms_

The server endpoint is confirmed active — a direct curl returns HTTP 401 in ~0.3s, meaning the endpoint is reachable and responding. The issue appears to be in the handshake between Claude Code and the server after authentication completes.

Steps to reproduce:

  1. Configure an HTTP-type MCP server with OAuth (e.g. Glean)
  2. Run /mcp and authenticate — the OAuth flow completes successfully in the browser
  3. Claude Code attempts to reconnect and times out

Environment:

Additional observations:

  • The OAuth token is not persisted in the macOS keychain after authentication
  • ~/.claude/mcp-needs-auth-cache.json remains empty throughout
  • Reproduces consistently with and without corporate VPN
  • Clear authentication + re-authenticate does not resolve the issue

What Should Happen?

After OAuth completes successfully, Claude Code should establish the MCP connection, persist the token, and the server should appear as connected and ready to use.

Error Messages/Logs

Failed to reconnect to glean: MCP server "glean" connection timed out after 30000ms

Steps to Reproduce

  1. Configure an HTTP-type MCP server with OAuth (e.g. Glean)
  2. Run /mcp and authenticate — the OAuth flow completes successfully in the browser
  3. Claude Code attempts to reconnect and times out

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown

Claude Code Version

2.1.144 (Claude Code)

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Config (~/.mcp.json):
{
"mcpServers": {
"glean": {
"type": "http",
"url": "https://dowjones-be.glean.com/mcp/default"
}

Glean MCP settings showing it's active and available for connections:

<img width="680" height="677" alt="Image" src="https://github.com/user-attachments/assets/e5aea61b-1595-4e00-9e93-8b3548d278c9" />

View original on GitHub ↗

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