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
+52-15Lines changed: 52 additions & 15 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,19 +188,37 @@ 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
```
186
195
187
196
</details>
188
197
198
+
### Check PAT scopes
199
+
200
+
- Required scopes per toolset: run [script/list-scopes](script/list-scopes) to print the scopes the server needs. Example:
- Scopes granted to a PAT: run [script/get-token-scopes](script/get-token-scopes) to read the `X-OAuth-Scopes` header for a token. Example:
207
+
208
+
```bash
209
+
script/get-token-scopes --token=ghp_yourtoken
210
+
```
211
+
212
+
Use both commands together to confirm your token covers the toolsets you plan to enable.
213
+
189
214
### GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
190
215
191
216
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
192
217
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
193
218
194
219
- 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
220
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
221
+
196
222
```json
197
223
"github": {
198
224
"command": "docker",
@@ -349,6 +375,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
416
385
417
**Important Notes:**
418
+
386
419
- Tools, toolsets, and dynamic toolsets can all be used together
387
420
- Read-only mode takes priority: write tools are skipped if `--read-only` is set, even if explicitly requested via `--tools`
388
421
- 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
473
440
474
The default configuration is:
475
+
441
476
- context
442
477
- repos
443
478
- issues
@@ -833,7 +868,7 @@ The following sets of tools are available:
833
868
- 'add' - add a sub-issue to a parent issue in a GitHub repository.
834
869
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
835
870
- 'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.
836
-
(string, required)
871
+
(string, required)
837
872
-`owner`: Repository owner (string, required)
838
873
-`replace_parent`: When true, replaces the sub-issue's current parent issue. Use with 'add' method only. (boolean, optional)
839
874
-`repo`: Repository name (string, required)
@@ -1061,8 +1096,8 @@ The following sets of tools are available:
1061
1096
1062
1097
-**pull_request_read** - Get details for a single pull request
1063
1098
-**Required OAuth Scopes**: `repo`
1064
-
-`method`: Action to specify what pull request data needs to be retrieved from GitHub.
1065
-
Possible options:
1099
+
-`method`: Action to specify what pull request data needs to be retrieved from GitHub.
1100
+
Possible options:
1066
1101
1. get - Get details of a specific pull request.
1067
1102
2. get_diff - Get the diff of a pull request.
1068
1103
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
@@ -1369,32 +1404,34 @@ The following sets of tools are available:
1369
1404
1370
1405
<summary>Copilot</summary>
1371
1406
1372
-
-**create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
1373
-
-`owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
1374
-
-`repo`: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)
1375
-
-`problem_statement`: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)
1376
-
-`title`: Title for the pull request that will be created (string, required)
1377
-
-`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)
1407
+
-**create_pull_request_with_copilot** - Perform task with GitHub Copilot coding agent
1408
+
-`owner`: Repository owner. You can guess the owner, but confirm it with the user before proceeding. (string, required)
1409
+
-`repo`: Repository name. You can guess the repository name, but confirm it with the user before proceeding. (string, required)
1410
+
-`problem_statement`: Detailed description of the task to be performed (e.g., 'Implement a feature that does X', 'Fix bug Y', etc.) (string, required)
1411
+
-`title`: Title for the pull request that will be created (string, required)
1412
+
-`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)
1378
1413
1379
1414
</details>
1380
1415
1381
1416
<details>
1382
1417
1383
1418
<summary>Copilot Spaces</summary>
1384
1419
1385
-
-**get_copilot_space** - Get Copilot Space
1386
-
-`owner`: The owner of the space. (string, required)
1387
-
-`name`: The name of the space. (string, required)
1420
+
-**get_copilot_space** - Get Copilot Space
1421
+
-`owner`: The owner of the space. (string, required)
1422
+
-`name`: The name of the space. (string, required)
1423
+
1424
+
-**list_copilot_spaces** - List Copilot Spaces
1388
1425
1389
-
-**list_copilot_spaces** - List Copilot Spaces
1390
1426
</details>
1391
1427
1392
1428
<details>
1393
1429
1394
1430
<summary>GitHub Support Docs Search</summary>
1395
1431
1396
-
-**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
1397
-
-`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)
1432
+
-**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
1433
+
-`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