[BUG] Gmail OAuth Flow Hangs at Final Redirect in Claude Desktop

Resolved 💬 10 comments Opened Mar 2, 2026 by agentneo16 Closed May 25, 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?

<html><head></head><body><h1>Bug Report: Gmail OAuth Flow Hangs at Final Redirect in Claude Desktop</h1>
<h2>Environment</h2>
<ul>
<li><strong>Claude Desktop Version</strong>: 1.1.4498 (24f768) — Build 2026-02-26T19:47:09.000Z</li>
<li><strong>OS</strong>: macOS</li>
<li><strong>Account</strong>: Hiren Madan — Max plan</li>
<li><strong>Gmail Account</strong>: hirenmadan@gmail.com</li>
</ul>
<h2>Related Issues</h2>
<ul>
<li><strong>GitHub Issue #22698</strong> — "Gmail integration fails to reconnect after disconnect" (exact same symptoms)</li>
<li><strong>GitHub Issue #27492</strong> — "Claude Cowork MCP Issue continues" (MCP connection failures post-update)</li>
</ul>
<h2>Summary</h2>
<p>Gmail OAuth flow completes all Google-side authentication steps successfully but <strong>hangs indefinitely at the final redirect back to Claude Desktop</strong>. The browser shows a blue loading progress bar that never completes. Google Drive connector works perfectly using the same Google account — only Gmail is affected.</p>
<p><strong>Critically, the Gmail MCP works correctly via claude.ai web chat</strong> — the OAuth token is valid and functional. The failure is specifically in Claude Desktop's ability to receive and process the OAuth callback.</p>

What Should Happen?

<h2>Expected Behavior</h2>
<p>After Step 9, the browser should redirect back to Claude Desktop, Gmail should show <strong>"Connected"</strong> (green) in Connectors, and Gmail MCP tools should be available in Chat and Cowork.</p>

Error Messages/Logs

<h2>Actual Behavior</h2>
<ul>
<li>The OAuth consent page hangs with a loading indicator after clicking Continue</li>
<li>The redirect/callback to Claude Desktop never fires</li>
<li>Returning to Claude Desktop, Gmail sometimes shows "Configure" (partially registered) but MCP tools do not work</li>
<li>The "..." menu shows Disconnect option, suggesting partial state was saved, but the token exchange was incomplete</li>
</ul>
<h2>Troubleshooting Already Attempted (All Failed)</h2>

Step | Result
-- | --
Revoked "Claude for Gmail" access from myaccount.google.com/connections, then reconnected | Same hang at final redirect
Used incognito/private browser window | Same hang
Cleared all Chrome cookies (all time) | Same hang
Disconnected and reconnected Gmail multiple times | Same hang
Attempted connection from claude.ai web Settings → Connectors | Got MCP error
Verified no VPN or firewall blocking | Not applicable
Restarted Claude Desktop completely | No change

Steps to Reproduce

<h2>Steps to Reproduce</h2>
<ol>
<li>Open Claude Desktop → Settings → Connectors</li>
<li>Click "..." next to Gmail → Disconnect (if previously attempted)</li>
<li>Gmail moves to "Desktop app" section, shows "Connect" button</li>
<li>Click "Connect" on Gmail</li>
<li>Browser opens to <code>gmail.mcp.claude.com/google/install?metadata=...</code></li>
<li>"Connect Claude to Gmail" page → Click <strong>Continue</strong></li>
<li>Google account chooser → Select <strong>hirenmadan@gmail.com</strong></li>
<li>"You're signing back in to Claude for Gmail" → Click <strong>Continue</strong></li>
<li>"Claude for Gmail wants access to your Google Account" (shows "already has access to 4 services") → Click <strong>Continue</strong></li>
<li><strong>BUG</strong>: Page greys out, blue loading bar appears at top, <strong>spins indefinitely</strong> — redirect to Claude Desktop never completes</li>
</ol>

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.63.

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<h2>Key Diagnostic Evidence</h2>
<ol>
<li><strong>Google Drive connects successfully</strong> using the same Google account → The issue is Gmail-specific, not a general OAuth or network problem.</li>
<li><strong>Gmail MCP works via claude.ai web chat</strong> → The OAuth token IS valid. Claude's Gmail MCP server (<code>gmail.mcp.claude.com</code>) can authenticate and access the mailbox. Verified by successfully calling <code>gmail_get_profile</code> which returned the full profile.</li>
<li><strong>The hang occurs at Google's consent summary page</strong> (<code>accounts.google.com/signin/oauth/v2/consentsummary</code>) → The failure is in the callback/redirect mechanism between Google and Claude Desktop, not in Google's authentication flow itself.</li>
</ol>
<h2>Screenshots</h2>
<p>10 sequential screenshots documenting the complete flow are available, showing every step from the Connectors page through the OAuth flow to the final hang.</p>
<h2>Impact</h2>
<ul>
<li>Cannot use Gmail MCP in <strong>Cowork</strong> (primary use case for email workflow automation)</li>
<li>Cannot use Gmail MCP in <strong>Claude Desktop Chat tab</strong></li>
<li>Only workaround is using <strong>claude.ai web chat</strong> where Gmail MCP functions correctly</li>
</ul>
<h2>Requested Action</h2>
<p>This appears to be a server-side issue with Claude's OAuth callback handler for the Gmail connector. Please escalate to the engineering team handling MCP integrations/auth.</p></body></html>

View original on GitHub ↗

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