Connect to an MCP server in Visual Studio Code to access and use MCP tools.
Before you begin
Make sure that the:
About this task
You can use an MCP server in the following ways. Choose the approach that meets your
requirements.
- Install and start an MCP server to use its tools
- Configure an MCP endpoint in the MCP settings file
Procedure
-
Install and use an MCP server.
-
In Visual Studio Code, open the chat panel.
-
Click the Settings icon in the chat panel title bar.
-
Click MCP Servers.
The list of configured MCP servers is displayed.
-
Verify the server status and start the server if needed.
- If the status indicator is green, the server is running.
- If the status indicator is red, right-click the server and click Start Server.
-
Enter prompts in the chat panel to use the MCP tools that the server exposes.
Tip: If a Dynamic Client Registration not supported message appears when you start the server, click Cancel and start the server again.
-
Configure an MCP endpoint.
-
In Visual Studio Code, click .
-
Search for MCP server.
-
Click Edit in settings.json.
-
Add the following configuration in the settings.json file:
"mcp": {
"inputs": [ ],
"servers": {
"mcp_server_name": {
"url": "mcp_endpoint"
}
}
}
-
Save the settings file and restart Visual Studio Code.
-
Open the chat panel and run the /mcp command to verify that the MCP server is available.
-
Enter prompts in the chat panel to use the MCP tools exposed by the server.
What to do next
For more information, see Visual Studio Code documentation: MCP Servers.