Skip to content

[BUG] Gmail connector: thread search and message reading fail despite correct OAuth scopes (read works for labels/drafts, not messages #47847

Description

@Ensemble-Studio

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Summary

The Gmail MCP connector shows partial functionality: write operations and
label retrieval work correctly, but thread/message search and reading email
content consistently fail. Claude reports this as a "scope limitation" even
though the required read scopes are fully granted.

Environment

  • Claude Code version: 2.1.101
  • Platform: macOS
  • Connector: Gmail (claude.ai integration)

What's working

  • Draft creation (write access)
  • Label retrieval

What's not working

  • Thread/message search (search_threads)
  • Reading email content (get_thread)

Expected behavior

All Gmail connector tools should function once the required OAuth scopes are
granted.

Actual behavior

Read operations on threads and messages fail. Claude attributes this to
missing scopes, but the scope "View your email messages and settings" is
confirmed granted in Google Account settings.

Troubleshooting already performed

  • Removed and re-granted Google account access
  • Performed a fresh OAuth reconnect
  • Tested in incognito session
  • Retried across multiple days and sessions

Hypothesis

This appears to be a mismatch between the scopes granted by the user and how
the connector backend passes or validates those scopes when calling Gmail read
endpoints. The fact that write/label operations succeed but message read
operations fail suggests the issue is server-side in the connector
implementation, not a client-side configuration problem.

Additional context

No relevant local config files found in ~/Library/Application Support/Claude/claude-code — the issue is not caused by local configuration.

What Should Happen?

Claude should be able to read mails in Gmail.

Error Messages/Logs

Steps to Reproduce

  1. Connect Gmail account via Claude.ai integrations (OAuth flow)
  2. Confirm all requested permissions are granted, including
    "View your email messages and settings" in Google Account settings
  3. Open Claude Code or Claude.ai and attempt to use the Gmail connector
  4. Try creating a draft or retrieving labels — these succeed
  5. Try searching threads (e.g. "search my emails for X") — this fails
  6. Try reading an email thread — this fails
  7. Note that Claude reports the failure as a scope/permission issue
    despite scopes being confirmed as granted

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions