Desktop: No way to prevent built-in MCP servers from being injected into Code tab sessions

Resolved 💬 4 comments Opened Mar 22, 2026 by Asher- Closed Mar 22, 2026

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:

  1. Check isDisabled() before including the server in Px() / createAllServers(), or
  2. Add a settings.json key (e.g. disabledInternalServers: ["Claude in Chrome"]) that the Desktop respects when constructing --mcp-config, or
  3. Have the CLI's existing disabledMcpServers mechanism apply to --mcp-config SDK servers too

Reproduction

  1. Open Claude Desktop → Settings → disable Chrome extension
  2. Start a Code tab session
  3. Observe --mcp-config in the CLI process args still contains "Claude in Chrome": {"type":"sdk","name":"Claude in Chrome"}
  4. The model sees and attempts to use mcp__Claude_in_Chrome__* tools

Environment

  • Claude Desktop (macOS)
  • Claude Code 2.1.78 / 2.1.81

View original on GitHub ↗

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