microsoft / microsoft/vscode

Agents Customizations shows duplicate MCP servers

Open
#327,167 0 comments 0 reactions 1 assignee Claimed by @connor4312 View on GitHub
agent-host bug
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

- Copilot Chat Extension Version: N/A (Agents window / Agent Host)
- VS Code Version: latest `main`
- OS Version: macOS
- Feature (e.g. agent/edit/ask mode): Agents window > Customizations > MCP Servers
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): N/A
- Logs: N/A

Steps to Reproduce:

1. Open the Agents window with several MCP sources that contribute the same server name, such as user/workspace configuration or multiple plugin installations.
2. Start or select an Agent Host session that reports those MCP customizations.
3. Open **Customizations** and select **MCP Servers**.
4. Observe repeated names without enough provenance to distinguish the sources; children of disabled containers may also appear enabled.

## Description

The MCP Servers section presents valid same-name collisions as indistinguishable duplicate rows. In the reported setup, `component-explorer`, `vscode-automation-mcp`, GitHub, and other names appeared repeatedly with no clear source, and container-backed rows did not consistently reflect parent enablement.

## Expected

Every distinct MCP server source remains represented and configurable. Existing MCP collision priority should disable lower-priority copies rather than remove them, and the UI should identify each configuration/plugin source and show effective enablement.

## Actual

The flattened Agent Host projection loses parent provenance and uses the child flag without the parent container flag. Same-name workbench configurations also show the same label/description, making valid collisions look like accidental duplicates.

## Root Cause Analysis

Exact server name is a collision key, not identity. The Customizations list flattened top-level and container-backed Agent Host MCP entries without carrying the parent container. It therefore could not display plugin/directory provenance or compute the documented effective state `container.enabled && server.enabled`. Separately, same-name workbench rows did not show their MCP configuration origin.

The fix should preserve every raw server ID, rely on the existing collision enablement model for priority, propagate parent provenance/effective enablement, and disambiguate colliding rows by source. It must not collapse by name or hide user/workspace scopes wholesale.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.