MCP tool calls intermittently rejected "disabled by the user" while cache shows enabled and server log shows execution
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
- Copilot Chat Extension Version: latest (1.136.x)
- VS Code Version: 1.136.1
- OS Version: Windows 11 x64
- Feature: Chat ask mode (MCP tool usage)
- Selected model: tokenrhythm/deepseek-v4-flash-0731
- Logs: attached below in the description
Steps to Reproduce:
1. Configure an MCP server at profile level (e.g. `@mozilla/firefox-devtools-mcp` with `--connect-existing --marionette-port 2828`).
2. Open multiple VS Code windows; some windows still hold a stale cached config of a **deleted workspace-level MCP server** (same underlying server, cached as `mcp.config.ws0.firefox-nightly` in workspace `state.vscdb` → `mcpToolCache`).
3. From Copilot Chat, call an MCP tool (e.g. `list_pages`).
4. Observe: the same tool call **alternates** between:
- Reaching the server (server log shows `Executing tool: list_pages` → server-side error "No Marionette listener..."), and
- Being rejected with **"disabled by the user"** (call never reaches the server).
Expected: tool availability should be consistent with the persisted authorization state.
Evidence:
- `mcpToolCache` in profile `state.vscdb` shows all 48 tools with `visibility: 3` (enabled), no disabled flags.
- Server log confirms the tool DID execute at 01:38:21: `[firefox-devtools-mcp] Executing tool: list_pages` → `Connecting to existing Firefox via Marionette...`.
- Minutes later, the exact same tool call is rejected as "disabled by the user" without any user action.
- `chat.mcp.autostart` is `never` in profile settings.
- The workspace-level cache still lists a deleted server (`mcp.config.ws0.firefox-nightly`), suggesting stale multi-window MCP state.
This looks like a sync issue between the MCP tool authorization cache, the per-window server connection state, and the Copilot-side permission check — likely triggered by multiple VS Code windows and a stale cached workspace-level MCP config.
Contributor guide
Assessment
This issue has not been assessed yet.