Hosted Gmail MCP: agent mcp login succeeds, IDE Settings shows connected, but agent tool calls return Unauthorized (auth=unknown)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I wanted too but it had to many ■■■■■■■ links so I COULDN;T AAR

Steps to Reproduce

~/.cursor/mcp.json with google-gmail-v2 pointing at https://gmailmcp.googleapis.com/mcp/v1 + static CLIENT_ID/CLIENT_SECRET + gmail scopes
Enable Gmail API + Gmail MCP API in GCP
Web app OAuth client with redirect URIs above
agent mcp login google-gmail-v2 → succeeds
Restart Cursor, Settings shows connected
Agent chat: call search_threads

Expected Behavior

Agent tool calls use stored OAuth token. search_threads returns inbox threads.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Environment
OS: macOS (arm64)
Cursor: 3.11.13 (stable)
MCP transport: streamable HTTP (remote)
MCP server: https://gmailmcp.googleapis.com/mcp/v1
OAuth: Static client credentials (Google Web application)
Account: Google Workspace (@jijbaan.nl)

Additional Information

Workarounds attempted (none fixed IDE agent)
Renamed server to google-gmail-v2 to clear stale state
agent mcp login (succeeds in CLI, IDE still fails)
Logout → toggle off/on → reconnect in Settings
mcp_auth from agent (reports success, tools still fail)
Full Cursor restart after CLI login
New agent chat session

Does this stop you from using Cursor

No - Cursor works, but with this issue

3 posts were merged into an existing topic: Hosted Gmail MCP (user-gmail): Tools UI shows connected after logout/toggle, but Agent MCP tool calls return Unauthorized; OAuth reconnect never prompts