Skip to content

Built-in Gmail connector: search_threads returns "permission denied" despite consent screen granting gmail.readonly #229

Description

@tamotsuiwaki-droid

MCP server URL or name

Built-in Gmail connector (provided by Anthropic in claude.ai)

How are you connecting to this server?

From browsing the MCP server directory

Where does the issue occur?

During a conversation (after initial auth)

When did you last reproduce this?

2026-04-24 (around 23:50 JST, Japan)

Browser and OS

Chrome on Windows 11 (also reproduced in Claude Desktop App)

Describe the issue

The built-in Gmail connector in claude.ai returns The caller does not have permission when search_threads is called, even though the Google OAuth consent screen correctly requests the gmail.readonly scope and I approved it. Other Gmail tools (list_labels, list_drafts) work correctly against the same connection.

This looks like a different bug class from #218. In #218, required scopes were missing from the authorize request sent to Google. In this case, the scopes ARE requested and granted at consent time — but the stored/effective token behaves as if gmail.readonly is absent.

Consent screen (verified)

The Google consent screen requested exactly two scope groups and I approved both via "Select all":

  1. "View your email messages and settings" (= https://www.googleapis.com/auth/gmail.readonly)
  2. "Manage drafts and send emails" (= https://www.googleapis.com/auth/gmail.compose)

Observed pattern

Tool Result
list_labels success
list_drafts success
search_threads permission denied

This pattern is consistent with a token that effectively carries gmail.labels (or gmail.metadata) and gmail.compose, but NOT gmail.readonly — even though gmail.readonly was in the consent request and was approved.

Steps already tried

  • Disconnected and reconnected the Gmail connector: no change.
  • Tested in both Claude Desktop App and claude.ai Web browser: same behavior in both environments.

Error details

Error message: The caller does not have permission

request_id: req_011CaNrsfTEW1MUZwTN1o714

(Same error string and error pattern was returned on every attempt, across both Desktop App and Web browser.)

Expected behavior

search_threads should return matching Gmail threads, since the consent screen granted gmail.readonly which is the required scope for reading and searching threads.

Additional context

Suspected root cause (speculative)

Somewhere between the OAuth callback and the MCP gateway's token use, the gmail.readonly scope claim appears to be dropped or not propagated. This is downstream from #218 (where the authorize URL itself was missing scopes) — in this case, the authorize URL appears correct.

Related issues

Impact

Search-based Gmail operations are the core of any email assistant workflow (e.g. "find the last email from X", "look up this thread"). With search_threads unusable, the Gmail connector is practically limited to label listing and draft creation, which makes most real-world use cases non-functional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions