docs(gmail): gmail.settings.basic required for filter tools (#385) - #387
Closed
iShark5060 wants to merge 1 commit into
Closed
iShark5060 wants to merge 1 commit into
iShark5060 wants to merge 1 commit into
Conversation
create_filter/list_filters 403 after upscoping because Cursor's first-party Google OAuth client never requests https://www.googleapis.com/auth/gmail.settings.basic. This plugin is a URL wrapper around gmailmcp.googleapis.com and cannot declare that scope (no CLIENT_ID in mcp.json). Document the gap and that existing users must re-consent after the connector client is updated. Fixes investigation for #385; the OAuth client change is outside this repo. Co-authored-by: Lutz Schwemer Panchez <shark@shark5060.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #385.
This does not stop
create_filter/list_filters403s by itself. Gmail connector OAuth is not declared in this repo, so there is no in-repo scope list to addgmail.settings.basicto. Documenting that, plus the re-consent step, is the change this plugin can make.What we checked
The Gmail plugin is a URL wrapper:
{ "mcpServers": { "gmail": { "type": "http", "url": "https://gmailmcp.googleapis.com/mcp/v1" } } }No
auth.CLIENT_ID, noauth.scopes. Contrast withthird_party/x/mcp.json, which can adddm.read/dm.writebecause it ships X's static client ID.Google Workspace plugins in this repo follow the same pattern (Gmail / Drive / Calendar): packaging only. Cursor's first-party Google client (
MCP_OAUTH_PROVIDER_POLICIES/cursor-gws-prodconsent screen, per #345) owns OAuth. Adding a fakeauthblock without that client ID would either be ignored or break Google sign-in (CLIENT_IDis required whenauthis present).Live evidence
Reproduced
list_filtersagainst this connector:HTTP MCP tool execution failed: Streamable HTTP error: Server returned 403 after trying upscoping— same error as Gmail plugin: create_filter / list_filters fail with 403 — OAuth missing gmail.settings.basic #385.Google's protected-resource metadata already advertises the missing scope:
GET https://gmailmcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1scopes_supportedincludeshttps://www.googleapis.com/auth/gmail.settings.basic(alongsidegmail.readonly,gmail.modify,gmail.compose, etc.).Gmail API
filters.createrequires onlygmail.settings.basic.gmail.modifycovers labels/messages, which is why those tools work while filters do not. Linked Apps “See (but not change) your email settings” isgmail.readonly, not settings write.Unauthenticated
tools/listongmailmcp.googleapis.com/mcp/v1omits filter tools; the authenticated Cursor/Grok session exposescreate_filter/list_filters/update_filter/delete_filter. Tools have no per-tool scope annotations, so upscoping cannot learnsettings.basicfromtools/list.What still must change outside this repo
https://www.googleapis.com/auth/gmail.settings.basicunder Data Access. This scope is sensitive; it may need Google restricted-scope verification.settings.basic(hardcoded subset and/or consent screen omission). Do not requesthttps://mail.google.com/just to make filters work.This PR
mcp.jsoncannot request it, re-consent.1.0.1.No
mcp.jsonauthblock on purpose.Test plan
list_filters403 after upscoping on the live Gmail MCPscopes_supportedincludesgmail.settings.basicthird_party/gmail/mcp.jsonhas no OAuth scopes/client ID (Drive/Calendar match)list_filters/create_filtersucceed