You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/copilot/chat/mcp-servers.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,9 @@ To add an MCP server to your workspace:
108
108
109
109
1. Alternatively, run the **MCP: Add Server** command from the Command Palette, choose the type of MCP server to add and provide the server information. Next, select **Workspace Settings** to create the `.vscode/mcp.json` file in your workspace if it doesn't already exist.
110
110
111
+
> [!IMPORTANT]
112
+
> Follow the naming conventions for the server, as specified in the [Configuration format](#configuration-format) section.
113
+
111
114
### Add an MCP server to your user settings
112
115
113
116
To configure an MCP server for all your workspaces, you can add the server configuration to your user settings. This allows you to reuse the same server configuration across multiple projects.
@@ -141,9 +144,14 @@ Enable autodiscovery with the `setting(chat.mcp.discovery.enabled)` setting.
141
144
142
145
Use the following JSON configuration format to define MCP servers.
143
146
144
-
- The `"servers": {}` field holds the list of MCP servers, and follows Claude Desktop's configuration format.
147
+
* The `"servers": {}` field holds the list of MCP servers, and follows Claude Desktop's configuration format.
148
+
149
+
Specify the server name as the key and provide the server configuration as the value. VS Code shows the server name in the MCP server list. Follow these naming conventions for the server name:
145
150
146
-
Specify the server name as the key and provide the server configuration as the value. VS Code shows the server name in the MCP server list.
151
+
* Use camelCase for the server name, such as "uiTesting".
152
+
* Avoid using whitespace or special characters.
153
+
* Use a unique name for each server to avoid conflicts.
154
+
* Use a descriptive name that reflects the server's functionality or brand, such as "github" or "database".
147
155
148
156
Provide the following fields in the server configuration. You can use [predefined variables](/docs/reference/variables-reference.md) in the server configuration, for example to refer to the workspace folder (`${workspaceFolder}`).
149
157
@@ -165,7 +173,7 @@ Use the following JSON configuration format to define MCP servers.
165
173
|`url`| URL of the server. |`"http://localhost:3000"`|
166
174
|`headers`| HTTP headers for the server. |`{"API_KEY": "${input:api-key}"}`|
167
175
168
-
- The `"inputs": []` field lets you define custom placeholders for configuration values, avoiding hardcoding sensitive information.
176
+
* The `"inputs": []` field lets you define custom placeholders for configuration values, avoiding hardcoding sensitive information.
169
177
170
178
VS Code prompts you for these values when the server starts for the first time, and securely stores them for subsequent use. To avoid showing the typed value, set the `password` field to `true`.
0 commit comments