The GitHub MCP server can be configured to work with GitHub Enterprise Server and 데이터 보존 기능을 갖춘 GitHub Enterprise Cloud. The configuration steps differ depending on whether you are using the remote or local MCP server.
About enterprise MCP server configuration
The GitHub MCP server supports two enterprise deployment types:
- 데이터 보존 기능을 갖춘 GitHub Enterprise Cloud: Supports both remote and local MCP server configurations
- GitHub Enterprise Server: Supports only local MCP server configuration
중요
GitHub Enterprise Server does not support remote MCP server hosting. If you are using GitHub Enterprise Server, you must use the local MCP server configuration described in Configuring the local MCP server for enterprise. Skip the remote MCP server configuration section below.
Prerequisites
- A GitHub Enterprise Server instance or GitHub Enterprise Cloud account with 데이터 보존
- The GitHub MCP server configured in your editor. See GitHub MCP 서버 설정.
Configuring the remote MCP server for 데이터 보존 기능을 갖춘 GitHub Enterprise Cloud
참고 항목
This section applies only to 데이터 보존 기능을 갖춘 GitHub Enterprise Cloud. If you are using GitHub Enterprise Server, skip to Configuring the local MCP server for enterprise.
데이터 보존 기능을 갖춘 GitHub Enterprise Cloud can use the remote MCP server. To configure it, you need to update the MCP server URL to point to your GitHub Enterprise Cloud instance.
For example, if your GitHub Enterprise Cloud instance is https://octocorp.ghe.com, the MCP server URL would be https://copilot-api.octocorp.ghe.com/mcp.
-
In Visual Studio Code, open the command palette by pressing Ctrl+Shift+P (Windows/Linux) / Command+Shift+P (Mac).
-
Type and select MCP: Open User Configuration.
-
In the settings file, locate the
serverssection. If you have already configured the GitHub MCP server, you will see agithubentry. -
Update the
urlfield to point to your GitHub Enterprise Cloud instance.Option A: With PAT authentication
JSON { "servers": { "github": { "type": "http", "url": "https://copilot-api.SUBDOMAIN.ghe.com/mcp", "headers": { "Authorization": "Bearer ${input:github_mcp_pat}" } } }, "inputs": [ { "type": "promptString", "id": "github_mcp_pat", "description": "GitHub PAT", "password": true } ] }{ "servers": { "github": { "type": "http", "url": "https://copilot-api.SUBDOMAIN.ghe.com/mcp", "headers": { "Authorization": "Bearer ${input:github_mcp_pat}" } } }, "inputs": [ { "type": "promptString", "id": "github_mcp_pat", "description": "GitHub PAT", "password": true } ] }Option B: With OAuth authentication
JSON { "servers": { "github": { "type": "http", "url": "https://copilot-api.SUBDOMAIN.ghe.com/mcp" } } }{ "servers": { "github": { "type": "http", "url": "https://copilot-api.SUBDOMAIN.ghe.com/mcp" } } }Replace
SUBDOMAIN.ghe.comwith your GHE.com subdomain. -
Save the file.
-
When using OAuth with 데이터 보존 기능을 갖춘 GitHub Enterprise Cloud, configure your VS Code settings to point to your GitHub Enterprise Cloud instance. Add the following to your VS Code user settings:
{ "github-enterprise.uri": "https://copilot-api.SUBDOMAIN.ghe.com/mcp" } -
Restart Visual Studio Code or reload the window for the changes to take effect.
GitHub Enterprise Cloud with data residency can use the remote MCP server. To configure it, you need to update the MCP server URL to point to your GitHub Enterprise Cloud instance.
For example, if your GitHub Enterprise Cloud instance is https://octocorp.ghe.com, the MCP server URL would be https://copilot-api.octocorp.ghe.com/mcp.
- In the Visual Studio menu bar, click View, then click GitHub Copilot 채팅.
- At the bottom of the chat panel, select Agent from the mode dropdown.
- In the 부조종사 채팅 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://copilot-api.YOURSUBDOMAIN.ghe.com/mcp, replacingYOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain. - Add a new header under "Headers", called "Authorization" and set to the value
Bearer YOUR_GITHUB_PAT, replacing "YOUR_GITHUB_PAT" with your personal access token.
- For "Server ID", type
- Click Save.
GitHub Enterprise Cloud with data residency can use the remote MCP server. To configure it, you need to update the MCP server URL to point to your GitHub Enterprise Cloud instance.
For example, if your GitHub Enterprise Cloud instance is https://octocorp.ghe.com, the MCP server URL would be https://copilot-api.octocorp.ghe.com/mcp.
-
오른쪽 아래 모서리에서 을 클릭합니다.
-
메뉴에서 "Open Chat"을 선택하고, 에이전트 모드에 있는지 확인한 다음, 채팅 창 하단에 있는 도구 아이콘("MCP 서버 구성"이라고 함)을 클릭합니다.
-
Add MCP Tools를 클릭합니다.
-
In the
mcp.jsonfile, add the following configuration, replacingYOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain andYOUR_GITHUB_PATwith your personal access token:JSON { "servers": { "github": { "url": "https://copilot-api.YOURSUBDOMAIN.ghe.com/mcp", "requestInit": { "headers": { "Authorization": "Bearer YOUR_GITHUB_PAT" } } } } }{ "servers": { "github": { "url": "https://copilot-api.YOURSUBDOMAIN.ghe.com/mcp", "requestInit": { "headers": { "Authorization": "Bearer YOUR_GITHUB_PAT" } } } } }
GitHub Enterprise Cloud with data residency can use the remote MCP server. To configure it, you need to update the MCP server URL to point to your GitHub Enterprise Cloud instance.
For example, if your GitHub Enterprise Cloud instance is https://octocorp.ghe.com, the MCP server URL would be https://copilot-api.octocorp.ghe.com/mcp.
-
Xcode용 GitHub Copilot 확장을 열고 "Settings"로 이동합니다.
- 또는, 활성 Xcode 작업 영역의 메뉴 모음에서 Editor를 클릭하고 GitHub Copilot 을 선택한 다음, Open GitHub Copilot for Xcode Settings를 클릭하여 설정을 찾을 수 있습니다.
-
MCP 탭을 선택한 다음, Edit Config를 클릭합니다.
-
Add the following configuration, replacing
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain andYOUR_GITHUB_PATwith your personal access token:JSON { "servers": { "github": { "url": "https://copilot-api.YOURSUBDOMAIN.ghe.com/mcp", "requestInit": { "headers": { "Authorization": "Bearer YOUR_GITHUB_PAT" } } } } }{ "servers": { "github": { "url": "https://copilot-api.YOURSUBDOMAIN.ghe.com/mcp", "requestInit": { "headers": { "Authorization": "Bearer YOUR_GITHUB_PAT" } } } } }
GitHub Enterprise Cloud with data residency can use the remote MCP server. To configure it, you need to update the MCP server URL to point to your GitHub Enterprise Cloud instance.
For example, if your GitHub Enterprise Cloud instance is https://octocorp.ghe.com, the MCP server URL would be https://copilot-api.octocorp.ghe.com/mcp.
-
Eclipse 하단의 상태 표시줄에 있는 Copilot 아이콘()을 클릭합니다.
-
메뉴에서 Open Chat을 선택하고 채팅 창에서 "Configure Tools..." 아이콘을 클릭합니다.
- 또는 Edit preferences를 선택한 다음, 왼쪽 창에서 GitHub Copilot을 확장하고 MCP를 클릭합니다.
-
Add the following configuration under "Server Configurations", replacing
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain andYOUR_GITHUB_PATwith your personal access token:JSON { "servers": { "github": { "url": "https://copilot-api.YOURSUBDOMAIN.ghe.com/mcp", "requestInit": { "headers": { "Authorization": "Bearer YOUR_GITHUB_PAT" } } } } }{ "servers": { "github": { "url": "https://copilot-api.YOURSUBDOMAIN.ghe.com/mcp", "requestInit": { "headers": { "Authorization": "Bearer YOUR_GITHUB_PAT" } } } } } -
Click Apply.
Configuring the local MCP server for enterprise
Both GitHub Enterprise Server and GitHub Enterprise Cloud with data residency support the local MCP server. You can configure the local server using either the GITHUB_HOST environment variable or the --gh-host command-line flag.
Important considerations
- For GitHub Enterprise Server: Prefix the hostname with the
https://URI scheme, as it otherwise defaults tohttp://, which GitHub Enterprise Server does not support. - For GitHub Enterprise Cloud with data residency: Use
https://YOURSUBDOMAIN.ghe.comas the hostname.
Configuration with Docker
To configure the local MCP server with Docker in Visual Studio Code:
-
In Visual Studio Code, open the command palette by pressing Ctrl+Shift+P (Windows/Linux) / Command+Shift+P (Mac).
-
Type and select MCP: Open User Configuration.
-
In the settings file, locate the
serverssection or create it if it doesn't exist. -
Add the following configuration:
For GitHub Enterprise Server:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }Replace
YOUR_GHES_HOSTNAMEwith your GitHub Enterprise Server hostname (for example,https://github.example.com).For GitHub Enterprise Cloud with data residency:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }Replace
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain. -
Save the file.
-
Restart Visual Studio Code or reload the window for the changes to take effect.
To configure the local MCP server with Docker in Visual Studio, you need to manually edit the mcp.json file.
-
Open the
mcp.jsonfile in Visual Studio. The file is typically located in your user profile directory. -
Add the following configuration:
For GitHub Enterprise Server:
JSON { "mcp": { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } } }{ "mcp": { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } } }Replace
YOUR_GHES_HOSTNAMEwith your GitHub Enterprise Server hostname (for example,https://github.example.com).For GitHub Enterprise Cloud with data residency:
JSON { "mcp": { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } } }{ "mcp": { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } } }Replace
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain. -
Save the file.
To configure the local MCP server with Docker in JetBrains IDEs:
-
오른쪽 아래 모서리에서 을 클릭합니다.
-
메뉴에서 "Open Chat"을 선택하고, 에이전트 모드에 있는지 확인한 다음, 채팅 창 하단에 있는 도구 아이콘("MCP 서버 구성"이라고 함)을 클릭합니다.
-
Add MCP Tools를 클릭합니다.
-
Add the following configuration:
For GitHub Enterprise Server:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }Replace
YOUR_GHES_HOSTNAMEwith your GitHub Enterprise Server hostname (for example,https://github.example.com).For GitHub Enterprise Cloud with data residency:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }Replace
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain.
To configure the local MCP server with Docker in Xcode:
-
Xcode용 GitHub Copilot 확장을 열고 "Settings"로 이동합니다.
- 또는, 활성 Xcode 작업 영역의 메뉴 모음에서 Editor를 클릭하고 GitHub Copilot 을 선택한 다음, Open GitHub Copilot for Xcode Settings를 클릭하여 설정을 찾을 수 있습니다.
-
MCP 탭을 선택한 다음, Edit Config를 클릭합니다.
-
Add the following configuration:
For GitHub Enterprise Server:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }Replace
YOUR_GHES_HOSTNAMEwith your GitHub Enterprise Server hostname (for example,https://github.example.com).For GitHub Enterprise Cloud with data residency:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }Replace
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain.
To configure the local MCP server with Docker in Eclipse:
-
Eclipse 하단의 상태 표시줄에 있는 Copilot 아이콘()을 클릭합니다.
-
메뉴에서 Open Chat을 선택하고 채팅 창에서 "Configure Tools..." 아이콘을 클릭합니다.
- 또는 Edit preferences를 선택한 다음, 왼쪽 창에서 GitHub Copilot을 확장하고 MCP를 클릭합니다.
-
Add the following configuration under "Server Configurations":
For GitHub Enterprise Server:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOUR_GHES_HOSTNAME" } } } }Replace
YOUR_GHES_HOSTNAMEwith your GitHub Enterprise Server hostname (for example,https://github.example.com).For GitHub Enterprise Cloud with data residency:
JSON { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }{ "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub PAT", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "-e", "GITHUB_HOST", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}", "GITHUB_HOST": "https://YOURSUBDOMAIN.ghe.com" } } } }Replace
YOURSUBDOMAINwith your GitHub Enterprise Cloud subdomain. -
Click Apply.
Configuration when building from source
If you are building the MCP server from source instead of using Docker, you can set the GITHUB_HOST environment variable or use the --gh-host command-line flag:
Using environment variable:
export GITHUB_HOST="https://YOUR_GHES_OR_GHEC_HOSTNAME"
./github-mcp-server stdio
Using command-line flag:
./github-mcp-server --gh-host \
"https://YOUR_GHES_OR_GHEC_HOSTNAME" stdio
Replace YOUR_GHES_OR_GHEC_HOSTNAME with your GitHub Enterprise Server hostname (for example, https://github.example.com) or GitHub Enterprise Cloud hostname (for example, https://octocorp.ghe.com).
Next steps
- To learn how to use the GitHub MCP server, see GitHub MCP 서버 사용.
- To learn how to configure toolsets for the GitHub MCP server, see Configuring toolsets for the GitHub MCP Server.