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
4 Comments
Additionally: even if the server injection is fixed, the broader request is support for disallowedTools that applies to everything — not just MCP servers, but all built-in tools. Users should be able to disable any default tool via settings.json (WebFetch, WebSearch, Bash, etc.) and replace it with custom MCP-provided alternatives, without the model seeing or attempting to call the originals.
Currently disallowedTools in settings.json has no effect on SDK-type servers passed via --mcp-config, and there is no mechanism to suppress built-in tools at all. Fine-grained control over the full tool list is needed.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Duplicate of #36868. Added comment there requesting disallowedTools support for built-in tools.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.