Skip to content

Commit e077a47

Browse files
committed
Update docs
1 parent ccb1594 commit e077a47

File tree

1 file changed

+52
-15
lines changed

1 file changed

+52
-15
lines changed

README.md

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block
8080
</table>
8181

8282
### Install in other MCP hosts
83+
8384
- **[GitHub Copilot in other IDEs](/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
8485
- **[Claude Applications](/docs/installation-guides/install-claude.md)** - Installation guide for Claude Desktop and Claude Code CLI
8586
- **[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.
104105
GitHub Enterprise Cloud can also make use of the remote server.
105106

106107
Example for `https://octocorp.ghe.com` with GitHub PAT token:
108+
107109
```
108110
{
109111
...
@@ -140,24 +142,30 @@ The MCP server can use many of the GitHub APIs, so enable the permissions that y
140142
<details><summary><b>Handling PATs Securely</b></summary>
141143

142144
### Environment Variables (Recommended)
145+
143146
To keep your GitHub PAT secure and reusable across different MCP hosts:
144147

145148
1. **Store your PAT in environment variables**
149+
146150
```bash
147151
export GITHUB_PAT=your_token_here
148152
```
153+
149154
Or create a `.env` file:
155+
150156
```env
151157
GITHUB_PAT=your_token_here
152158
```
153159

154160
2. **Protect your `.env` file**
161+
155162
```bash
156163
# Add to .gitignore to prevent accidental commits
157164
echo ".env" >> .gitignore
158165
```
159166

160167
3. **Reference the token in configurations**
168+
161169
```bash
162170
# CLI usage
163171
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:
180188
- **Regular rotation**: Update tokens periodically
181189
- **Never commit**: Keep tokens out of version control
182190
- **File permissions**: Restrict access to config files containing tokens
191+
183192
```bash
184193
chmod 600 ~/.your-app/config.json
185194
```
186195

187196
</details>
188197

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:
201+
202+
```bash
203+
script/list-scopes --toolsets=all --output=summary
204+
```
205+
206+
- 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+
189214
### GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
190215

191216
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
192217
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
193218

194219
- 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.
195220
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
221+
196222
``` json
197223
"github": {
198224
"command": "docker",
@@ -349,6 +375,7 @@ To specify toolsets you want available to the LLM, you can pass an allow-list in
349375
```
350376

351377
2. **Using Environment Variable**:
378+
352379
```bash
353380
GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
354381
```
@@ -366,23 +393,29 @@ You can also configure specific tools using the `--tools` flag. Tools can be use
366393
```
367394

368395
2. **Using Environment Variable**:
396+
369397
```bash
370398
GITHUB_TOOLS="get_file_contents,issue_read,create_pull_request" ./github-mcp-server
371399
```
372400

373401
3. **Combining with Toolsets** (additive):
402+
374403
```bash
375404
github-mcp-server --toolsets repos,issues --tools get_gist
376405
```
406+
377407
This registers all tools from `repos` and `issues` toolsets, plus `get_gist`.
378408

379409
4. **Combining with Dynamic Toolsets** (additive):
410+
380411
```bash
381412
github-mcp-server --tools get_file_contents --dynamic-toolsets
382413
```
414+
383415
This registers `get_file_contents` plus the dynamic toolset tools (`enable_toolset`, `list_available_toolsets`, `get_toolset_tools`).
384416

385417
**Important Notes:**
418+
386419
- Tools, toolsets, and dynamic toolsets can all be used together
387420
- Read-only mode takes priority: write tools are skipped if `--read-only` is set, even if explicitly requested via `--tools`
388421
- 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
@@ -435,9 +468,11 @@ GITHUB_TOOLSETS="all" ./github-mcp-server
435468
```
436469

437470
#### "default" toolset
471+
438472
The default toolset `default` is the configuration that gets passed to the server if no toolsets are specified.
439473

440474
The default configuration is:
475+
441476
- context
442477
- repos
443478
- issues
@@ -833,7 +868,7 @@ The following sets of tools are available:
833868
- 'add' - add a sub-issue to a parent issue in a GitHub repository.
834869
- 'remove' - remove a sub-issue from a parent issue in a GitHub repository.
835870
- '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)
837872
- `owner`: Repository owner (string, required)
838873
- `replace_parent`: When true, replaces the sub-issue's current parent issue. Use with 'add' method only. (boolean, optional)
839874
- `repo`: Repository name (string, required)
@@ -1061,8 +1096,8 @@ The following sets of tools are available:
10611096

10621097
- **pull_request_read** - Get details for a single pull request
10631098
- **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:
10661101
1. get - Get details of a specific pull request.
10671102
2. get_diff - Get the diff of a pull request.
10681103
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:
13691404

13701405
<summary>Copilot</summary>
13711406

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)
13781413

13791414
</details>
13801415

13811416
<details>
13821417

13831418
<summary>Copilot Spaces</summary>
13841419

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
13881425

1389-
- **list_copilot_spaces** - List Copilot Spaces
13901426
</details>
13911427

13921428
<details>
13931429

13941430
<summary>GitHub Support Docs Search</summary>
13951431

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)
1434+
13981435
</details>
13991436

14001437
## Dynamic Tool Discovery

0 commit comments

Comments
 (0)