claude-code - 💡(How to fix) Fix MCP Gmail auth hangs indefinitely after browser authentication [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#46096Fetched 2026-04-11 06:29:06
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

The MCP Gmail authentication flow opens the browser and authentication completes, but the CLI hangs indefinitely waiting for the callback after pressing Enter.

Root Cause

The MCP Gmail authentication flow opens the browser and authentication completes, but the CLI hangs indefinitely waiting for the callback after pressing Enter.

Fix Action

Fix / Workaround

Current workaround

None found. Process requires force-killing Claude Code.

RAW_BUFFERClick to expand / collapse

Description

The MCP Gmail authentication flow opens the browser and authentication completes, but the CLI hangs indefinitely waiting for the callback after pressing Enter.

Steps to reproduce

  1. Run /mcp command
  2. Browser opens and completes OAuth authentication
  3. Return to Claude Code and press Enter
  4. Process hangs forever, never completes the MCP connection

Expected behavior

After authenticating in the browser and pressing Enter, the MCP connection should complete and Gmail tools should become available.

Environment

Current workaround

None found. Process requires force-killing Claude Code.

extent analysis

TL;DR

The issue can be resolved by investigating the authentication callback handling in the CLI, potentially related to the auth callback URL.

Guidance

  • Verify that the auth callback URL https://claude.ai/api/organizations/.../mcp/start-auth/... is correctly configured and accessible.
  • Check for any errors or warnings in the output or logs after pressing Enter, which might indicate the cause of the hang.
  • Inspect the /mcp command implementation to ensure it properly handles the authentication callback and completes the MCP connection.
  • Consider adding logging or debugging statements to the authentication flow to identify where the process hangs.

Notes

The exact cause of the issue is unclear, and further investigation is needed to determine the root cause. The provided information suggests a potential issue with the authentication callback handling.

Recommendation

Apply workaround: Modify the authentication flow to include additional logging or debugging to identify the cause of the hang, as the root cause is currently unknown.

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…

FAQ

Expected behavior

After authenticating in the browser and pressing Enter, the MCP connection should complete and Gmail tools should become available.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING