claude-code - 💡(How to fix) Fix [BUG] claude.ai Gmail MCP auth flow broken in Claude Code CLI on Linux — Enter key does nothing after browser auth [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#45268Fetched 2026-04-09 08:09:20
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

The /mcp authentication flow for the claude.ai Gmail connector never completes in Claude Code CLI. The terminal prompts "Press Enter after authenticating in your browser" but pressing Enter has no effect — no error, no success, the Gmail tools never Enter key has no effect. Gmail tools never appear. No error is shown.

Root Cause

Related Issues

  • #30166 — OAuth hang in Claude Desktop (different surface, similar root cause)
  • #25650 — Gmail tools not exposed in session after auth
RAW_BUFFERClick to expand / collapse

Environment

  • Claude Code CLI version: (run claude --version to fill in)
  • OS: Linux (Arch, kernel 6.19)
  • Shell: zsh
  • Plan: (fill in)

Summary

The /mcp authentication flow for the claude.ai Gmail connector never completes in Claude Code CLI. The terminal prompts "Press Enter after authenticating in your browser" but pressing Enter has no effect — no error, no success, the Gmail tools never
become available.

Steps to Reproduce

  1. Add Gmail MCP: claude mcp add --transport http gmail https://gmail.mcp.claude.com/mcp
  2. Run /mcp in a Claude Code session
  3. Select "claude.ai Gmail" → authenticate
  4. Terminal shows: Authenticating with claude.ai Gmail… A browser window will open for authentication
  5. Browser opens to https://claude.ai/settings/connectors
  6. Gmail shows as connected ("Disconnect" button visible)
  7. Return to terminal, press Enter
  8. Nothing happens (I press esc to exit it eventually)

Key Observations

  1. Wrong redirect URL. The CLI opens https://claude.ai/settings/connectors — a settings page, not an OAuth endpoint. There is no OAuth token exchange triggered.
  2. Two separate connector systems. https://claude.ai/settings/connectors (old, used by CLI auth flow) and https://claude.ai/customize (new Customize page) appear to be separate systems. Connecting Gmail on the new Customize page does not propagate to the old page. The CLI auth flow uses the old page.
  3. Gmail IS connected in the web app. The connector works correctly on claude.ai web chat — confirming the OAuth token is valid. The failure is CLI-specific.
  4. No OAuth page shown. Other reporters (e.g. #30166) describe seeing gmail.mcp.claude.com/google/install?metadata=.... That page never appears in the CLI flow on Linux — the browser goes straight to the connectors settings page.

Expected Behavior

After pressing Enter, the CLI should pick up the OAuth token and the Gmail tools should become available in the session.

Actual Behavior

Enter key has no effect. Gmail tools never appear. No error is shown.

Related Issues

  • #30166 — OAuth hang in Claude Desktop (different surface, similar root cause)
  • #25650 — Gmail tools not exposed in session after auth

extent analysis

TL;DR

The issue can be resolved by fixing the redirect URL in the CLI authentication flow to trigger the OAuth token exchange.

Guidance

  • Verify that the claude mcp add command is using the correct URL for the Gmail MCP, which should be an OAuth endpoint, not the settings page.
  • Check the documentation for the correct OAuth endpoint URL and update the claude mcp add command accordingly.
  • Investigate the difference between the old and new connector systems and determine if the CLI auth flow should be updated to use the new system.
  • Test the authentication flow with a different connector to see if the issue is specific to the Gmail connector.

Example

No code snippet is provided as the issue is related to the authentication flow and not a specific code snippet.

Notes

The issue seems to be related to the authentication flow and the redirect URL used by the CLI. The fact that the Gmail tools work correctly on the web app suggests that the OAuth token is valid, but the CLI is not able to pick it up.

Recommendation

Apply workaround: Update the claude mcp add command to use the correct OAuth endpoint URL, as described in the guidance section. This should trigger the OAuth token exchange and allow the Gmail tools to become available in the session.

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] claude.ai Gmail MCP auth flow broken in Claude Code CLI on Linux — Enter key does nothing after browser auth [1 comments, 2 participants]