[BUG] Remote MCP servers (Gmail, Calendar) silently added to CLI sessions via Desktop App OAuth

Resolved 💬 2 comments Opened Mar 23, 2026 by joshmcevoy17 Closed Apr 21, 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 setting up remote/OAuth MCP connections (Gmail, Google Calendar) in the Claude Desktop App, they automatically propagate to Claude Code CLI sessions without any notification or user action in the CLI. This creates several UX issues:

  1. No indication in the CLI that MCPs were added. I discovered Gmail and Calendar MCPs were active in a CLI project session without ever configuring them there. The /doctor command flagged high MCP context usage, which was confusing since I hadn't set up any new MCPs in the CLI.
  1. Propagation timing is inconsistent. CLI sessions that were already open or created shortly after the Desktop setup didn't receive the MCPs. Only new sessions created later picked them up. This made it look project-scoped when it's actually account-scoped with a delay.
  1. CLI sessions depend on Desktop App for OAuth. The remote MCPs only work if the Desktop App has been opened first to establish the OAuth tokens. The CLI has no way to initiate this auth flow independently. If you launch CLI sessions without opening Desktop first, the MCPs silently aren't available — no error, no prompt to authenticate.

What Should Happen?

  • The CLI should either manage its own OAuth flow for remote MCPs, or clearly indicate that Desktop App auth is required
  • Adding MCPs via Desktop should not silently inject them into CLI sessions — or at minimum, the CLI should notify the user that new MCPs are available
  • /doctor or /mcp should surface when remote MCPs are unavailable due to missing auth rather than just not showing them

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code CLI and start a session in any project. Run /mcp and confirm Gmail and Google Calendar are not listed.
  2. Open the Claude Desktop App (Windows).
  3. In Desktop, set up Gmail and/or Google Calendar as connected MCP integrations (complete the OAuth flow).
  4. Go back to the CLI. The existing session still does not show the new MCPs via /mcp.
  5. Close the CLI session and open a new one in the same project. Run /mcp — Gmail and Calendar now appear, even though they were never configured in the CLI.
  6. Open a new CLI session in a different project. The MCPs also appear there — confirming account-level propagation.
  7. Close the Desktop App entirely. Open a fresh CLI session without launching Desktop first. The remote MCPs may no longer be available (no error shown, they just don't appear).

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

v2.1.81

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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