MCP server collision detection is case-sensitive across configuration scopes
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
copilot plugins list --kind mcp --json で実行される MCP の検出とスコープ解決から始め、ユーザーの ~/.copilot/mcp-config.json にある宣言とプラグインの宣言を比較します。スコープをまたいでサーバー名が比較される箇所を追跡します。大文字と小文字だけが異なる重複が検出され、いずれか一方の宣言が文書化された優先順位ルールに従い、両方のプロセスが起動する前に競合が明確に報告または拒否されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100