Skip to content

Commit 4751c8a

Browse files
committed
Address review feedback
- Clarify .mcp.json discovery is not limited to project root - Use prodname_vscode_shortname variable instead of hardcoding 'VS Code'
1 parent 091100a commit 4751c8a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ You can configure MCP servers for a specific project by adding a JSON file to th
8888

8989
| Path | Recommended use |
9090
|------|-----------------|
91-
| `.mcp.json` at the project root | Local or per-checkout configuration |
91+
| `.mcp.json` (in any directory from your working directory up to the repository root) | Local or per-checkout configuration; commonly placed at the project root |
9292
| `.github/mcp.json` | Shared configuration that is committed to the repository |
9393

9494
When you start {% data variables.copilot.copilot_cli_short %} inside a Git repository, the CLI walks from your current working directory up to the repository root, loading every `.mcp.json` it finds along the way. When server names conflict, definitions in files closer to your working directory take precedence. Project-level definitions also take precedence over those in `~/.copilot/mcp-config.json`. For more information on relative trust, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#mcp-server-trust-levels).
@@ -110,7 +110,7 @@ The file format is the same as `~/.copilot/mcp-config.json`. For example:
110110
> [!NOTE]
111111
> * Project-level MCP servers are loaded only after you confirm folder trust on first launch. They are silently skipped in untrusted directories. For more information on folder trust, see [AUTOTITLE](/copilot/concepts/agents/about-copilot-cli#trusted-directories).
112112
> * In prompt mode (`copilot -p`), project-level MCP servers are not loaded by default. To enable them, set the `GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP` environment variable to `true`. For more information, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#environment-variables).
113-
> * VS Code's `.vscode/mcp.json` is not read by {% data variables.copilot.copilot_cli_short %}. It uses a different top-level key (`servers` rather than `mcpServers`). To migrate an existing `.vscode/mcp.json` to a format the CLI accepts, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#migrating-from-vscodemcpjson).
113+
> * {% data variables.product.prodname_vscode_shortname %}'s `.vscode/mcp.json` is not read by {% data variables.copilot.copilot_cli_short %}. It uses a different top-level key (`servers` rather than `mcpServers`). To migrate an existing `.vscode/mcp.json` to a format the CLI accepts, see [AUTOTITLE](/copilot/reference/copilot-cli-reference/cli-command-reference#migrating-from-vscodemcpjson).
114114
115115
## Managing MCP servers
116116

0 commit comments

Comments
 (0)