Skip to content

Commit 03d3bd0

Browse files
committed
Add naming convention for MCP server names
1 parent c811f6d commit 03d3bd0

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

docs/copilot/chat/mcp-servers.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ To add an MCP server to your workspace:
108108

109109
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.
110110

111+
> [!IMPORTANT]
112+
> Follow the naming conventions for the server, as specified in the [Configuration format](#configuration-format) section.
113+
111114
### Add an MCP server to your user settings
112115

113116
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.
141144

142145
Use the following JSON configuration format to define MCP servers.
143146

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:
145150

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".
147155

148156
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}`).
149157

@@ -165,7 +173,7 @@ Use the following JSON configuration format to define MCP servers.
165173
| `url` | URL of the server. | `"http://localhost:3000"` |
166174
| `headers` | HTTP headers for the server. | `{"API_KEY": "${input:api-key}"}` |
167175

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.
169177

170178
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`.
171179

0 commit comments

Comments
 (0)