MCP Google Drive OAuth flow redirects to claude.ai web instead of completing in CLI

Resolved 💬 2 comments Opened Apr 14, 2026 by teresalee-samsara Closed May 26, 2026

Description

When authenticating the claude.ai Google Drive MCP server from Claude Code CLI, the OAuth flow redirects to https://claude.ai/settings/mcp/auth_done?authed_mcp_server_id=... instead of a localhost callback URL that the CLI can capture.

Steps to Reproduce

  1. In Claude Code CLI, trigger Google Drive MCP authentication (e.g., try to read a Google Doc)
  2. The mcp__claude_ai_Google_Drive__authenticate tool tells the user to run /mcp and select "claude.ai Google Drive"
  3. User runs /mcp, selects Google Drive, completes OAuth in browser
  4. Browser redirects to https://claude.ai/settings/mcp/auth_done?authed_mcp_server_id=<id> — a web app page, not a localhost callback
  5. CLI never receives the auth callback

Expected Behavior

The OAuth flow should redirect to a localhost:<port>/callback?code=...&state=... URL so the CLI can complete the flow via complete_authentication. Alternatively, the /mcp OAuth flow in CLI should handle the token exchange directly.

Actual Behavior

  • authenticate tool says to run /mcp — no OAuth URL is provided directly
  • /mcp completes OAuth on the web side but the CLI has no record of the flow
  • complete_authentication fails with "No OAuth flow is in progress"
  • Google Drive MCP tools remain unavailable in the CLI session

Environment

  • Claude Code CLI (macOS, Darwin 24.6.0)
  • Model: Claude Opus 4.6 (1M context)
  • MCP server: claude.ai Google Drive (claudeai-proxy at https://drivemcp.googleapis.com/mcp/v1)

View original on GitHub ↗

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