-
Notifications
You must be signed in to change notification settings - Fork 629
Description
Describe the bug
When using --disable-mcp-server with -p (prompt) mode, the specified MCP server's tools are still available to the model. The flag is being ignored.
Affected version
0.0.363+
Steps to reproduce the behavior
- Have an MCP server configured (e.g., Playwright)
- Run:
copilot -p "What playwright tools do you see?" --disable-mcp-server Playwright - Observe that Playwright tools are still listed in the response
Expected behavior
The Playwright MCP server tools should not be available to the model when --disable-mcp-server Playwright is specified. The model should report no Playwright tools.
Additional context
- Operating system: Windows 11
- Shell: PowerShell
Regression info:
- Works correctly in v0.0.357 and earlier (Playwright tools are hidden when disabled)
- v0.0.358-0.0.362 had MCP tools removed from
-pmode entirely (separate bug) - v0.0.363 restored MCP to
-pmode but broke--disable-mcp-serverflag - Bug persists through v0.0.367 (latest)
The regression was likely introduced in v0.0.363 when MCP support was restored to prompt mode - the --disable-mcp-server filtering isn't being applied in that code path.
Apart from Copilot's description that was made above, I can add that this reproduces on mac and it seems that disabling MCP servers interactively with /mcp disable Playwright doesn't work even though I get the confirmation that MCP server "Playwright" is already disabled.
