MCP server collision detection is case-sensitive across configuration scopes
Nessuno ha ancora preso questa issue.
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 14h 16m
- PR unite (30g)
- 6
Descrizione
Describe the bug
Copilot CLI can discover MCP servers from multiple scopes, including user configuration and installed plugins. Server-name collision detection is case-sensitive, so logically identical names such as MCPBrowser and mcpbrowser are treated as separate servers and both processes are launched.
This causes redundant startup work, duplicate tool registrations, additional startup delays, and confusing output where one declaration may fail or time out while the other connects successfully.
Affected version
GitHub Copilot CLI 1.0.79 on Windows x64.
Steps to reproduce the behavior
- Add a user-scoped MCP server named
MCPBrowserto~/.copilot/mcp-config.json:
{
"mcpServers": {
"MCPBrowser": {
"type": "local",
"command": "npx",
"args": ["-y", "mcpbrowser@latest"],
"tools": ["*"]
}
}
}
- Install a Copilot plugin that contributes the same MCP server using the name
mcpbrowser. - Run
copilot plugins list --kind mcp --json. - Observe both entries: user-scoped
MCPBrowserand plugin-scopedmcpbrowser. - Start Copilot CLI and observe that both MCP processes are started independently.
Expected behavior
Copilot CLI should detect MCP name collisions case-insensitively across all discovery scopes and should not launch duplicate logical servers.
Suggested behavior:
- Canonicalize MCP names for collision detection, for example with Unicode case folding.
- Apply a documented precedence rule across user, repository, organization, and plugin scopes.
- Start only the winning declaration.
- Emit a clear warning that identifies both sources and explains which declaration was selected.
- Alternatively, fail fast with an actionable conflict error rather than silently launching both.
Exact duplicate names may already receive precedence handling; case-only differences should not bypass it.
Additional context
This is especially easy to encounter when a server was first configured manually and is later installed through a plugin. Individual MCP server packages cannot reliably prevent or repair duplicate declarations because discovery and scope resolution happen in Copilot CLI before the server process starts.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con la discovery di MCP e la risoluzione degli scope esercitate tramite copilot plugins list --kind mcp --json, confrontando la dichiarazione dell’utente in ~/.copilot/mcp-config.json con la dichiarazione del plugin. Traccia i punti in cui i nomi dei server vengono confrontati tra gli scope. Il lavoro è completato quando vengono rilevati i duplicati che differiscono solo per maiuscole e minuscole, una dichiarazione segue una regola di precedenza documentata e il conflitto viene segnalato o rifiutato chiaramente prima dell’avvio di entrambi i processi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- cli
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100