Skip to content

Commit db8050b

Browse files
authored
Merge branch 'main' into almaleksia/consolidate-issues
2 parents fa3f912 + 3ddf649 commit db8050b

File tree

12 files changed

+550
-73
lines changed

12 files changed

+550
-73
lines changed

.github/workflows/code-scanning.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/checkout@v5
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v3
41+
uses: github/codeql-action/init@v4
4242
with:
4343
languages: ${{ matrix.language }}
4444
build-mode: ${{ matrix.build-mode }}
@@ -52,13 +52,13 @@ jobs:
5252
threat-models: [ ]
5353
- name: Setup proxy for registries
5454
id: proxy
55-
uses: github/codeql-action/start-proxy@v3
55+
uses: github/codeql-action/start-proxy@v4
5656
with:
5757
registries_credentials: ${{ secrets.GITHUB_REGISTRIES_PROXY }}
5858
language: ${{ matrix.language }}
5959

6060
- name: Configure
61-
uses: github/codeql-action/resolve-environment@v3
61+
uses: github/codeql-action/resolve-environment@v4
6262
id: resolve-environment
6363
with:
6464
language: ${{ matrix.language }}
@@ -70,10 +70,10 @@ jobs:
7070
cache: false
7171

7272
- name: Autobuild
73-
uses: github/codeql-action/autobuild@v3
73+
uses: github/codeql-action/autobuild@v4
7474

7575
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@v3
76+
uses: github/codeql-action/analyze@v4
7777
env:
7878
CODEQL_PROXY_HOST: ${{ steps.proxy.outputs.proxy_host }}
7979
CODEQL_PROXY_PORT: ${{ steps.proxy.outputs.proxy_port }}

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# https://github.com/sigstore/cosign-installer
4747
- name: Install cosign
4848
if: github.event_name != 'pull_request'
49-
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 #v3.10.0
49+
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad #v4.0.0
5050
with:
5151
cosign-release: "v2.2.4"
5252

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.25.1-alpine AS build
1+
FROM golang:1.25.3-alpine AS build
22
ARG VERSION="dev"
33

44
# Set the working directory

README.md

Lines changed: 89 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,33 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
8787
8888
### Configuration
8989

90-
#### Default toolset configuration
91-
92-
The default configuration is:
93-
- context
94-
- repos
95-
- issues
96-
- pull_requests
97-
- users
90+
#### Toolset configuration
9891

9992
See [Remote Server Documentation](docs/remote-server.md) for full details on remote server configuration, toolsets, headers, and advanced usage. This file provides comprehensive instructions and examples for connecting, customizing, and installing the remote GitHub MCP Server in VS Code and other MCP hosts.
10093

94+
When no toolsets are specified, [default toolsets](#default-toolset) are used.
95+
96+
#### Enterprise Cloud with data residency (ghe.com)
97+
98+
GitHub Enterprise Cloud can also make use of the remote server.
99+
100+
Example for `https://octocorp.ghe.com`:
101+
```
102+
{
103+
...
104+
"proxima-github": {
105+
"type": "http",
106+
"url": "https://copilot-api.octocorp.ghe.com/mcp",
107+
"headers": {
108+
"Authorization": "Bearer ${input:github_mcp_pat}"
109+
}
110+
},
111+
...
112+
}
113+
```
114+
115+
GitHub Enterprise Server does not support remote server hosting. Please refer to [GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)](#github-enterprise-server-and-enterprise-cloud-with-data-residency-ghecom) from the local server configuration.
116+
101117
---
102118

103119
## Local GitHub MCP Server
@@ -160,6 +176,33 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
160176

161177
</details>
162178

179+
### GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
180+
181+
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
182+
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
183+
184+
- For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
185+
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
186+
``` json
187+
"github": {
188+
"command": "docker",
189+
"args": [
190+
"run",
191+
"-i",
192+
"--rm",
193+
"-e",
194+
"GITHUB_PERSONAL_ACCESS_TOKEN",
195+
"-e",
196+
"GITHUB_HOST",
197+
"ghcr.io/github/github-mcp-server"
198+
],
199+
"env": {
200+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}",
201+
"GITHUB_HOST": "https://<your GHES or ghe.com domain name>"
202+
}
203+
}
204+
```
205+
163206
## Installation
164207

165208
### Install in GitHub Copilot on VS Code
@@ -281,7 +324,7 @@ The GitHub MCP Server supports enabling or disabling specific groups of function
281324

282325
_Toolsets are not limited to Tools. Relevant MCP Resources and Prompts are also included where applicable._
283326

284-
The Local GitHub MCP Server follows the same [default toolset configuration](#default-toolset-configuration) as the remote version.
327+
When no toolsets are specified, [default toolsets](#default-toolset) are used.
285328

286329
#### Specifying Toolsets
287330

@@ -311,7 +354,9 @@ docker run -i --rm \
311354
ghcr.io/github/github-mcp-server
312355
```
313356

314-
### The "all" Toolset
357+
### Special toolsets
358+
359+
#### "all" toolset
315360

316361
The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
317362

@@ -325,9 +370,25 @@ Or using the environment variable:
325370
GITHUB_TOOLSETS="all" ./github-mcp-server
326371
```
327372

373+
#### "default" toolset
374+
The default toolset `default` is the configuration that gets passed to the server if no toolsets are specified.
375+
376+
The default configuration is:
377+
- context
378+
- repos
379+
- issues
380+
- pull_requests
381+
- users
382+
383+
To keep the default configuration and add additional toolsets:
384+
385+
```bash
386+
GITHUB_TOOLSETS="default,stargazers" ./github-mcp-server
387+
```
388+
328389
### Available Toolsets
329390

330-
The following sets of tools are available (all are on by default):
391+
The following sets of tools are available:
331392

332393
<!-- START AUTOMATED TOOLSETS -->
333394
| Toolset | Description |
@@ -352,6 +413,14 @@ The following sets of tools are available (all are on by default):
352413
| `users` | GitHub User related tools |
353414
<!-- END AUTOMATED TOOLSETS -->
354415

416+
### Additional Toolsets in Remote Github MCP Server
417+
418+
| Toolset | Description |
419+
| ----------------------- | ------------------------------------------------------------- |
420+
| `copilot` | Copilot related tools (e.g. Copilot Coding Agent) |
421+
| `copilot_spaces` | Copilot Spaces related tools |
422+
| `github_support_docs_search` | Search docs to answer GitHub product and support questions |
423+
355424
## Tools
356425

357426
<!-- START AUTOMATED TOOLS -->
@@ -1098,7 +1167,7 @@ Possible options:
10981167

10991168
<details>
11001169

1101-
<summary>Copilot coding agent</summary>
1170+
<summary>Copilot</summary>
11021171

11031172
- **create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
11041173
- `owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
@@ -1120,6 +1189,14 @@ Possible options:
11201189
- **list_copilot_spaces** - List Copilot Spaces
11211190
</details>
11221191

1192+
<details>
1193+
1194+
<summary>GitHub Support Docs Search</summary>
1195+
1196+
- **github_support_docs_search** - Retrieve documentation relevant to answer GitHub product and support questions. Support topics include: GitHub Actions Workflows, Authentication, GitHub Support Inquiries, Pull Request Practices, Repository Maintenance, GitHub Pages, GitHub Packages, GitHub Discussions, Copilot Spaces
1197+
- `query`: Input from the user about the question they need answered. This is the latest raw unedited user message. You should ALWAYS leave the user message as it is, you should never modify it. (string, required)
1198+
</details>
1199+
11231200
## Dynamic Tool Discovery
11241201

11251202
**Note**: This feature is currently in beta and may not be available in all environments. Please test it out and let us know if you encounter any issues.
@@ -1160,33 +1237,6 @@ docker run -i --rm \
11601237
ghcr.io/github/github-mcp-server
11611238
```
11621239

1163-
## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
1164-
1165-
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
1166-
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
1167-
1168-
- For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
1169-
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
1170-
``` json
1171-
"github": {
1172-
"command": "docker",
1173-
"args": [
1174-
"run",
1175-
"-i",
1176-
"--rm",
1177-
"-e",
1178-
"GITHUB_PERSONAL_ACCESS_TOKEN",
1179-
"-e",
1180-
"GITHUB_HOST",
1181-
"ghcr.io/github/github-mcp-server"
1182-
],
1183-
"env": {
1184-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}",
1185-
"GITHUB_HOST": "https://<your GHES or ghe.com domain name>"
1186-
}
1187-
}
1188-
```
1189-
11901240
## i18n / Overriding Descriptions
11911241

11921242
The descriptions of the tools can be overridden by creating a

cmd/github-mcp-server/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ var (
4545
return fmt.Errorf("failed to unmarshal toolsets: %w", err)
4646
}
4747

48+
// No passed toolsets configuration means we enable the default toolset
4849
if len(enabledToolsets) == 0 {
49-
enabledToolsets = github.GetDefaultToolsetIDs()
50+
enabledToolsets = []string{github.ToolsetMetadataDefault.ID}
5051
}
5152

5253
stdioServerConfig := ghmcp.StdioServerConfig{
@@ -99,6 +100,7 @@ func init() {
99100
func initConfig() {
100101
// Initialize Viper configuration
101102
viper.SetEnvPrefix("github")
103+
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
102104
viper.AutomaticEnv()
103105

104106
}

docs/installation-guides/install-gemini-cli.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For security, avoid hardcoding your token. Create or update `~/.gemini/.env` (wh
1414

1515
```bash
1616
# ~/.gemini/.env
17-
GITHUB_PAT=your_token_here
17+
GITHUB_MCP_PAT=your_token_here
1818
```
1919

2020
</details>
@@ -30,26 +30,34 @@ After securely storing your PAT, you can add the GitHub MCP server configuration
3030

3131
> **Note:** For the most up-to-date configuration options, see the [main README.md](../../README.md).
3232
33-
### Method 1: Remote Server (Recommended)
33+
### Method 1: Gemini Extension (Recommended)
3434

35-
The simplest way is to use GitHub's hosted MCP server:
35+
The simplest way is to use GitHub's hosted MCP server via our gemini extension.
36+
37+
`gemini extensions install https://github.com/github/github-mcp-server`
38+
39+
> [!NOTE]
40+
> You will still need to have a personal access token with the appropriate scopes called `GITHUB_MCP_PAT` in your environment.
41+
42+
### Method 2: Remote Server
43+
44+
You can also connect to the hosted MCP server directly. After securely storing your PAT, configure Gemini CLI with:
3645

3746
```json
3847
// ~/.gemini/settings.json
3948
{
4049
"mcpServers": {
4150
"github": {
4251
"httpUrl": "https://api.githubcopilot.com/mcp/",
43-
"trust": true,
4452
"headers": {
45-
"Authorization": "Bearer $GITHUB_PAT"
53+
"Authorization": "Bearer $GITHUB_MCP_PAT"
4654
}
4755
}
4856
}
4957
}
5058
```
5159

52-
### Method 2: Local Docker
60+
### Method 3: Local Docker
5361

5462
With docker running, you can run the GitHub MCP server in a container:
5563

@@ -68,14 +76,14 @@ With docker running, you can run the GitHub MCP server in a container:
6876
"ghcr.io/github/github-mcp-server"
6977
],
7078
"env": {
71-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
79+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
7280
}
7381
}
7482
}
7583
}
7684
```
7785

78-
### Method 3: Binary
86+
### Method 4: Binary
7987

8088
You can download the latest binary release from the [GitHub releases page](https://github.com/github/github-mcp-server/releases) or build it from source by running `go build -o github-mcp-server ./cmd/github-mcp-server`.
8189

@@ -89,7 +97,7 @@ Then, replacing `/path/to/binary` with the actual path to your binary, configure
8997
"command": "/path/to/binary",
9098
"args": ["stdio"],
9199
"env": {
92-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
100+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
93101
}
94102
}
95103
}
@@ -122,6 +130,10 @@ To verify that the GitHub MCP server has been configured, start Gemini CLI in yo
122130
List my GitHub repositories
123131
```
124132
133+
## Additional Configuration
134+
135+
You can find more MCP configuration options for Gemini CLI here: [MCP Configuration Structure](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html#configuration-structure). For example, bypassing tool confirmations or excluding specific tools.
136+
125137
## Troubleshooting
126138
127139
### Local Server Issues

docs/remote-server.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ These toolsets are only available in the remote GitHub MCP Server and are not in
4646

4747
| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |
4848
| -------------------- | --------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
49-
| Copilot coding agent | Perform task with GitHub Copilot coding agent | https://api.githubcopilot.com/mcp/x/copilot | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/copilot/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot%2Freadonly%22%7D) |
49+
| Copilot | Copilot related tools | https://api.githubcopilot.com/mcp/x/copilot | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/copilot/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot%2Freadonly%22%7D) |
50+
| Copilot Spaces | Copilot Spaces tools | https://api.githubcopilot.com/mcp/x/copilot_spaces | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot_spaces&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot_spaces%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/copilot_spaces/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-copilot_spaces&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcopilot_spaces%2Freadonly%22%7D) |
51+
| GitHub support docs search | Retrieve documentation to answer GitHub product and support questions. Topics include: GitHub Actions Workflows, Authentication, ... | https://api.githubcopilot.com/mcp/x/github_support_docs_search | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-support&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgithub_support_docs_search%22%7D) | [read-only](https://api.githubcopilot.com/mcp/x/github_support_docs_search/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-support&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fgithub_support_docs_search%2Freadonly%22%7D) |
5052

5153
### Optional Headers
5254

gemini-extension.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "github",
3+
"version": "1.0.0",
4+
"mcpServers": {
5+
"github": {
6+
"description": "Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.",
7+
"httpUrl": "https://api.githubcopilot.com/mcp/",
8+
"headers": {
9+
"Authorization": "Bearer $GITHUB_MCP_PAT"
10+
}
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)