[BUG] MCP server (HTTP/SSE type) times out after OAuth authentication completes
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:
- Configure an HTTP-type MCP server with OAuth (e.g. Glean)
- Run /mcp and authenticate — the OAuth flow completes successfully in the browser
- Claude Code attempts to reconnect and times out
Environment:
- Claude Code version: 2.1.144
- macOS 24.6.0
- MCP server config: type: http, OAuth authentication
- Server URL: https://dowjones-be.glean.com/mcp/default
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
- Configure an HTTP-type MCP server with OAuth (e.g. Glean)
- Run /mcp and authenticate — the OAuth flow completes successfully in the browser
- 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" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗