The GitHub MCP server is available to all GitHub users regardless of plan type. However, specific tools within the MCP server inherit the same access requirements as their corresponding GitHub features. If a feature requires a paid GitHub or Copilot license, the equivalent MCP tool will require the same subscription. For example, tools that interact with Copilot Coding Agent require a paid Copilot license.
The GitHub MCP server is a Model Context Protocol (MCP) server provided and maintained by GitHub. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
Visual Studio Code, or another MCP-compatible editor.
If you are a member of an organization or enterprise with a Copilot Business or Copilot Enterprise plan, the "MCP servers in Copilot" policy must be enabled in order to use MCP with Copilot.
The instructions below guide you through setting up the GitHub MCP server in Visual Studio Code. Other MCP-compatible editors may have similar steps, but the exact process may vary.
You can choose to set up the GitHub MCP server either remotely or locally, depending on your needs and preferences. You can also configure your GitHub MCP server for either:
A specific repository. This enables you to share MCP servers with anyone who opens the project in Visual Studio Code. To do this, create a .vscode/mcp.json file in the root of your repository.
Your personal instance of Visual Studio Code. 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 Visual Studio Code. MCP servers configured this way will be available in all workspaces.
The remote GitHub MCP server uses one-click OAuth authentication by default, but you can also manually configure it to use a personal access token (PAT) for authentication. If you use OAuth, the MCP server can only access the scopes you approve during sign-in. In organization-owned contexts, access may also be limited by admin policies that control which scopes and apps are permitted. If you use a PAT, the MCP server will have access to the scopes granted by the PAT, which is also subject to any PAT restrictions configured by the organization.
If you are an Enterprise Managed User, then PAT is disabled by default, unless enabled by an enterprise administrator. If PAT is disabled, you won't be able to use PAT authentication. If you have OAuth access policy restrictions, you will need the OAuth App for each client (MCP host application) to be enabled (except Visual Studio Code and Visual Studio since they are first-party Microsoft IDEs with native Copilot integration).
The remote GitHub MCP server is not available to GitHub Enterprise Server users. If you are using GitHub Enterprise Server, you can install the GitHub MCP server locally. See Local MCP server setup.
You do not need to create a PAT or install any additional software to use the remote GitHub MCP server with OAuth. You can set it up directly in Visual Studio Code. 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.
In Visual Studio Code, open the command palette by pressing Ctrl+Shift+P (Windows/Linux) / Command+Shift+P (Mac).
Type: mcp: add server and then press Enter.
From the list, select HTTP (HTTP or Server-Sent Events).
In the Server URL field, enter https://api.githubcopilot.com/mcp/, and press Enter.
Under Enter Server ID, press Enter to use the default server ID, or enter a custom server ID.
Under Choose where to save the configuration, select where you want to save the MCP server configuration.
Visual Studio Code will open and add the configuration to the selected file in the editor, or create a new file if it doesn't exist.
In the Visual Studio Code popup, to authorize the MCP server with OAuth, click Allow and select your personal account from the list.
To configure the remote 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 Managing your personal access tokens.
You will need to manually configure the MCP server in Visual Studio Code to use the PAT for authorization.
In Visual Studio Code, open the command palette by pressing Ctrl+Shift+P (Windows/Linux) / Command+Shift+P (Mac).
Type: mcp: add server and then press Enter.
From the list, select HTTP (HTTP or Server-Sent Events).
In the Server URL field, enter https://api.githubcopilot.com/mcp/, and press Enter.
Under Enter Server ID, press Enter to use the default server ID, or enter a custom server ID.
Under Choose where to save the configuration, select where you want to save the MCP server configuration.
Visual Studio Code will open and add the configuration to the selected file in the editor, or create a new file if it doesn't exist.
In the Visual Studio Code popup, to decline OAuth authorization, click Cancel.
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:
,"headers":{"Authorization":"Bearer ${input:github_token}"}},},"inputs":[{"id":"github_token","type":"promptString","description":"GitHub Personal Access Token","password":true}]}
A "Restart" button will appear in the file. Click "Restart" to restart the MCP server with the new configuration.
Screenshot of the MCP server restart button in the configuration file. The "Restart" button is outlined in dark orange.
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.
If you are a GitHub Enterprise 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 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.
{"inputs":[{"type":"promptString","id":"github_token","description":"GitHub Personal Access Token","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 Visual Studio Code, open your settings.json file in Visual Studio Code:
Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
Type Preferences: Open Settings (JSON) and select it.
{"mcp":{"inputs":[{"type":"promptString","id":"github_token","description":"GitHub Personal Access Token","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}"}}}}}
Save the file.
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 run locally with the PAT for authorization.
The 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.
If you are using the GitHub MCP server and push protection blocks a secret that you believe is safe to expose, you may be able to bypass the block by specifying a reason for allowing the secret. See Working with push protection and the GitHub MCP server.
The GitHub MCP server is a Model Context Protocol (MCP) server provided and maintained by GitHub. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
Visual Studio version 17.14 or later. For more information on installing Visual Studio, see the Visual Studio downloads page.
Sign in to GitHub from Visual Studio.
If you are a member of an organization or enterprise with a Copilot Business or Copilot Enterprise plan, the "MCP servers in Copilot" policy must be enabled in order to use MCP with Copilot.
The instructions below guide you through setting up the GitHub MCP server in Visual Studio. Other MCP-compatible editors may have similar steps, but the exact process may vary.
The remote GitHub MCP server uses one-click OAuth authentication by default, but you can also manually configure it to use a personal access token (PAT) for authentication. If you use OAuth, the MCP server can only access the scopes you approve during sign-in. In organization-owned contexts, access may also be limited by admin policies that control which scopes and apps are permitted. If you use a PAT, the MCP server will have access to the scopes granted by the PAT, which is also subject to any PAT restrictions configured by the organization.
Note
If you are an Enterprise Managed User, then PAT is disabled by default, unless enabled by an enterprise administrator. If PAT is disabled, you won't be able to use PAT authentication. If you have OAuth access policy restrictions, you will need the OAuth App for each client (MCP host application) to be enabled (except Visual Studio Code and Visual Studio).
You do not need to create a PAT or install any additional software to use the remote GitHub MCP server with OAuth. You can set it up directly in Visual Studio.
In the Visual Studio menu bar, click View, then click GitHub Copilot Chat.
At the bottom of the chat panel, select Agent from the mode dropdown.
In the Copilot Chat window, click the tools icon, then click the plus icon in the tool picker window.
In the "Configure MCP server" pop-up window, fill out the fields.
For "Server ID", type github.
For "Type", select "HTTP/SSE" from the dropdown.
For "URL", type https://api.githubcopilot.com/mcp/.
Click Save. The configuration in the mcp.json file should look like this:
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 GitHub account.
To configure the remote 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 Managing your personal access tokens.
In the Visual Studio menu bar, click View, then click GitHub Copilot Chat.
At the bottom of the chat panel, select Agent from the mode dropdown.
In the Copilot Chat window, click the tools icon, then click the plus icon in the tool picker window.
In the "Configure MCP server" pop-up window, fill out the fields.
For "Server ID", type github.
For "Type", select "HTTP/SSE" from the dropdown.
For "URL", type https://api.githubcopilot.com/mcp/.
Add a new header under "Headers", called "Authorization" and set to the value Bearer YOUR_GITHUB_PAT, replacing "YOUR_GITHUB_PAT" with your PAT.
Click Save. The configuration in the mcp.json file should look like this:
The GitHub MCP server is a Model Context Protocol (MCP) server provided and maintained by GitHub. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
If you are a member of an organization or enterprise with a Copilot Business or Copilot Enterprise plan, the "MCP servers in Copilot" policy must be enabled in order to use MCP with Copilot.
The instructions below guide you through setting up the GitHub MCP server in JetBrains IDEs. Other MCP-compatible editors may have similar steps, but the exact process may vary.
The remote GitHub MCP server uses one-click OAuth authentication by default, but you can also manually configure it to use a personal access token (PAT) for authentication. If you use OAuth, the MCP server can only access the scopes you approve during sign-in. In organization-owned contexts, access may also be limited by admin policies that control which scopes and apps are permitted. If you use a PAT, the MCP server will have access to the scopes granted by the PAT, which is also subject to any PAT restrictions configured by the organization.
Note
If you are an Enterprise Managed User, then PAT is disabled by default, unless enabled by an enterprise administrator. If PAT is disabled, you won't be able to use PAT authentication. If you have OAuth access policy restrictions, you will need the OAuth App for each client (MCP host application) to be enabled (except Visual Studio Code and Visual Studio).
You do not need to create a PAT or install any additional software to use the remote GitHub MCP server with OAuth. You can set it up directly in JetBrains IDEs.
In the lower right corner, click .
From the menu, select "Open Chat", make sure you are in Agent mode, then click the tools icon (called "Configure your MCP server") at the bottom of the chat window.
Click Add MCP Tools.
In the mcp.json file, add the following configuration:
To configure the remote 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 Managing your personal access tokens.
In the lower right corner, click .
From the menu, select "Open Chat", make sure you are in Agent mode, then click the tools icon (called "Configure your MCP server") at the bottom of the chat window.
Click Add MCP Tools.
In the mcp.json file, add the following configuration, replacing YOUR_GITHUB_PAT with the PAT you created:
If you are using the GitHub MCP server and push protection blocks a secret that you believe is safe to expose, you may be able to bypass the block by specifying a reason for allowing the secret. See Working with push protection and the GitHub MCP server.
The GitHub MCP server is a Model Context Protocol (MCP) server provided and maintained by GitHub. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
If you are a member of an organization or enterprise with a Copilot Business or Copilot Enterprise plan, the "MCP servers in Copilot" policy must be enabled in order to use MCP with Copilot.
The instructions below guide you through setting up the GitHub MCP server in Xcode. Other MCP-compatible editors may have similar steps, but the exact process may vary.
The remote GitHub MCP server uses one-click OAuth authentication by default, but you can also manually configure it to use a personal access token (PAT) for authentication. If you use OAuth, the MCP server can only access the scopes you approve during sign-in. In organization-owned contexts, access may also be limited by admin policies that control which scopes and apps are permitted. If you use a PAT, the MCP server will have access to the scopes granted by the PAT, which is also subject to any PAT restrictions configured by the organization.
Note
If you are an Enterprise Managed User, then PAT is disabled by default, unless enabled by an enterprise administrator. If PAT is disabled, you won't be able to use PAT authentication. If you have OAuth access policy restrictions, you will need the OAuth App for each client (MCP host application) to be enabled (except Visual Studio Code and Visual Studio).
You do not need to create a PAT or install any additional software to use the remote GitHub MCP server with OAuth. You can set it up directly in Xcode.
Open the GitHub Copilot for Xcode extension and go to "Settings".
Alternatively, in an active Xcode workspace, you can find the settings by clicking Editor in the menu bar, selecting GitHub Copilot, then clicking Open GitHub Copilot for Xcode Settings.
To configure the remote 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 Managing your personal access tokens.
Open the GitHub Copilot for Xcode extension and go to "Settings".
Alternatively, in an active Xcode workspace, you can find the settings by clicking Editor in the menu bar, selecting GitHub Copilot, then clicking Open GitHub Copilot for Xcode Settings.
Select the MCP tab, then click Edit Config.
Add the following configuration, replacing YOUR_GITHUB_PAT with the PAT you created:
If you are using the GitHub MCP server and push protection blocks a secret that you believe is safe to expose, you may be able to bypass the block by specifying a reason for allowing the secret. See Working with push protection and the GitHub MCP server.
The GitHub MCP server is a Model Context Protocol (MCP) server provided and maintained by GitHub. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
Compatible version of Eclipse. To use the GitHub Copilot extension, you must have Eclipse version 2024-09 or above. See the Eclipse download page.
If you are a member of an organization or enterprise with a Copilot Business or Copilot Enterprise plan, the "MCP servers in Copilot" policy must be enabled in order to use MCP with Copilot.
If you are a member of an organization or enterprise with a Copilot Business or Copilot Enterprise plan, the "MCP servers in Copilot" policy must be enabled in order to use MCP with Copilot.
The instructions below guide you through setting up the GitHub MCP server in Eclipse. Other MCP-compatible editors may have similar steps, but the exact process may vary.
The remote GitHub MCP server uses one-click OAuth authentication by default, but you can also manually configure it to use a personal access token (PAT) for authentication. If you use OAuth, the MCP server can only access the scopes you approve during sign-in. In organization-owned contexts, access may also be limited by admin policies that control which scopes and apps are permitted. If you use a PAT, the MCP server will have access to the scopes granted by the PAT, which is also subject to any PAT restrictions configured by the organization.
Note
If you are an Enterprise Managed User, then PAT is disabled by default, unless enabled by an enterprise administrator. If PAT is disabled, you won't be able to use PAT authentication. If you have OAuth access policy restrictions, you will need the OAuth App for each client (MCP host application) to be enabled (except Visual Studio Code and Visual Studio).
You do not need to create a PAT or install any additional software to use the remote GitHub MCP server with OAuth. You can set it up directly in Eclipse.
Click the Copilot icon () in the status bar at the bottom of Eclipse.
From the menu, select Open Chat and, in the chat window, click the "Configure Tools..." icon.
Alternatively, you can select Edit preferences, then in the left pane, expand GitHub Copilot and click MCP.
Add the following configuration under "Server Configurations":
To configure the remote 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 Managing your personal access tokens.
Click the Copilot icon () in the status bar at the bottom of Eclipse.
From the menu, select Open Chat and, in the chat window, click the "Configure Tools..." icon.
Alternatively, you can select Edit preferences, then in the left pane, expand GitHub Copilot and click MCP.
Add the following configuration under "Server Configurations", replacing YOUR_GITHUB_PAT with the PAT you created:
If you are using the GitHub MCP server and push protection blocks a secret that you believe is safe to expose, you may be able to bypass the block by specifying a reason for allowing the secret. See Working with push protection and the GitHub MCP server.
The GitHub MCP server is a Model Context Protocol (MCP) server provided and maintained by GitHub. MCP allows you to integrate AI capabilities with other tools and services, enhancing your development experience by providing context-aware AI assistance.
Within Copilot Chat in GitHub, the GitHub MCP server is automatically configured, with a limited set of skills available. This allows you to instruct Copilot Chat to perform tasks such as creating branches or merging pull requests on your behalf. For a full list of available skills, see GitHub Copilot Chat cheat sheet.
The GitHub MCP server is automatically configured in Copilot Chat in GitHub. You can start using it immediately without any additional setup.
At the top right of any page on GitHub, click the button next to the search bar.
The full-page, immersive, mode of Copilot Chat is displayed.
In the prompt box, type a request related to the skill you want Copilot Chat to perform, and press Enter.
Some examples of requests you can make are:
Create a new branch called [BRANCH-NAME] in the repository [OWNER/REPO-NAME].
Search for users with the name [USER-NAME]
Merge the pull request [PR-NUMBER] in the repository [OWNER/REPO-NAME].
Copilot Chat will ask you to confirm that you want to proceed with the action. Click Allow to confirm.
Copilot Chat will use the relevant skill from the GitHub MCP server to perform the action you requested. Copilot Chat will show you the result of the action in the chat interface.
The GitHub MCP server in Copilot Chat in GitHub is currently limited to a set of predefined skills. If you ask Copilot Chat to perform an action that is not supported by the MCP server, it will still attempt to provide a helpful response, but it may not be able to perform the action as expected. For example, if you ask Copilot Chat to create a new issue, it may provide you with a draft issue template, but you will still need to manually create the issue.