You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+89-39Lines changed: 89 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,17 +87,33 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
87
87
88
88
### Configuration
89
89
90
-
#### Default toolset configuration
91
-
92
-
The default configuration is:
93
-
- context
94
-
- repos
95
-
- issues
96
-
- pull_requests
97
-
- users
90
+
#### Toolset configuration
98
91
99
92
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.
100
93
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.
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
+
101
117
---
102
118
103
119
## Local GitHub MCP Server
@@ -160,6 +176,33 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
160
176
161
177
</details>
162
178
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.
|`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
+
355
424
## Tools
356
425
357
426
<!-- START AUTOMATED TOOLS -->
@@ -1098,7 +1167,7 @@ Possible options:
1098
1167
1099
1168
<details>
1100
1169
1101
-
<summary>Copilot coding agent</summary>
1170
+
<summary>Copilot</summary>
1102
1171
1103
1172
-**create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
1104
1173
-`owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
@@ -1120,6 +1189,14 @@ Possible options:
1120
1189
-**list_copilot_spaces** - List Copilot Spaces
1121
1190
</details>
1122
1191
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
+
1123
1200
## Dynamic Tool Discovery
1124
1201
1125
1202
**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 \
1160
1237
ghcr.io/github/github-mcp-server
1161
1238
```
1162
1239
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.
> 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:
36
45
37
46
```json
38
47
// ~/.gemini/settings.json
39
48
{
40
49
"mcpServers": {
41
50
"github": {
42
51
"httpUrl": "https://api.githubcopilot.com/mcp/",
43
-
"trust": true,
44
52
"headers": {
45
-
"Authorization": "Bearer $GITHUB_PAT"
53
+
"Authorization": "Bearer $GITHUB_MCP_PAT"
46
54
}
47
55
}
48
56
}
49
57
}
50
58
```
51
59
52
-
### Method 2: Local Docker
60
+
### Method 3: Local Docker
53
61
54
62
With docker running, you can run the GitHub MCP server in a container:
55
63
@@ -68,14 +76,14 @@ With docker running, you can run the GitHub MCP server in a container:
68
76
"ghcr.io/github/github-mcp-server"
69
77
],
70
78
"env": {
71
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
79
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
72
80
}
73
81
}
74
82
}
75
83
}
76
84
```
77
85
78
-
### Method 3: Binary
86
+
### Method 4: Binary
79
87
80
88
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`.
81
89
@@ -89,7 +97,7 @@ Then, replacing `/path/to/binary` with the actual path to your binary, configure
89
97
"command": "/path/to/binary",
90
98
"args": ["stdio"],
91
99
"env": {
92
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
100
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
93
101
}
94
102
}
95
103
}
@@ -122,6 +130,10 @@ To verify that the GitHub MCP server has been configured, start Gemini CLI in yo
122
130
List my GitHub repositories
123
131
```
124
132
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.
0 commit comments