Desktop: No way to prevent built-in MCP servers from being injected into Code tab sessions
Bug
Built-in MCP servers (Claude in Chrome, Claude Preview, mcp-registry, scheduled-tasks) are unconditionally injected into every Code tab session via --mcp-config. There is no mechanism to prevent this — not through Desktop preferences, settings.json, ~/.claude.json, nor any CLI flag.
Impact
The model sees tools from servers the user doesn't want (e.g. mcp__Claude_in_Chrome__*), wastes turns attempting to call them, and there is no way to remove them from the tool list.
Root cause
In the Desktop Electron app, internal MCP servers are registered unconditionally at startup:
// Fpt() — called at app startup, no conditional
function Fpt() {
const t = yR();
const e = Idt(t);
IM(Mx, Opt, () => e); // always registers
}
Px() (which lists internal servers) returns all registered servers with no filtering. createAllServers() creates proxy servers for all of them and passes them to the CLI via --mcp-config.
The chromeExtensionEnabled Desktop preference only sets an isDisabled callback on the server config object:
isDisabled: () => !Fr("chromeExtensionEnabled")
This callback is not checked before registration or injection. The server's tools are still advertised to the model regardless of this flag.
Expected behavior
When a user disables a built-in MCP server in Desktop preferences, its tools should not appear in the model's tool list. Either:
- Check
isDisabled()before including the server inPx()/createAllServers(), or - Add a
settings.jsonkey (e.g.disabledInternalServers: ["Claude in Chrome"]) that the Desktop respects when constructing--mcp-config, or - Have the CLI's existing
disabledMcpServersmechanism apply to--mcp-configSDK servers too
Reproduction
- Open Claude Desktop → Settings → disable Chrome extension
- Start a Code tab session
- Observe
--mcp-configin the CLI process args still contains"Claude in Chrome": {"type":"sdk","name":"Claude in Chrome"} - The model sees and attempts to use
mcp__Claude_in_Chrome__*tools
Environment
- Claude Desktop (macOS)
- Claude Code 2.1.78 / 2.1.81
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗