[BUG] Gmail MCP integration uses Google Drive OAuth client — cannot grant Gmail permissions

Resolved 💬 5 comments Opened Apr 20, 2026 by Seerapu2 Closed May 28, 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?

Bug Description

The built-in Gmail MCP server (gmailmcp.googleapis.com) consistently routes
through the "Claude for Google Drive" OAuth client instead of a Gmail-specific
OAuth client. This means the authorization flow can never grant Gmail API scopes,
making the Gmail MCP permanently non-functional.

Steps to Reproduce

  1. Use Claude Code with the built-in Gmail MCP integration
  2. Call any Gmail tool (e.g., list_labels, create_draft)
  3. Get "requires re-authorization" error
  4. Call mcp__Gmail__authenticate — receive an auth URL
  5. Open the auth URL in browser
  6. Google shows: "Claude for Google Drive wants additional access"

— only Drive file permission checkboxes are shown, NO Gmail permissions

  1. Any token granted has Drive scopes, not Gmail scopes
  2. All Gmail API calls fail with 403

Expected Behavior

The OAuth consent screen should show Gmail permissions
("Read, compose, send and permanently delete all your email")
and grant https://mail.google.com/ or https://www.googleapis.com/auth/gmail.modify scopes.

Actual Behavior

Google consent screen shows "Claude for Google Drive wants additional access"
with only Drive file scopes. Callback URL always returns:
scope=email+drive.readonly+drive.file+userinfo.email+openid

No Gmail scopes are ever granted.

Root Cause (suspected)

The Gmail MCP server OAuth client ID (5a970912-02f9-4e78-b66c-965c0e1a74b0)
appears to be the same OAuth app registered for Google Drive, not a
Gmail-specific app. Google's OAuth system shows the app name and scopes
registered for that client_id, which is Drive-only.

Environment

  • Claude Code (web/CLI)
  • Platform: Linux
  • Gmail MCP server: https://gmailmcp.googleapis.com/mcp/v1
  • MCP server ID: 54fd9acb-7cb9-5d39-8b90-b9d1c7111fb4

Impact

The Gmail MCP integration is completely non-functional for all users.
Any workflow relying on Gmail (sending reports, reading email, creating drafts)
cannot work until the correct OAuth client is used.

What Should Happen?

It should connect to my gmail to send email response.

Error Messages/Logs

Steps to Reproduce

Bug Description

The built-in Gmail MCP server (gmailmcp.googleapis.com) consistently routes
through the "Claude for Google Drive" OAuth client instead of a Gmail-specific
OAuth client. This means the authorization flow can never grant Gmail API scopes,
making the Gmail MCP permanently non-functional.

Steps to Reproduce

  1. Use Claude Code with the built-in Gmail MCP integration
  2. Call any Gmail tool (e.g., list_labels, create_draft)
  3. Get "requires re-authorization" error
  4. Call mcp__Gmail__authenticate — receive an auth URL
  5. Open the auth URL in browser
  6. Google shows: "Claude for Google Drive wants additional access"

— only Drive file permission checkboxes are shown, NO Gmail permissions

  1. Any token granted has Drive scopes, not Gmail scopes
  2. All Gmail API calls fail with 403

Expected Behavior

The OAuth consent screen should show Gmail permissions
("Read, compose, send and permanently delete all your email")
and grant https://mail.google.com/ or https://www.googleapis.com/auth/gmail.modify scopes.

Actual Behavior

Google consent screen shows "Claude for Google Drive wants additional access"
with only Drive file scopes. Callback URL always returns:
scope=email+drive.readonly+drive.file+userinfo.email+openid

No Gmail scopes are ever granted.

Root Cause (suspected)

The Gmail MCP server OAuth client ID (5a970912-02f9-4e78-b66c-965c0e1a74b0)
appears to be the same OAuth app registered for Google Drive, not a
Gmail-specific app. Google's OAuth system shows the app name and scopes
registered for that client_id, which is Drive-only.

Environment

  • Claude Code (web/CLI)
  • Platform: Linux
  • Gmail MCP server: https://gmailmcp.googleapis.com/mcp/v1
  • MCP server ID: 54fd9acb-7cb9-5d39-8b90-b9d1c7111fb4

Impact

The Gmail MCP integration is completely non-functional for all users.
Any workflow relying on Gmail (sending reports, reading email, creating drafts)
cannot work until the correct OAuth client is used.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Sonnet 4.6 (model ID: claude-sonnet-4-6)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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