claude-code - 💡(How to fix) Fix [BUG] Web-connected Gmail account overrides local Gmail MCP server configuration [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46219Fetched 2026-04-11 06:26:00
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

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?

When connecting a Gmail account via the Claude web interface (claude.ai), the web-connected account overrides a locally configured Gmail MCP server in Claude Code CLI. The local MCP
server is configured to authenticate against a different Gmail account, but after the web connection, all Gmail MCP calls resolve to the web-connected account instead.

Steps to reproduce

  1. Configure a local Gmail MCP server in Claude Code CLI using @gongrzhe/server-gmail-autoauth-mcp with OAuth credentials for Account A (e.g. a shared/project mailbox)
  2. Verify that gmail_get_profile returns Account A — works correctly
  3. Connect Account B (e.g. a personal Gmail account) via the Claude web interface (claude.ai) using the built-in Gmail integration
  4. Open Claude Code CLI again and call gmail_get_profile

Expected: Returns Account A (the locally configured MCP account)
Actual: Returns Account B (the web-connected account)

Environment

  • Claude Code CLI on Linux (Ubuntu)
  • Local MCP server: @gongrzhe/server-gmail-autoauth-mcp with credentials stored in ~/.gmail-mcp/
  • The local MCP config has not changed — the credentials and server definition remain intact

Impact

This effectively breaks project-scoped Gmail MCP setups where the CLI needs to operate on a different account than the one connected via the web UI. The local MCP configuration should
take precedence over the web-connected account, or at minimum the two should coexist without conflict.

What Should Happen?

Expected: Returns Account A (the locally configured MCP account)
Actual: Returns Account B (the web-connected account)

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

  1. Configure a local Gmail MCP server in Claude Code CLI using @gongrzhe/server-gmail-autoauth-mcp with OAuth credentials for Account A (e.g. a shared/project mailbox)
  2. Verify that gmail_get_profile returns Account A — works correctly
  3. Connect Account B (e.g. a personal Gmail account) via the Claude web interface (claude.ai) using the built-in Gmail integration
  4. Open Claude Code CLI again and call gmail_get_profile

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Claude Code 2.1.90

Claude Code Version

Claude Code 2.1.100

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

No response

extent analysis

TL;DR

  • The issue may be resolved by reconfiguring the local MCP server or adjusting the authentication flow to prioritize the locally configured account.

Guidance

  • Verify that the local MCP server configuration remains intact and that the credentials for Account A are still valid.
  • Check if there are any authentication token or cache issues that might be causing the web-connected account to override the local configuration.
  • Consider adjusting the authentication flow to use a separate authentication context or token for the local MCP server.
  • Review the changes between Claude Code 2.1.90 and 2.1.100 to identify potential causes for the regression.

Example

  • No specific code snippet is provided, but reviewing the @gongrzhe/server-gmail-autoauth-mcp configuration and authentication logic may help identify the issue.

Notes

  • The issue seems to be related to a regression in the Claude Code version, and downgrading to 2.1.90 may temporarily resolve the issue.
  • Further investigation is needed to determine the root cause and develop a permanent fix.

Recommendation

  • Apply workaround: Reconfigure the local MCP server or adjust the authentication flow to prioritize the locally configured account, as this may provide a temporary solution until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Web-connected Gmail account overrides local Gmail MCP server configuration [1 participants]