Skip to content

Commit d9e8081

Browse files
authored
Enhance MCP server setup instructions in documentation
Updated prerequisites and configuration steps for MCP servers in Visual Studio. Added recommendations for the latest servicing release and clarified file creation instructions.
1 parent 2fc24d2 commit d9e8081

File tree

1 file changed

+11
-32
lines changed

1 file changed

+11
-32
lines changed

docs/ide/mcp-servers.md

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ monikerRange: '>= vs-2022'
1515
Model Context Protocol (MCP) is an open standard that enables AI models to interact with external tools and services through a unified interface. In Visual Studio, MCP support enhances GitHub Copilot's agent mode by allowing you to connect any MCP-compatible server to your agentic coding workflow. This article guides you through setting up MCP servers and using tools with agent mode in Visual Studio.
1616

1717
## Prerequisites
18-
+ [Visual Studio 2022 version 17.14](/visualstudio/releases/2022/release-history) or later.
18+
+ [Visual Studio 2022 version 17.14](/visualstudio/releases/2022/release-history) or later. The latest servicing release of 17.14 is highly recommended as MCP features are actively being added with each release.
1919

2020
## How do MCP and Visual Studio extend GitHub Copilot's agent?
2121

@@ -29,54 +29,33 @@ By standardizing this interaction, MCP eliminates the need for custom integratio
2929

3030
## Configuration example with GitHub MCP server
3131

32-
1. Create a new file: `<SOLUTIONDIR>\.mcp.json`. Using Visual Studio to edit this file is recommended so its JSON schema is automatically applied.
32+
The following walkthrough requires 17.14.9 or later.
33+
34+
1. Create a new file: `<SOLUTIONDIR>\.mcp.json` or `%USERPROFILE%\.mcp.json`. Using Visual Studio to edit this file is recommended so its JSON schema is automatically applied.
3335
2. Paste the following contents into the `.mcp.json` file
3436

3537
```json
3638
{
37-
"inputs": [
38-
{
39-
"id": "github_pat",
40-
"description": "GitHub personal access token",
41-
"type": "promptString",
42-
"password": true
43-
}
44-
],
4539
"servers": {
4640
"github": {
47-
"type": "stdio",
48-
"command": "docker",
49-
"args": [
50-
"run",
51-
"-i",
52-
"--rm",
53-
"-e",
54-
"GITHUB_PERSONAL_ACCESS_TOKEN",
55-
"ghcr.io/github/github-mcp-server"
56-
],
57-
"env": {
58-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_pat}"
59-
}
41+
"url": "https://api.githubcopilot.com/mcp/"
6042
}
6143
}
6244
}
6345
```
6446

65-
3. Get a Personal Access Token for your [GitHub Account](https://github.com/settings/personal-access-tokens)
66-
4. In Visual Studio, click the `Ask` dropdown in the GitHub Copilot Chat window, and then select `Agent`.
47+
3. Save the file, then activate the CodeLens that appears over the new server to authenticate to this server using a GitHub account.
6748

68-
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png" alt-text="Screenshot that shows Copilot agent mode selector." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png":::
49+
5. In Visual Studio, click the `Ask` dropdown in the GitHub Copilot Chat window, and then select `Agent`.
6950

70-
5. When prompted, paste your personal access token into the dialog.
71-
72-
:::image type="content" source="media/vs-2022/mcp-servers/model-context-protocol-personal-access-token.png" alt-text="Screenshot that shows entering the personal access token." lightbox="media/vs-2022/mcp-servers/model-context-protocol-personal-access-token.png":::
51+
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png" alt-text="Screenshot that shows Copilot agent mode selector." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-dropdown.png":::
7352

74-
6. Select the tools you'd like to use, for example, `list_issues`
53+
7. Select the tools you'd like to use, for example, `list_issues`
7554

7655
:::image type="content" source="media/vs-2022/mcp-servers/model-context-protocol-github-tools-list.png" alt-text="Screenshot that shows MCP GitHub tools." lightbox="media/vs-2022/mcp-servers/model-context-protocol-github-tools-list.png":::
7756

78-
7. Try a sample prompt: `list issues assigned to me on GitHub`
79-
8. Copilot asks for permission to use a tool made available to it by the MCP server, select **Allow** with the scope you wish to proceed with.
57+
8. Try a sample prompt: `list issues assigned to me on GitHub`
58+
9. Copilot asks for permission to use a tool made available to it by the MCP server, select **Allow** with the scope you wish to proceed with.
8059

8160
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-tool-approval.png" alt-text="Screenshot that shows the agent tools confirmation options." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-tool-approval.png":::
8261

0 commit comments

Comments
 (0)