Remote GitHub MCP server (#55768)
Co-authored-by: Jules Porter <jules-p@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Adam Holt <omgitsads@github.com> Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com> Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
This commit is contained in:
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"workbench.editor.enablePreview": false,
|
|
||||||
"workbench.editor.enablePreviewFromQuickOpen": false
|
|
||||||
}
|
|
||||||
BIN
assets/images/help/copilot/vsc-mcp-server-restart.png
Normal file
BIN
assets/images/help/copilot/vsc-mcp-server-restart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -7,6 +7,7 @@ versions:
|
|||||||
topics:
|
topics:
|
||||||
- Copilot
|
- Copilot
|
||||||
children:
|
children:
|
||||||
|
- /using-model-context-protocol
|
||||||
- /extending-the-capabilities-of-github-copilot-in-your-organization
|
- /extending-the-capabilities-of-github-copilot-in-your-organization
|
||||||
- /about-customizing-github-copilot-chat-responses
|
- /about-customizing-github-copilot-chat-responses
|
||||||
- /adding-personal-custom-instructions-for-github-copilot
|
- /adding-personal-custom-instructions-for-github-copilot
|
||||||
@@ -14,8 +15,6 @@ children:
|
|||||||
- /adding-organization-custom-instructions-for-github-copilot
|
- /adding-organization-custom-instructions-for-github-copilot
|
||||||
- /customizing-the-development-environment-for-copilot-coding-agent
|
- /customizing-the-development-environment-for-copilot-coding-agent
|
||||||
- /customizing-or-disabling-the-firewall-for-copilot-coding-agent
|
- /customizing-or-disabling-the-firewall-for-copilot-coding-agent
|
||||||
- /extending-copilot-chat-with-mcp
|
|
||||||
- /extending-copilot-coding-agent-with-mcp
|
|
||||||
- /managing-copilot-knowledge-bases
|
- /managing-copilot-knowledge-bases
|
||||||
- /creating-a-custom-model-for-github-copilot
|
- /creating-a-custom-model-for-github-copilot
|
||||||
redirect_from:
|
redirect_from:
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ versions:
|
|||||||
topics:
|
topics:
|
||||||
- Copilot
|
- Copilot
|
||||||
type: how_to
|
type: how_to
|
||||||
|
redirect_from:
|
||||||
|
- /copilot/customizing-copilot/extending-copilot-chat-with-mcp
|
||||||
---
|
---
|
||||||
|
|
||||||
>[!NOTE]
|
>[!NOTE]
|
||||||
@@ -36,8 +38,7 @@ For information on some of the other currently available MCP servers, see [the M
|
|||||||
|
|
||||||
To configure MCP servers in {% data variables.product.prodname_vscode %}, you need to set up a configuration script that specifies the details of the MCP servers you want to use. You can configure MCP servers for either:
|
To configure MCP servers in {% data variables.product.prodname_vscode %}, you need to set up a configuration script that specifies the details of the MCP servers you want to use. You can configure MCP servers for either:
|
||||||
|
|
||||||
* **A specific repository**. This will share MCP servers with anyone who opens the project in {% data variables.product.prodname_vscode %}. To do this, create a `.vscode/mcp.json` file in the root of your repository.
|
{% data reusables.copilot.mcp.mcp-configuration-location %}
|
||||||
* **Your personal instance of {% data variables.product.prodname_vscode %}**. You will be the only person who has access to configured MCP servers. To do this, add the configuration to your `settings.json` file in {% data variables.product.prodname_vscode %}.
|
|
||||||
|
|
||||||
>[!NOTE] We recommend you use only one location per server. Adding the same server to both locations may cause conflicts and unexpected behavior.
|
>[!NOTE] We recommend you use only one location per server. Adding the same server to both locations may cause conflicts and unexpected behavior.
|
||||||
|
|
||||||
@@ -45,6 +46,8 @@ The steps below show how to configure the Fetch MCP server in your `.vscode/mcp.
|
|||||||
|
|
||||||
You can use the same steps to configure MCP servers in your personal {% data variables.product.prodname_vscode %} settings. Details on how to configure other MCP servers are available in the [MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
|
You can use the same steps to configure MCP servers in your personal {% data variables.product.prodname_vscode %} settings. Details on how to configure other MCP servers are available in the [MCP servers repository](https://github.com/modelcontextprotocol/servers/tree/main).
|
||||||
|
|
||||||
|
For information on configuring the {% data variables.product.github %} MCP server, see [AUTOTITLE](/copilot/customizing-copilot/using-model-context-protocol/using-the-github-mcp-server).
|
||||||
|
|
||||||
1. Add the following configuration to your `.vscode/mcp.json` file:
|
1. Add the following configuration to your `.vscode/mcp.json` file:
|
||||||
|
|
||||||
```json copy
|
```json copy
|
||||||
@@ -79,14 +82,12 @@ You can use the same steps to configure MCP servers in your personal {% data var
|
|||||||
|
|
||||||
For more information on configuring MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %} (Preview)](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation.
|
For more information on configuring MCP servers in {% data variables.product.prodname_vscode %}, see [Use MCP servers in {% data variables.product.prodname_vscode %} (Preview)](https://aka.ms/vscode-add-mcp) in the {% data variables.product.prodname_vscode %} documentation.
|
||||||
|
|
||||||
>[!IMPORTANT] Beginning April 4, 2025, the {% data variables.product.github %} MCP server, and installation instructions, will be publicly available in the [github-mcp-server](https://github.com/github/github-mcp-server) repository.
|
|
||||||
|
|
||||||
## Using MCP servers in {% data variables.copilot.copilot_chat_short %}
|
## Using MCP servers in {% data variables.copilot.copilot_chat_short %}
|
||||||
|
|
||||||
Once you have configured your MCP servers, you can use them in {% data variables.copilot.copilot_chat_short %} to access a wide range of tools and services. In the example below, we will use the Fetch MCP server to fetch details about a web page.
|
Once you have configured your MCP servers, you can use them in {% data variables.copilot.copilot_chat_short %} to access a wide range of tools and services. In the example below, we will use the Fetch MCP server to fetch details about a web page.
|
||||||
|
|
||||||
1. Open {% data variables.copilot.copilot_chat_short %} by clicking the {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} icon in the title bar of {% data variables.product.prodname_vscode %}.
|
{% data reusables.copilot.open-chat-vs-code %}
|
||||||
1. In the {% data variables.copilot.copilot_chat_short %} box, select **Agent** from the popup menu.
|
{% data reusables.copilot.select-agent %}
|
||||||
1. In the file with the MCP configuration, check that the MCP server is running. If it is not running, click the "Start" button to start the MCP server.
|
1. In the file with the MCP configuration, check that the MCP server is running. If it is not running, click the "Start" button to start the MCP server.
|
||||||
|
|
||||||

|

|
||||||
@@ -200,3 +201,4 @@ For more information on creating and configuring your own MCP servers, see [the
|
|||||||
## Further reading
|
## Further reading
|
||||||
|
|
||||||
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)
|
* [AUTOTITLE](/copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp)
|
||||||
|
* [AUTOTITLE](/copilot/customizing-copilot/using-model-context-protocol/using-the-github-mcp-server)
|
||||||
@@ -9,6 +9,7 @@ topics:
|
|||||||
- Copilot
|
- Copilot
|
||||||
type: how_to
|
type: how_to
|
||||||
redirect_from:
|
redirect_from:
|
||||||
|
- /copilot/customizing-copilot/extending-copilot-coding-agent-with-mcp
|
||||||
- /early-access/copilot/coding-agent/extending-copilot-coding-agent-with-model-context-protocol
|
- /early-access/copilot/coding-agent/extending-copilot-coding-agent-with-model-context-protocol
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -276,6 +277,8 @@ If you want to allow {% data variables.product.prodname_copilot_short %} to acce
|
|||||||
1. Under "Environment secrets", click **Add environment secret**.
|
1. Under "Environment secrets", click **Add environment secret**.
|
||||||
1. Call the secret `COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN`, enter your {% data variables.product.pat_generic %} in the "Value" field, then click **Add secret**.
|
1. Call the secret `COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN`, enter your {% data variables.product.pat_generic %} in the "Value" field, then click **Add secret**.
|
||||||
|
|
||||||
|
For information on using the {% data variables.product.github %} MCP server in other environments, see [AUTOTITLE](/copilot/customizing-copilot/using-model-context-protocol/using-the-github-mcp-server).
|
||||||
|
|
||||||
## Best practices
|
## Best practices
|
||||||
|
|
||||||
* Enabling third-party MCP servers for use may impact the performance of the agent and the quality of the outputs. Review the third-party MCP server thoroughly and ensure that it meets your organization’s requirements.
|
* Enabling third-party MCP servers for use may impact the performance of the agent and the quality of the outputs. Review the third-party MCP server thoroughly and ensure that it meets your organization’s requirements.
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
title: Using Model Context Protocol
|
||||||
|
shortTitle: Use MCP
|
||||||
|
intro: 'Model Context Protocol (MCP) is a protocol that allows you to extend the capabilities of {% data variables.product.prodname_copilot %} by integrating it with other systems.'
|
||||||
|
versions:
|
||||||
|
feature: copilot
|
||||||
|
topics:
|
||||||
|
- Copilot
|
||||||
|
children:
|
||||||
|
- /extending-copilot-chat-with-mcp
|
||||||
|
- /using-the-github-mcp-server
|
||||||
|
- /extending-copilot-coding-agent-with-mcp
|
||||||
|
---
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
---
|
||||||
|
title: Using the GitHub MCP Server
|
||||||
|
intro: "Learn how to use the GitHub Model Context Protocol (MCP) server to extend {% data variables.copilot.copilot_chat_short %}."
|
||||||
|
shortTitle: Use the GitHub MCP Server
|
||||||
|
versions:
|
||||||
|
feature: copilot
|
||||||
|
topics:
|
||||||
|
- Copilot
|
||||||
|
type: how_to
|
||||||
|
---
|
||||||
|
|
||||||
|
>[!NOTE]
|
||||||
|
> The {% data variables.product.github %} MCP server is currently in {% data variables.release-phases.public_preview %} and subject to change.
|
||||||
|
|
||||||
|
{% data reusables.copilot.mcp.about-github-mcp-server %}
|
||||||
|
|
||||||
|
## Setting up the {% data variables.product.github %} MCP server in {% data variables.product.prodname_vscode %}
|
||||||
|
|
||||||
|
The instructions below guide you through setting up the {% data variables.product.github %} MCP server in {% data variables.product.prodname_vscode %}. Other MCP-compatible editors may have similar steps, but the exact process may vary.
|
||||||
|
|
||||||
|
You can choose to set up the {% data variables.product.github %} MCP server either remotely or locally, depending on your needs and preferences. You can also configure your {% data variables.product.github %} MCP server for either:
|
||||||
|
|
||||||
|
{% data reusables.copilot.mcp.mcp-configuration-location %}
|
||||||
|
|
||||||
|
The remote {% data variables.product.github %} MCP server uses one-click OAuth authentication by default, but you can also manually configure it to use a {% data variables.product.pat_generic %} (PAT) for authentication. If you use OAuth, the MCP server will have the same access as your personal account. If you use a PAT, the MCP server will have access to the scopes granted by the PAT.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> If you are an {% data variables.product.prodname_emu %} with PAT restrictions, you won't be able to use PAT authentication. If you have OAuth access policy restrictions, you will need the OAuth apps for each client to be enabled (except {% data variables.product.prodname_vscode %} and {% data variables.product.prodname_vs %}).
|
||||||
|
|
||||||
|
* [Remote MCP server configuration with OAuth](#remote-mcp-server-configuration-with-oauth)
|
||||||
|
* [Remote MCP server configuration with PAT](#remote-mcp-server-configuration-with-pat)
|
||||||
|
* [Local MCP server setup](#local-mcp-server-setup)
|
||||||
|
|
||||||
|
### Remote MCP server configuration with OAuth
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The remote {% data variables.product.github %} MCP server is not available to {% data variables.product.prodname_ghe_server %} users. If you are using {% data variables.product.prodname_ghe_server %}, you can install the {% data variables.product.github %} MCP server locally. See [Local MCP server setup](#local-mcp-server-setup).
|
||||||
|
|
||||||
|
You do not need to create a PAT or install any additional software to use the remote {% data variables.product.github %} MCP server with OAuth. You can set it up directly in {% data variables.product.prodname_vscode %}. You can also install individual toolsets, either in read-only mode or with full read/write access, allowing you to tailor the server's capabilities to your specific needs. For more information, see [Tool configuration](#tool-configuration).
|
||||||
|
|
||||||
|
1. In {% data variables.product.prodname_vscode %}, open the command palette by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux) / <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Mac).
|
||||||
|
1. Type: `mcp: add server` and then press **Enter**.
|
||||||
|
1. From the list, select **HTTP (HTTP or Server-Sent Events)**.
|
||||||
|
1. In the **Server URL** field, enter `https://api.githubcopilot.com/mcp/`, and press **Enter**.
|
||||||
|
1. Under **Enter Server ID**, press **Enter** to use the default server ID, or enter a custom server ID.
|
||||||
|
1. Under **Choose where to save the configuration**, select where you want to save the MCP server configuration.
|
||||||
|
|
||||||
|
* {% data variables.product.prodname_vscode %} will open and add the configuration to the selected file in the editor, or create a new file if it doesn't exist.
|
||||||
|
|
||||||
|
1. In the **{% data variables.product.prodname_vscode %}** popup, to authorize the MCP server with OAuth, click **Allow** and select your personal account from the list.
|
||||||
|
|
||||||
|
### Remote MCP server configuration with PAT
|
||||||
|
|
||||||
|
To configure the remote {% data variables.product.github %} MCP server with a PAT, ensure you have created a PAT with the necessary scopes for the access you want to grant to the MCP server. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
|
||||||
|
|
||||||
|
You will need to manually configure the MCP server in {% data variables.product.prodname_vscode %} to use the PAT for authorization.
|
||||||
|
|
||||||
|
1. In {% data variables.product.prodname_vscode %}, open the command palette by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux) / <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Mac).
|
||||||
|
1. Type: `mcp: add server` and then press **Enter**.
|
||||||
|
1. From the list, select **HTTP (HTTP or Server-Sent Events)**.
|
||||||
|
1. In the **Server URL** field, enter `https://api.githubcopilot.com/mcp/`, and press **Enter**.
|
||||||
|
1. Under **Enter Server ID**, press **Enter** to use the default server ID, or enter a custom server ID.
|
||||||
|
1. Under **Choose where to save the configuration**, select where you want to save the MCP server configuration.
|
||||||
|
|
||||||
|
* {% data variables.product.prodname_vscode %} will open and add the configuration to the selected file in the editor, or create a new file if it doesn't exist.
|
||||||
|
|
||||||
|
1. In the **{% data variables.product.prodname_vscode %}** popup, to decline OAuth authorization, click **Cancel**.
|
||||||
|
1. You will need to manually edit the configuration file to use a PAT. In the configuration file, at the end of the `url` line, add the following:
|
||||||
|
|
||||||
|
```json copy
|
||||||
|
,
|
||||||
|
"headers": {
|
||||||
|
"Authorization": "Bearer ${input:github_token}"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"id": "github_token",
|
||||||
|
"type": "promptString",
|
||||||
|
"description": "{% data variables.product.github %} {% data variables.product.pat_generic_title_case %}",
|
||||||
|
"password": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. A "Restart" button will appear in the file. Click "Restart" to restart the MCP server with the new configuration.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. In the command palette, you will see a prompt to enter your GitHub token. Enter the PAT you created earlier, and press **Enter**.
|
||||||
|
* The MCP server will now be configured to use the PAT for authorization.
|
||||||
|
|
||||||
|
### Local MCP server setup
|
||||||
|
|
||||||
|
>[!NOTE]
|
||||||
|
> If you are a {% data variables.product.prodname_ghe_server %} user, and your enterprise has PAT restrictions enabled, you can only use API endpoints for scopes that are allowed by your enterprise's PAT policy. If all API endpoints are restricted, you will not be able to use the MCP server. If you are unsure about your enterprise's PAT policy, contact your enterprise administrator for more information.
|
||||||
|
|
||||||
|
Using the {% data variables.product.github %} MCP server locally requires you to have Docker installed and running on your machine. Additionally, you can only authenticate with a PAT, as OAuth is not supported for local MCP servers.
|
||||||
|
|
||||||
|
1. Ensure you have Docker installed and running on your machine. See [Docker installation instructions](https://docs.docker.com/get-docker/).
|
||||||
|
1. Create a PAT with (at least) the `read:packages` and `repo` scopes. For more information, see [AUTOTITLE](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
|
||||||
|
1. Decide whether you want to configure the MCP server for a specific repository or for your personal instance of {% data variables.product.prodname_vscode %}.
|
||||||
|
|
||||||
|
* If you are using a specific repository, open the `.vscode/mcp.json` file in {% data variables.product.prodname_vscode %}, and add the following configuration:
|
||||||
|
|
||||||
|
```json copy
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"type": "promptString",
|
||||||
|
"id": "github_token",
|
||||||
|
"description": "{% data variables.product.github %} {% data variables.product.pat_generic_title_case %}",
|
||||||
|
"password": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"servers": {
|
||||||
|
"github": {
|
||||||
|
"command": "docker",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"-i",
|
||||||
|
"--rm",
|
||||||
|
"-e",
|
||||||
|
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
||||||
|
"ghcr.io/github/github-mcp-server"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* If you are using your personal instance of {% data variables.product.prodname_vscode %}, open your `settings.json` file in {% data variables.product.prodname_vscode %}:
|
||||||
|
* Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux) or <kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (macOS).
|
||||||
|
* Type **Preferences: Open Settings (JSON)** and select it.
|
||||||
|
* Add the following configuration:
|
||||||
|
|
||||||
|
```json copy
|
||||||
|
{
|
||||||
|
"mcp": {
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"type": "promptString",
|
||||||
|
"id": "github_token",
|
||||||
|
"description": "{% data variables.product.github %} {% data variables.product.pat_generic_title_case %}",
|
||||||
|
"password": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"servers": {
|
||||||
|
"github": {
|
||||||
|
"command": "docker",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"-i",
|
||||||
|
"--rm",
|
||||||
|
"-e",
|
||||||
|
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
||||||
|
"ghcr.io/github/github-mcp-server"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Save the file.
|
||||||
|
1. In the command palette, you will see a prompt to enter your {% data variables.product.github %} token. Enter the PAT you created earlier, and press **Enter**.
|
||||||
|
* The MCP server will now be configured to run locally with the PAT for authorization.
|
||||||
|
|
||||||
|
## Tool configuration
|
||||||
|
|
||||||
|
The {% data variables.product.github %} MCP server supports installing individual toolsets, either in read-only mode or with full read/write access, allowing you to tailor the server's capabilities to your specific needs. For one-click installation options of each toolset, see the [GitHub MCP server repository](https://github.com/github/github-mcp-server/blob/main/docs/remote-server.md).
|
||||||
|
|
||||||
|
## Using the {% data variables.product.github %} MCP server in {% data variables.product.prodname_vscode %}
|
||||||
|
|
||||||
|
The {% data variables.product.github %} MCP server enables you to perform a wide range of actions on {% data variables.product.github %}, via {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}.
|
||||||
|
|
||||||
|
{% data reusables.copilot.open-chat-vs-code %}
|
||||||
|
{% data reusables.copilot.select-agent %}
|
||||||
|
1. To see the available actions, in the {% data variables.copilot.copilot_chat_short %} box, click the **Select tools** icon.
|
||||||
|
* In the **Tools** dropdown, under **MCP Server:{% data variables.product.github %}**, you will see a list of available actions.
|
||||||
|
1. In the {% data variables.copilot.copilot_chat_short %} box, type a command or question related to the action you want to perform, and press **Enter**.
|
||||||
|
* For example, you can ask the {% data variables.product.github %} MCP server to create a new issue, list pull requests, or retrieve repository information.
|
||||||
|
1. The {% data variables.product.github %} MCP server will process your request and provide a response in the chat interface.
|
||||||
|
* In the {% data variables.copilot.copilot_chat_short %} box, you may be asked to give additional permissions or provide more information to complete the action.
|
||||||
|
1. Follow the prompts to complete the action.
|
||||||
|
|
||||||
|
{% data reusables.copilot.mcp.troubleshooting-mcp-server %}
|
||||||
|
|
||||||
|
## Further reading
|
||||||
|
|
||||||
|
* [AUTOTITLE](/copilot/customizing-copilot/using-model-context-protocol/extending-copilot-coding-agent-with-mcp)
|
||||||
30
data/reusables/copilot/mcp/about-github-mcp-server.md
Normal file
30
data/reusables/copilot/mcp/about-github-mcp-server.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
## About the {% data variables.product.github %} MCP server
|
||||||
|
|
||||||
|
The {% data variables.product.github %} MCP server is a Model Context Protocol (MCP) server provided and maintained by {% data variables.product.github %}. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
|
||||||
|
|
||||||
|
For more information on MCP, see [the official MCP documentation](https://modelcontextprotocol.io/introduction).
|
||||||
|
|
||||||
|
You can access the {% data variables.product.github %} MCP server remotely through {% data variables.product.prodname_vscode %}, or other editors that support remote MCP; or you can run it locally in any MCP-compatible editor, allowing you to choose between the convenience of a hosted solution or the customizability of a self-hosted setup.
|
||||||
|
|
||||||
|
If you want to utilize the remote {% data variables.product.github %} MCP server, you can do so in a few steps, without any local setup. This is particularly useful for users who want to quickly leverage {% data variables.product.github %}’s AI capabilities without the overhead of managing a local MCP server.
|
||||||
|
|
||||||
|
Running the {% data variables.product.github %} MCP server locally requires a bit more setup, but it allows for greater customization and control over your AI interactions.
|
||||||
|
|
||||||
|
{% data variables.product.github %} MCP server can be used to:
|
||||||
|
|
||||||
|
* Automate and streamline code-related tasks.
|
||||||
|
* Connect third-party tools (like Cursor, Windsurf, or future integrations) to leverage {% data variables.product.github %}’s context and AI capabilities.
|
||||||
|
* Enable cloud-based workflows that work from any device, without local setup.
|
||||||
|
|
||||||
|
## Availability
|
||||||
|
|
||||||
|
There is currently broad support for local MCP servers in clients such as {% data variables.product.prodname_vscode %}, JetBrains IDEs, XCode, and others.
|
||||||
|
|
||||||
|
Support for remote MCP servers is growing, with editors like {% data variables.product.prodname_vscode %} (with OAuth or PAT), {% data variables.product.prodname_vs %} (PAT only), Windsurf (PAT only), and Cursor (PAT only) already providing this functionality.
|
||||||
|
|
||||||
|
To find out if your preferred editor supports remote MCP servers, check the documentation for your specific editor.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
* A {% data variables.product.github %} account.
|
||||||
|
* {% data variables.product.prodname_vscode %}, or another MCP-compatible editor.
|
||||||
2
data/reusables/copilot/mcp/mcp-configuration-location.md
Normal file
2
data/reusables/copilot/mcp/mcp-configuration-location.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
* **A specific repository**. This enables you to share MCP servers with anyone who opens the project in {% data variables.product.prodname_vscode %}. To do this, create a `.vscode/mcp.json` file in the root of your repository.
|
||||||
|
* **Your personal instance of {% data variables.product.prodname_vscode %}**. You will be the only person who has access to configured MCP servers. To do this, add the configuration to your `settings.json` file in {% data variables.product.prodname_vscode %}. MCP servers configured this way will be available in all workspaces.
|
||||||
28
data/reusables/copilot/mcp/troubleshooting-mcp-server.md
Normal file
28
data/reusables/copilot/mcp/troubleshooting-mcp-server.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
If you encounter issues while using the {% data variables.product.github %} MCP server, there are a few common troubleshooting steps you can take.
|
||||||
|
|
||||||
|
### Authorization issues
|
||||||
|
|
||||||
|
If you are having trouble authorizing the MCP server, ensure that:
|
||||||
|
|
||||||
|
* You are signed in to {% data variables.product.github %} in your choice of IDE.
|
||||||
|
|
||||||
|
If you are authenticating with a {% data variables.product.pat_generic %} (PAT), ensure that:
|
||||||
|
* Your GitHub PAT is valid and has the necessary scopes for the actions you want to perform.
|
||||||
|
* You have entered the correct PAT when prompted in {% data variables.product.prodname_vscode %}.
|
||||||
|
|
||||||
|
### Copilot agent mode problems
|
||||||
|
|
||||||
|
If you are having trouble with the {% data variables.copilot.copilot_chat_short %} agent mode, ensure that:
|
||||||
|
* You have selected the correct agent in the {% data variables.copilot.copilot_chat_short %} box.
|
||||||
|
* You have configured the MCP server correctly in {% data variables.product.prodname_vscode %}.
|
||||||
|
* You have the necessary permissions to perform the actions you are trying to execute.
|
||||||
|
|
||||||
|
### General tips
|
||||||
|
|
||||||
|
If you are experiencing other issues with the {% data variables.product.github %} MCP server, here are some general tips to help you troubleshoot:
|
||||||
|
|
||||||
|
* Check the output logs of the MCP server for any error messages.
|
||||||
|
* If you are running the MCP server locally, ensure that your local environment is set up correctly for running Docker containers.
|
||||||
|
* Try restarting the MCP server or your IDE.
|
||||||
@@ -1 +1 @@
|
|||||||
1. To open the chat view, click the chat icon in the activity bar or press <kbd>Control</kbd>+<kbd>Command</kbd>+<kbd>i</kbd> (Mac) / <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>i</kbd> (Windows/Linux).
|
1. Open {% data variables.copilot.copilot_chat_short %} by clicking the {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} icon in the title bar of {% data variables.product.prodname_vscode %}.
|
||||||
|
|||||||
1
data/reusables/copilot/select-agent.md
Normal file
1
data/reusables/copilot/select-agent.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1. In the {% data variables.copilot.copilot_chat_short %} box, select **Agent** from the popup menu.
|
||||||
Reference in New Issue
Block a user