[BUG] Web-connected Gmail account overrides local Gmail MCP server configuration

Resolved 💬 2 comments Opened Apr 10, 2026 by mmnagele Closed Jun 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] 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_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗