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
+45-12Lines changed: 45 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,7 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
80
80
</table>
81
81
82
82
### Install in other MCP hosts
83
+
83
84
-**[GitHub Copilot in other IDEs](/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
84
85
-**[Claude Applications](/docs/installation-guides/install-claude.md)** - Installation guide for Claude Desktop and Claude Code CLI
85
86
-**[Codex](/docs/installation-guides/install-codex.md)** - Installation guide for Open AI Codex
@@ -104,6 +105,7 @@ When no toolsets are specified, [default toolsets](#default-toolset) are used.
104
105
GitHub Enterprise Cloud can also make use of the remote server.
105
106
106
107
Example for `https://octocorp.ghe.com` with GitHub PAT token:
108
+
107
109
```
108
110
{
109
111
...
@@ -140,24 +142,30 @@ The MCP server can use many of the GitHub APIs, so enable the permissions that y
140
142
<details><summary><b>Handling PATs Securely</b></summary>
141
143
142
144
### Environment Variables (Recommended)
145
+
143
146
To keep your GitHub PAT secure and reusable across different MCP hosts:
144
147
145
148
1.**Store your PAT in environment variables**
149
+
146
150
```bash
147
151
export GITHUB_PAT=your_token_here
148
152
```
153
+
149
154
Or create a `.env` file:
155
+
150
156
```env
151
157
GITHUB_PAT=your_token_here
152
158
```
153
159
154
160
2.**Protect your `.env` file**
161
+
155
162
```bash
156
163
# Add to .gitignore to prevent accidental commits
157
164
echo".env">> .gitignore
158
165
```
159
166
160
167
3.**Reference the token in configurations**
168
+
161
169
```bash
162
170
# CLI usage
163
171
claude mcp update github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT
@@ -180,6 +188,7 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
180
188
-**Regular rotation**: Update tokens periodically
181
189
-**Never commit**: Keep tokens out of version control
182
190
-**File permissions**: Restrict access to config files containing tokens
191
+
183
192
```bash
184
193
chmod 600 ~/.your-app/config.json
185
194
```
@@ -193,6 +202,7 @@ the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data r
193
202
194
203
- 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.
195
204
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
205
+
196
206
```json
197
207
"github": {
198
208
"command": "docker",
@@ -328,6 +338,18 @@ If you don't have Docker, you can use `go build` to build the binary in the
328
338
}
329
339
```
330
340
341
+
### CLI utilities
342
+
343
+
The `github-mcp-server` binary includes a few CLI subcommands that are helpful for debugging and exploring the server.
344
+
345
+
-`github-mcp-server tool-search "<query>"` searches tools by name, description, and input parameter names. Use `--max-results` to return more matches.
346
+
Example:
347
+
348
+
```bash
349
+
docker run -i --rm ghcr.io/github/github-mcp-server tool-search "issue" --max-results 5
The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the `--toolsets` flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size.
@@ -349,6 +371,7 @@ To specify toolsets you want available to the LLM, you can pass an allow-list in
This registers `get_file_contents` plus the dynamic toolset tools (`enable_toolset`, `list_available_toolsets`, `get_toolset_tools`).
384
412
385
413
**Important Notes:**
414
+
386
415
- Tools, toolsets, and dynamic toolsets can all be used together
387
416
- Read-only mode takes priority: write tools are skipped if `--read-only` is set, even if explicitly requested via `--tools`
388
417
- Tool names must match exactly (e.g., `get_file_contents`, not `getFileContents`). Invalid tool names will cause the server to fail at startup with an error message
The default toolset `default` is the configuration that gets passed to the server if no toolsets are specified.
439
469
440
470
The default configuration is:
471
+
441
472
- context
442
473
- repos
443
474
- issues
@@ -1371,32 +1402,34 @@ The following sets of tools are available:
1371
1402
1372
1403
<summary>Copilot</summary>
1373
1404
1374
-
-**create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
1375
-
-`owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
1376
-
-`repo`: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)
1377
-
-`problem_statement`: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)
1378
-
-`title`: Title for the pull request that will be created (string, required)
1379
-
-`base_ref`: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)
1405
+
-**create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
1406
+
-`owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
1407
+
-`repo`: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)
1408
+
-`problem_statement`: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)
1409
+
-`title`: Title for the pull request that will be created (string, required)
1410
+
-`base_ref`: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)
1380
1411
1381
1412
</details>
1382
1413
1383
1414
<details>
1384
1415
1385
1416
<summary>Copilot Spaces</summary>
1386
1417
1387
-
-**get_copilot_space** - Get Copilot Space
1388
-
-`owner`: The owner of the space. (string, required)
1389
-
-`name`: The name of the space. (string, required)
1418
+
-**get_copilot_space** - Get Copilot Space
1419
+
-`owner`: The owner of the space. (string, required)
1420
+
-`name`: The name of the space. (string, required)
1421
+
1422
+
-**list_copilot_spaces** - List Copilot Spaces
1390
1423
1391
-
-**list_copilot_spaces** - List Copilot Spaces
1392
1424
</details>
1393
1425
1394
1426
<details>
1395
1427
1396
1428
<summary>GitHub Support Docs Search</summary>
1397
1429
1398
-
-**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
1399
-
-`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)
1430
+
-**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
1431
+
-`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)
0 commit comments