You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP servers with "disabled": true in mcp-config.json are still loaded and available #3582
MCP servers marked with "disabled": true in ~/.copilot/mcp-config.json are still being loaded and their tools are available in the session. The disabled flag is completely ignored by the CLI runtime.
Affected version
1.0.57-0
Steps to reproduce the behavior
Open ~/.copilot/mcp-config.json
Set "disabled"#COLON| true on one or more MCP server entries:
{
"mcpServers": {
"calendar": {
"disabled": true,
"type": "sse",
"url": "https://example.com/sse",
"headers": { ... }
}
}
}
Start a new Copilot CLI session
Observe that tools from the "disabled" servers are still listed and callable
Expected behavior
Servers with "disabled": true should not be connected, and their tools should not be available in the session.
But in actuality, all MCP servers are loaded regardless of the disabled flag. In my case, 8 servers are marked disabled: true and all 8 have their tools available
Plus transport-specific fields: command/args/env/cwd (local) or url/headers (remote)
There is no disabled property on the per-server config schema. The Zod schema drops unknown keys, so "disabled": true is silently ignored.
How disabling actually works
The CLI uses a separate disabledMcpServers string array stored in settings.json (not mcp-config.json). This list contains server names (keys from mcpServers). The disable mechanism:
/mcp slash command → toggles servers on/off, writes to settings.json via UserSettings.writeKey("disabledMcpServers", ...)
McpHost (src/mcp-client/mcp-host.ts) receives disabledMcpServers at construction and filters them out before connecting
mcpConfigApi.disable() (src/core/sharedApi/mcpConfigApi.ts) adds server names to the persisted disabled list
Workaround
To disable an MCP server, either:
Use /mcp in an interactive session and toggle the server off
Manually add the server name to disabledMcpServers array in ~/.copilot/settings.json
Remove the server entry from mcp-config.json entirely
Recommendation
This is a feature request rather than a bug — the "disabled": true per-server property was never implemented. Could be closed as "not a bug" or converted to a feature request to support VS Code-style inline "disabled": true on server entries.
Activity
IrynaKulakova commentedon Jun 18, 2026
Investigation Results
Conclusion:
"disabled": trueon individual server entries is not a supported propertyThe
MCPServerConfigschema (src/core/persistence/mcp-config.ts) defines these properties for each server entry inmcp-config.json:tools,type,isDefaultServer,filterMapping,timeout,oidc,auth,deferToolscommand/args/env/cwd(local) orurl/headers(remote)There is no
disabledproperty on the per-server config schema. The Zod schema drops unknown keys, so"disabled": trueis silently ignored.How disabling actually works
The CLI uses a separate
disabledMcpServersstring array stored insettings.json(notmcp-config.json). This list contains server names (keys frommcpServers). The disable mechanism:/mcpslash command → toggles servers on/off, writes tosettings.jsonviaUserSettings.writeKey("disabledMcpServers", ...)McpHost(src/mcp-client/mcp-host.ts) receivesdisabledMcpServersat construction and filters them out before connectingmcpConfigApi.disable()(src/core/sharedApi/mcpConfigApi.ts) adds server names to the persisted disabled listWorkaround
To disable an MCP server, either:
/mcpin an interactive session and toggle the server offdisabledMcpServersarray in~/.copilot/settings.jsonmcp-config.jsonentirelyRecommendation
This is a feature request rather than a bug — the
"disabled": trueper-server property was never implemented. Could be closed as "not a bug" or converted to a feature request to support VS Code-style inline"disabled": trueon server entries.