Skip to content

Commit 107ac6f

Browse files
committed
MCP GA updates
1 parent 509c458 commit 107ac6f

File tree

2 files changed

+50
-19
lines changed

2 files changed

+50
-19
lines changed

docs/ide/mcp-servers.md

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: 'Use MCP servers (Preview)'
3-
description: Adding MCP servers in Visual Studio to extend GitHub Copilot agent capabilities, setting up mcp.json and managing tool permissions.
4-
ms.date: 6/18/2025
2+
title: 'Use MCP servers'
3+
description: Learn how to add MCP servers in Visual Studio to extend GitHub Copilot agent capabilities, set up mcp.json, and manage tool permissions.
4+
ms.date: 8/19/2025
55
ms.update-cycle: 180-days
66
ms.topic: get-started
77
author: anandmeg
@@ -11,29 +11,30 @@ ms.subservice: ai-tools
1111
ms.collection: ce-skilling-ai-copilot
1212
monikerRange: '>= vs-2022'
1313
---
14-
# Use MCP servers (Preview)
14+
# Use MCP servers
1515

1616
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.
1717

1818
## Prerequisites
19-
+ [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.
19+
+ [Visual Studio 2022 version 17.14](/visualstudio/releases/2022/release-history) or later.
20+
The latest servicing release of 17.14 is highly recommended as MCP features are actively being added with each release.
2021

2122
## How do MCP and Visual Studio extend GitHub Copilot's agent?
2223

23-
* MCP clients, such as Visual Studio connect to MCP servers and request actions on behalf of the AI model
24+
* MCP clients, such as Visual Studio connect to MCP servers and request actions on behalf of the AI model.
2425
* MCP servers provide one or more tools that expose specific functionalities through a well-defined interface.
25-
* The Model Context Protocol (MCP) defines the message format for communication between clients and servers, including tool discovery, invocation, and response handling
26+
* The Model Context Protocol (MCP) defines the message format for communication between clients and servers, including tool discovery, invocation, and response handling.
2627

2728
For example, a file system MCP server might provide tools for reading, writing, or searching files and directories. [GitHub's official MCP server](https://github.com/github/github-mcp-server) offers tools to list repositories, create pull requests, or manage issues. MCP servers can run locally on your machine or be hosted remotely, and Visual Studio supports both configurations.
2829

29-
By standardizing this interaction, MCP eliminates the need for custom integrations between each AI model and each tool. This allows you to extend your AI assistant's capabilities by simply adding new MCP servers to your workspace. Learn more about the Model Context Protocol specification.
30+
By standardizing this interaction, MCP eliminates the need for custom integrations between each AI model and each tool. This allows you to extend your AI assistant's capabilities by simply adding new MCP servers to your workspace. Learn more about the [Model Context Protocol specification](https://modelcontextprotocol.io/specification/draft).
3031

3132
## Configuration example with GitHub MCP server
3233

3334
The following walkthrough requires 17.14.9 or later.
3435

3536
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.
36-
2. Paste the following contents into the `.mcp.json` file
37+
1. Paste the following contents into the `.mcp.json` file
3738

3839
```json
3940
{
@@ -45,32 +46,54 @@ The following walkthrough requires 17.14.9 or later.
4546
}
4647
```
4748

48-
3. Save the file, then activate the CodeLens that appears over the new server to authenticate to this server using a GitHub account.
49+
1. Save the file, then activate the CodeLens that appears over the new server to authenticate to this server using a GitHub account.
4950

50-
5. In Visual Studio, click the `Ask` dropdown in the GitHub Copilot Chat window, and then select `Agent`.
51+
1. In Visual Studio, click the `Ask` dropdown in the GitHub Copilot Chat window, and then select `Agent`.
5152

5253
:::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":::
5354

54-
7. Select the tools you'd like to use, for example, `list_issues`
55+
1. Select the tools you'd like to use, for example, `list_issues`
5556

5657
:::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":::
5758

58-
8. Try a sample prompt: `list issues assigned to me on GitHub`
59-
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.
59+
1. Try a sample prompt: `list issues assigned to me on GitHub`
60+
1. 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.
6061

6162
:::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":::
6263

6364
## Supported MCP capabilities
6465

65-
Visual Studio supports local standard input/output (`stdio`), server-sent events (`sse`), and streamable HTTP (`http`) for MCP server transport. Currently of the three [primitives](https://modelcontextprotocol.io/specification/2025-03-26#features) (tools, prompts, resources), servers can only provide tools to Copilot's agent mode. The list and descriptions of tools can be updated dynamically using list changed events. Visual Studio provides servers with the current solution folders using `roots` [(spec)](https://modelcontextprotocol.io/docs/concepts/roots).
66+
Visual Studio supports the following MCP capabilities:
67+
68+
- MCP Server transport: Local standard input/output (`stdio`), server-sent events (`sse`), and streamable HTTP (`http`).
69+
- MCP features: Currently of the three [primitives](https://modelcontextprotocol.io/specification/2025-03-26#features) (tools, prompts, resources), servers can only provide tools to Copilot's agent mode. The list and descriptions of tools can be updated dynamically using list changed events.
70+
- Visual Studio provides servers with the current solution folders using `roots` [(spec)](https://modelcontextprotocol.io/docs/concepts/roots).
71+
- [MCP authorization](https://modelcontextprotocol.io/specification/draft/basic/authorization): Visual Studio supports authentication for remote servers with any OAuth provider.
6672

6773
## Finding MCP servers
6874

6975
MCP's [official server repository](https://github.com/modelcontextprotocol/servers) is a great starting point for reference, official, and community-contributed servers that showcase MCP's versatility. You can explore servers for various functionalities, such as file system operations, database interactions, and web services.
7076

7177
MCP is still a relatively new standard, and the ecosystem is rapidly evolving. As more developers adopt MCP, you can expect to see an increasing number of servers and tools available for integration with your projects.
7278

73-
## Adding an MCP server
79+
## Add an MCP server
80+
81+
You have multiple options to add an MCP server in Visual Studio:
82+
83+
### One-click install from the web
84+
85+
With the latest servicing release of 17.14, Visual Studio now supports direct installation of MCP Servers. You can click the **Install** button on an MCP server to automatically add it to your Visual Studio instance.
86+
87+
To add a one-click install button to your MCP server repo, or if you notice one missing from a public server repo, you can create one using the following protocol handler template:
88+
89+
### Add from chat view
90+
91+
To add an MCP server in Visual Studio:
92+
93+
1. Select the green plus (`+`) button in the tool picker in the chat window.
94+
1. Specify the server name, input method, any arguments, and URL for HTTP servers.
95+
96+
:::image type="content" source="media/vs-2022/mcp-servers/configure-server-visual-studio.png" alt-text="Screenshot that shows the agent tools confirmation options." lightbox="media/vs-2022/mcp-servers/configure-server-visual-studio.png":::
7497

7598
### Create a file to manage configuration of MCP servers
7699

@@ -94,7 +117,7 @@ MCP server configurations are read from the following directories, in the follow
94117

95118
Some of these locations require `.mcp.json` while others require `mcp.json`.
96119

97-
### MCP configuration format
120+
## MCP configuration format
98121

99122
You may define both **remote** (URL and credentials) and **local** (command-line invocation) servers.
100123

@@ -110,7 +133,7 @@ When the file is saved with valid syntax, GitHub Copilot's agent restarts and re
110133

111134
:::image type="content" source="media/vs-2022/mcp-servers/model-context-protocol-add-solution-item.png" alt-text="Screenshot that shows adding the MCP configuration file location to Solution Items." lightbox="media/vs-2022/mcp-servers/model-context-protocol-add-solution-item.png":::
112135

113-
### Tool Lifecycle
136+
### Tool lifecycle
114137

115138
As soon as a server is discovered or added:
116139

@@ -133,11 +156,19 @@ You can reset tool confirmation selections in **Tools** > **Options** > **GitHub
133156

134157
:::image type="content" source="media/vs-2022/copilot-agent-mode/copilot-agent-tool-config.png" alt-text="Screenshot that shows the tools configuration setting." lightbox="media/vs-2022/copilot-agent-mode/copilot-agent-tool-config.png":::
135158

159+
## Manage authorization
160+
161+
Visual Studio now supports authentication for remote servers with any OAuth provider, per [MCP authorization spec](https://modelcontextprotocol.io/specification/draft/basic/authorization), in addition to integration with the Visual Studio keychain.
162+
163+
To manage authentication for an MCP server:
164+
- Select **Manage Authentication** for that server from CodeLens in the `.mcp.json` file.
165+
- Provide credentials for the necessary OAuth provider for that server in the browser pop-up.
166+
136167
## Frequently asked questions
137168

138169
#### As an administrator, how do I control use of MCP servers in agent mode for Visual Studio users?
139170

140-
Agent mode and MCP usage in Visual Studio are governed by the **Editor preview features** flag in the GitHub Copilot dashboard for administrators.
171+
Agent mode and MCP usage in Visual Studio are governed by the GitHub policy settings in the GitHub Copilot dashboard for administrators.
141172
If the administrator turns off this setting, users under that subscription won’t be able to use agent mode or connect to MCP servers in Visual Studio.
142173

143174
For more information, see [managing policies and features for copilot in your enterprise](https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#editor-preview-features).
29.2 KB
Loading

0 commit comments

Comments
 (0)