[FEATURE] Prevent Claude.ai account integrations into Claude Code context
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Problem
Claude.ai account-level integrations (connected via claude.ai/settings/integrations) load all their MCP tool definitions into every Claude Code session's context window, regardless of project relevance. There is no mechanism to selectively disable individual integrations for Claude Code while keeping them active for Claude.ai.
Impact
With typical business integrations connected (Slack, Notion, Attio CRM, Gusto HR, Digits accounting, etc.), 100-150+ tool definitions load before the user types anything. Each tool definition includes name, description, and full JSON schema — estimated 80,000-120,000 tokens consumed by tool definitions alone.
This causes:
Frequent context compaction during normal coding sessions
Reduced effective context window for actual code and conversation
Claude referencing irrelevant tools (e.g., digits_profit_and_loss during a TypeScript debugging session)
Duplicate tool definitions when the same service exists as both a Claude.ai integration and a project-level .mcp.json server (e.g., Supabase appearing 2-3x)
Proposed Solution
Requested feature
Per-integration control for Claude Code sessions. Any of these would solve it:
enabledClaudeAiMcpServers / disabledClaudeAiMcpServers in settings.json — Allow users to selectively enable/disable Claude.ai integrations for Claude Code at the global or project level, similar to enabledMcpjsonServers.
Project-scoped integration allowlist — Let .claude/settings.local.json specify which Claude.ai integrations should load for that project.
Lazy-load tool definitions — Instead of loading all tool schemas into context upfront, load them on-demand when Claude determines it needs a specific integration.
Alternative Solutions
Available workarounds (insufficient)
ENABLE_CLAUDEAI_MCP_SERVERS=false — Disables ALL integrations. No per-integration granularity.
permissions.deny — Prevents tool execution but definitions still consume context (see #11370 / #6320).
Disconnect from Claude.ai — Removes from both Claude.ai AND Claude Code. No way to keep an integration in Claude.ai while excluding it from Claude Code.
enabledMcpjsonServers / disabledMcpjsonServers — Only applies to project .mcp.json servers, not Claude.ai integrations.
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗