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: content/copilot/concepts/about-mcp.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,6 @@ topics:
10
10
contentType: concepts
11
11
---
12
12
13
-
{% data reusables.copilot.mcp-availability-and-preview-note %}
14
-
15
13
## Overview of Model Context Protocol (MCP)
16
14
17
15
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). MCP provides a standardized way to connect AI models to different data sources and tools, enabling them to work together more effectively.
Copy file name to clipboardExpand all lines: content/copilot/how-tos/provide-context/use-mcp/extend-copilot-chat-with-mcp.md
+71-2Lines changed: 71 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,6 @@ redirect_from:
17
17
contentType: how-tos
18
18
---
19
19
20
-
{% data reusables.copilot.mcp-availability-and-preview-note %}
21
-
22
20
## Introduction
23
21
24
22
The Model Context Protocol (MCP) is an open standard that defines how applications share context with large language models (LLMs). For an overview of MCP, see [AUTOTITLE](/copilot/concepts/about-mcp).
@@ -121,6 +119,77 @@ If you already have an MCP configuration in Claude Desktop, you can use that con
121
119
122
120
{% endvscode %}
123
121
122
+
{% visualstudio %}
123
+
124
+
## Prerequisites
125
+
126
+
***Access to {% data variables.product.prodname_copilot_short %}**. {% data reusables.copilot.subscription-prerequisite %}
127
+
***{% data variables.product.prodname_vs %} version 17.14 or later**. For more information on installing {% data variables.product.prodname_vs %}, see the [{% data variables.product.prodname_vs %} downloads page](https://visualstudio.microsoft.com/downloads/).
128
+
***Sign in to {% data variables.product.company_short %} from {% data variables.product.prodname_vs %}**.
129
+
* {% data reusables.copilot.mcp-policy-requirement %}
130
+
131
+
## Configuring MCP servers in {% data variables.product.prodname_vs %}
132
+
133
+
1. In the {% data variables.product.prodname_vs %} menu bar, click **View**, then click **{% data variables.copilot.copilot_chat %}**.
134
+
1. At the bottom of the chat panel, select **Agent** from the mode dropdown.
135
+
1. In the {% data variables.copilot.copilot_chat_short %} window, click the tools icon, then click the plus icon in the tool picker window.
136
+
1. In the "Configure MCP server" pop-up window, fill out the fields, including server ID, type, and any additional fields required for the specific MCP server configuration.
137
+
138
+
{% data variables.product.prodname_vs %} supports both remote and local servers. Remote servers, defined with a URL and credentials, are hosted externally for easier setup and sharing, while local servers, defined with command-line invocation, run on your local machine and can access local resources. See example configurations below, using the {% data variables.product.github %} MCP server as an example.
139
+
140
+
1. Click **Save**.
141
+
1. If you are using a remote server with OAuth authentication, in the `mcp.json` file, click **Auth** from the CodeLens above the server to authenticate to the server. A pop-up or new window will appear, allowing you to authenticate with your account. The server will only be able to access the scopes you approve, and that your organization policies allow.
142
+
1. In the {% data variables.copilot.copilot_chat_short %} window, click the tools icon. You should now see additional tools from the MCP server that you configured.
143
+
144
+
### Remote server configuration example with OAuth
145
+
146
+
1. For "Server ID", type `github`.
147
+
1. For "Type", select "HTTP/SSE" from the dropdown.
148
+
1. For "URL", type `https://api.githubcopilot.com/mcp/`.
149
+
1. After clicking **Save**, the configuration in the `mcp.json` file should look like this:
150
+
151
+
```json copy
152
+
{
153
+
"servers": {
154
+
"github": {
155
+
"url": "https://api.githubcopilot.com/mcp/"
156
+
}
157
+
}
158
+
}
159
+
```
160
+
161
+
1. In the `mcp.json` file, click **Auth** from the CodeLens above the server to authenticate to the server. A pop-up will come up allowing you to authenticate with your {% data variables.product.github %} account.
162
+
163
+
### Local server configuration example
164
+
165
+
1. For "Server ID", type `github`.
166
+
1. For "Type", select "stdio" from the dropdown.
167
+
1. For "Command (with optional arguments)", type `docker "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"`
168
+
1. Add an environment variable "GITHUB_PERSONAL_ACCESS_TOKEN" set to your {% data variables.product.pat_generic %}.
169
+
1. After clicking **Save**, the configuration in the `mcp.json` file should look like this:
For more information on configuring MCP servers in {% data variables.product.prodname_vs %}, see [Use MCP servers in {% data variables.product.prodname_vs %} (Preview)](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers?view=vs-2022) in the {% data variables.product.prodname_vs %} documentation.
0 commit comments