Skip to content

Commit b5fb0d9

Browse files
authored
Merge pull request #10303 from microsoft/docs/copilot-cli-mcp-discovery
Add automatic MCP server discovery section with supported sources and configurations
2 parents 00b8e18 + 5708902 commit b5fb0d9

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

docs/agent-customization/mcp-servers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ When the Dev Container is created, {% data variables.product.prodname_vscode_sho
137137

138138
With the `setting(chat.mcp.discovery.enabled)` setting, you can select one or more tools from which to discover their MCP server configuration.
139139

140+
Supported sources include Claude Desktop, {% data variables.copilot.copilot_cli %}, Cursor, and Windsurf. Learn more about [automatic MCP server discovery](/docs/agents/reference/mcp-configuration.md#automatic-mcp-server-discovery), including configuration locations and remote behavior.
141+
140142
</details>
141143

142144
<details>

docs/agents/reference/mcp-configuration.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,25 @@ When defining MCP servers, follow these naming conventions for the server name:
281281
* Use a unique name for each server to avoid conflicts
282282
* Use a descriptive name that reflects the server's functionality or brand, such as "github" or "database"
283283

284+
## Automatic MCP server discovery
285+
286+
{% data variables.product.prodname_vscode_shortname %} can automatically detect and reuse MCP server configurations from supported applications. Use `setting(chat.mcp.discovery.enabled)` to select the discovery sources.
287+
288+
| Source | Setting property | Configuration location |
289+
|--------|------------------|------------------------|
290+
| Claude Desktop | `claude-desktop` | Windows: `%APPDATA%\Claude\claude_desktop_config.json`<br/>macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`<br/>Linux: `$XDG_CONFIG_HOME/Claude/claude_desktop_config.json`, or `~/.config/Claude/claude_desktop_config.json` if `XDG_CONFIG_HOME` is not set |
291+
| {% data variables.copilot.copilot_cli %} | `copilot` | `<COPILOT_HOME>/mcp-config.json`, or `~/.copilot/mcp-config.json` if `COPILOT_HOME` is not set |
292+
| Cursor (global) | `cursor-global` | `~/.cursor/mcp.json` |
293+
| Cursor (workspace) | `cursor-workspace` | `<workspace>/.cursor/mcp.json` |
294+
| Windsurf | `windsurf` | `~/.codeium/windsurf/mcp_config.json` |
295+
296+
All discovery sources are off by default. In a remote window, {% data variables.product.prodname_vscode_shortname %} resolves configuration locations and environment variables in the remote environment.
297+
298+
For {% data variables.copilot.copilot_cli %}, setting `COPILOT_HOME` replaces the default `~/.copilot` location. {% data variables.product.prodname_vscode_shortname %} does not check both locations.
299+
300+
> [!NOTE]
301+
> Agent Host sessions read the {% data variables.copilot.copilot_cli %} MCP configuration independently. The discovery setting does not change how the Agent Host receives MCP servers. Learn more about [MCP configuration behavior on the extension host](/docs/agents/concepts/agent-host.md#behavior-on-the-extension-host).
302+
284303
## Commands
285304

286305
The following table lists the MCP-related commands available in the Command Palette (`kb(workbench.action.showCommands)`).

0 commit comments

Comments
 (0)