github / github/copilot-cli

Workspace .mcp.json is never loaded in CLI 1.0.83 — 'mcp list' shows no Workspace group

オープン
#4,832 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

triage
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Describe the bug

Copilot CLI 1.0.83 does not load workspace MCP config at all. A repo-root .mcp.json is ignored, and copilot mcp list never emits a Workspace group — only User servers:.

This is not a display-only problem: the servers are never started. The session log contains no spawn attempt for the workspace servers.

copilot mcp --help explicitly advertises the source:

Configuration is loaded from multiple sources:
  User       ~/.copilot/mcp-config.json
  Workspace  .mcp.json or .github/mcp.json
  Plugin     Installed plugins with MCP servers

Affected version

GitHub Copilot CLI 1.0.83.

macOS (Apple Silicon).

Steps to reproduce

In a pristine git repo, with no .vscode/ directory and no comments in the JSON:

mkdir repro && cd repro && git init -q .
cat > .mcp.json <<'JSON'
{
  "mcpServers": {
    "repro_probe": { "type": "local", "command": "node", "args": ["server.js"] }
  }
}
JSON
copilot mcp list
copilot mcp get repro_probe

Actual behavior

$ copilot mcp list
User servers:
  linear (http)
  figma (http)

$ copilot mcp get repro_probe
Error: Server "repro_probe" not found.

copilot mcp list --json likewise contains only "source": "user" entries — no workspace entries at all.

Expected behavior

repro_probe appears under a Workspace group and is started for the session.

Ruled out

Each of these was tested individually, not assumed:

Hypothesis Result
Folder not trusted Repo has an entry in ~/.copilot/permissions-config.json with write approvals
Version too old 1.0.83; support shipped in v0.0.401 per #1291
Enterprise/managed policy Logs show managedSettings ... source=none, bypassDisabled=false
"type": "stdio" vs "local" Both ignored
mcpServers vs servers key Both ignored
.github/mcp.json path Also ignored
Comments in JSON (#4323) File is strict JSON, no comments; repro has no .vscode/mcp.json either
Not at repo root (#4765) cwd is the repo root
Servers themselves broken All start and authenticate fine when launched by hand, and work once copied into ~/.copilot/mcp-config.json

Possibly related

  • #3126 — same end symptom (includeWorkspaceSources never set), but reported via the SDK's enableConfigDiscovery path. This report is the plain interactive CLI, so the two may share a root cause.
  • #4542 — there mcp list does detect the workspace file and only the session connection fails; here it is never detected.
  • #4636 — startup reconciliation dropping servers in 1.0.81-11, but for --additional-mcp-config.

Impact / workaround

Workspace .mcp.json is the only version-controlled way to share MCP servers with a team. The workaround is to duplicate every server into ~/.copilot/mcp-config.json using absolute paths, which is per-machine and not version-controlled, so each person repeats the setup and the lists drift.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まずリポジトリルートの .mcp.json を使って問題を再現し、インタラクティブ CLI のワークスペース検出とユーザー設定パスを比較します。Workspace ソースが copilot mcp list に表示されない理由を追跡し、修正済みの設定によってサーバーが一覧に表示され、セッション用に起動することを確認します。

索引モデルが issue の本文から書いたものです。

評価

領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。