The remote GitHub MCP server is currently in パブリック プレビュー and subject to change; use of the GitHub MCP server locally is generally available (GA).
While in パブリック プレビュー, access to the remote GitHub MCP server through OAuth in Copilot is governed by the Copilot Editor preview features policy at the organization or enterprise level. PAT access to the server is managed by PAT policies.
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:
特定のリポジトリ。 これにより、Visual Studio Code でプロジェクトを開いたすべてのユーザーと MCP サーバーを共有できます。 これを行うには、リポジトリのルートに .vscode/mcp.json ファイルを作成します。
Visual Studio Code の個人インスタンス。 構成した MCP サーバーにアクセスできるのは自分だけです。 これを行うには、Visual Studio Code で settings.json ファイルに構成を追加します。 この方法で構成された MCP サーバーは、すべてのワークスペースで使用できます。
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 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.
メモ
If you are an Enterprise Managed User 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 Visual Studio Code and Visual Studio).
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 個人用アクセス トークンを管理する.
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.
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.
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.
We recommend setting up the GitHub MCP server remotely. JetBrains IDEs only support using a personal access token (PAT) for authentication with the GitHub MCP server.
メモ
If you are an Enterprise Managed User with PAT restrictions, you won't be able to use PAT authentication.
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 個人用アクセス トークンを管理する.
In the lower right corner, click .
From the menu, select "Edit settings".
Under the MCP section, click "Edit in mcp.json".
Add the following configuration, replacing YOUR_GITHUB_PAT with the PAT you created:
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.
We recommend setting up the GitHub MCP server remotely. Xcode only supports using a personal access token (PAT) for authentication with the GitHub MCP server.
メモ
If you are an Enterprise Managed User with PAT restrictions, you won't be able to use PAT authentication.
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 個人用アクセス トークンを管理する.
Open the GitHub Copilot for Xcode extension.
In agent mode, click the tools icon.
Select "Edit config".
Add the following configuration, replacing YOUR_GITHUB_PAT with the PAT you created:
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.
We recommend setting up the GitHub MCP server remotely. Eclipse only supports using a personal access token (PAT) for authentication with the GitHub MCP server.
メモ
If you are an Enterprise Managed User with PAT restrictions, you won't be able to use PAT authentication.
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 個人用アクセス トークンを管理する.
To open the Copilot Chat panel, click the Copilot icon () in the status bar at the bottom of Eclipse.
From the menu, select "Edit preferences".
In the left pane, expand GitHub Copilot and click MCP.
Add the following configuration, replacing YOUR_GITHUB_PAT with the PAT you created: