github / github/copilot-cli

MCP server collision detection is case-sensitive across configuration scopes

Offen
#4,478 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

area:mcp
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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
  1. Add a user-scoped MCP server named MCPBrowser to ~/.copilot/mcp-config.json:
{
  "mcpServers": {
    "MCPBrowser": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "mcpbrowser@latest"],
      "tools": ["*"]
    }
  }
}
  1. Install a Copilot plugin that contributes the same MCP server using the name mcpbrowser.
  2. Run copilot plugins list --kind mcp --json.
  3. Observe both entries: user-scoped MCPBrowser and plugin-scoped mcpbrowser.
  4. 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der MCP-Erkennung und der Auflösung des Geltungsbereichs, die durch copilot plugins list --kind mcp --json ausgeführt werden, und vergleiche dabei die Deklaration des Benutzers in ~/.copilot/mcp-config.json mit der Plugin-Deklaration. Verfolge, wo Servernamen über verschiedene Geltungsbereiche hinweg verglichen werden. Die Aufgabe ist erledigt, wenn Duplikate erkannt werden, die sich nur in der Groß-/Kleinschreibung unterscheiden, eine Deklaration einer dokumentierten Vorrangregel folgt und der Konflikt eindeutig gemeldet oder abgewiesen wird, bevor beide Prozesse gestartet werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
shell
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.