Claude.ai account-level MCP connectors auto-loaded into CLI with no per-environment opt-out (~100K tokens of silent context bloat)

Resolved 💬 5 comments Opened Apr 17, 2026 by fernandoxavier02 Closed Apr 19, 2026

Summary

When a user is logged into Claude Code CLI with a Claude.ai account that has user:mcp_servers OAuth scope, every connector configured at the Claude.ai account level (including Claude Desktop integrations) is automatically loaded into every CLI session — regardless of the active provider, project, or user intent. There is no documented per-environment opt-out short of revoking the OAuth entirely or disabling each connector by hand.

In a typical setup this silently consumes ~100K tokens of context before the user types anything.

Environment

  • Claude Code CLI v2.1.112
  • Windows 11 (platform-independent behaviour)
  • Claude.ai Max subscription with ~12 Desktop connectors enabled (Canva, ClickUp, Figma, Gmail, Google Calendar, Google Drive, Hugging Face, Indeed, Jam, Linear, Notion, Vercel)
  • ~/.claude/.credentials.json contains claudeAiOauth.scopes = [..., "user:mcp_servers", ...]

Reproduction

  1. On claude.ai (web or Desktop) enable multiple connectors at the account level (e.g. Canva, ClickUp, Linear, Notion).
  2. On a separate machine or profile, run claude login in the CLI.
  3. Optional: route the CLI to a third-party provider to emphasise the surprise:

``
export ANTHROPIC_BASE_URL=https://api.minimax.io/anthropic
export ANTHROPIC_AUTH_TOKEN=...
``

  1. Start a fresh session, send hi, run /context.

Expected

Either:

  • CLI does not load account-level connectors by default, and the user opts them in explicitly, OR
  • CLI provides an environment variable / settings flag to disable account-connector inheritance without logging out.

Actual

All account-level connectors are loaded into the CLI session as mcp__claude_ai_* tools. In our measurement:

  • ~12 account connectors × avg 20 tools each ≈ ~240 tools
  • Combined schema cost ~90K tokens (measured: see related [issue on /context under-reporting])
  • Applies even when ANTHROPIC_BASE_URL points to a non-Anthropic provider
  • Applies in C:\Users\win root (i.e. no project context), where none of these connectors are relevant

Use cases broken

  1. Dev / personal separation. I want Claude Desktop to have ClickUp, Canva, Linear, Gmail for personal productivity. I want the CLI to stay lean for coding work. Today I must choose: rich Desktop or lean CLI, not both.
  1. Third-party provider users. If I route CLI to a self-hosted or third-party Anthropic-compatible endpoint (MiniMax, local Claude-compatible server, enterprise gateway), Claude.ai connectors don't even work — yet their schemas are still shipped with every request, polluting context and inflating cost.
  1. Per-project connector scope. There's no way to say "GitHub connector for work projects, Notion for personal, no Canva anywhere in CLI". It's all or nothing at the account level.
  1. Enterprise / compliance. Teams may want CLI sessions to be free of personal connectors for data-handling reasons. Today the only option is to create a separate account, which defeats the purpose of OAuth.

Current workarounds (all insufficient)

| Workaround | Downside |
| ---------- | -------- |
| /mcp disable per server | Tedious (must repeat for 10+ connectors); state appears to drift back on some reload events; cognitive overhead every new session |
| claude logout | Nuclear — loses OAuth, Max benefits, Claude-subscription features tied to the account |
| Disconnect at claude.ai/settings/connectors | Affects Desktop too — destroys the separation the user wants |
| Delete ~/.claude/.credentials.json | Same as logout, plus fragile |

Suggested Fix

Any one of these would substantially help; shipping more than one is ideal.

Environment variable (simplest)

CLAUDE_CODE_DISABLE_ACCOUNT_CONNECTORS=1

When set, CLI keeps OAuth (for subscription, session features) but skips registering MCP servers sourced from the Claude.ai account.

Allowlist

CLAUDE_CODE_ACCOUNT_CONNECTORS="github,vercel"

Opt-in list of which account connectors to load into CLI.

Project-local override

In <repo>/.claude/settings.json:

{
  "accountConnectors": false
}

Scope-aware login

claude login --scopes user:inference,user:profile,user:sessions:claude_code — allow the user to request a CLI login without the user:mcp_servers scope, while Desktop / web keep full scopes.

Impact

Users of Claude Code as a serious daily-driver CLI must choose between a clean, efficient coding environment and a full-featured Claude.ai account. Given Claude.ai's strong push on connectors (a competitive differentiator), penalising users for using them in CLI is a self-inflicted friction point.

Related

  • [/context under-reports MCP tool schema consumption] (separate issue — hides the cost of this inheritance)
  • #46416 — context window detection failing for third-party providers (compounds the pain because fallback window is smaller).

---

Happy to provide .credentials.json schema dumps (keys only, redacted values), /context captures, and any other artefacts on request.

View original on GitHub ↗

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