claude-code - 💡(How to fix) Fix [BUG] MCP server (HTTP/SSE type) times out after OAuth authentication completes [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60521Fetched 2026-05-20 03:56:26
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Error Message

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

Error Messages/Logs

Code Example

Failed to reconnect to glean: MCP server "glean" connection timed out after 30000ms
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] MCP server (HTTP/SSE type) times out after OAuth authentication completes [1 comments, 2 participants]