Skip to content

Commit a6bc5f6

Browse files
committed
docs: document strict toolset validation in README and server configuration guide
1 parent deeabef commit a6bc5f6

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,24 @@ To specify toolsets you want available to the LLM, you can pass an allow-list in
422422

423423
The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
424424

425+
#### Strict Toolset Validation
426+
427+
You can enable strict validation to fail fast when configuration includes unknown toolset names.
428+
429+
1. **Using Command Line Argument**:
430+
431+
```bash
432+
github-mcp-server --toolsets repos,issues --strict-toolsets
433+
```
434+
435+
2. **Using Environment Variable**:
436+
437+
```bash
438+
GITHUB_TOOLSETS="repos,issues" GITHUB_STRICT_TOOLSETS=true ./github-mcp-server
439+
```
440+
441+
When enabled, startup returns an error if any configured toolset name is invalid.
442+
425443
#### Specifying Individual Tools
426444

427445
You can also configure specific tools using the `--tools` flag. Tools can be used independently or combined with toolsets and dynamic toolsets discovery for fine-grained control.
@@ -469,6 +487,7 @@ When using Docker, you can pass the toolsets as environment variables:
469487
docker run -i --rm \
470488
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
471489
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" \
490+
-e GITHUB_STRICT_TOOLSETS=true \
472491
ghcr.io/github/github-mcp-server
473492
```
474493

docs/server-configuration.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ We currently support the following ways in which the GitHub MCP Server can be co
1212
| Exclude Tools | `X-MCP-Exclude-Tools` header | `--exclude-tools` flag or `GITHUB_EXCLUDE_TOOLS` env var |
1313
| Read-Only Mode | `X-MCP-Readonly` header or `/readonly` URL | `--read-only` flag or `GITHUB_READ_ONLY` env var |
1414
| Dynamic Mode | Not available | `--dynamic-toolsets` flag or `GITHUB_DYNAMIC_TOOLSETS` env var |
15+
| Strict Toolset Validation | Not available | `--strict-toolsets` flag or `GITHUB_STRICT_TOOLSETS` env var |
1516
| Lockdown Mode | `X-MCP-Lockdown` header | `--lockdown-mode` flag or `GITHUB_LOCKDOWN_MODE` env var |
1617
| Insiders Mode | `X-MCP-Insiders` header or `/insiders` URL | `--insiders` flag or `GITHUB_INSIDERS` env var |
1718
| Scope Filtering | Always enabled | Always enabled |
@@ -124,6 +125,58 @@ The examples below use VS Code configuration format to illustrate the concepts.
124125

125126
---
126127

128+
### Strict Toolset Validation (Local Only)
129+
130+
**Best for:** Users who want startup to fail fast on invalid toolset names (for example, catching typos in CI or shared config files).
131+
132+
When enabled, the local server validates configured toolsets at startup and returns an error if any toolset name is unknown.
133+
134+
<table>
135+
<tr><th>Local Server Only</th></tr>
136+
<tr valign="top">
137+
<td>
138+
139+
```json
140+
{
141+
"type": "stdio",
142+
"command": "go",
143+
"args": [
144+
"run",
145+
"./cmd/github-mcp-server",
146+
"stdio",
147+
"--toolsets=issues,pull_requests",
148+
"--strict-toolsets"
149+
],
150+
"env": {
151+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
152+
}
153+
}
154+
```
155+
156+
**Using environment variable instead of flag:**
157+
```json
158+
{
159+
"type": "stdio",
160+
"command": "go",
161+
"args": [
162+
"run",
163+
"./cmd/github-mcp-server",
164+
"stdio",
165+
"--toolsets=issues,pull_requests"
166+
],
167+
"env": {
168+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}",
169+
"GITHUB_STRICT_TOOLSETS": "true"
170+
}
171+
}
172+
```
173+
174+
</td>
175+
</tr>
176+
</table>
177+
178+
---
179+
127180
### Enabling Toolsets + Tools
128181

129182
**Best for:** Users who want broad functionality from some areas, plus specific tools from others.

0 commit comments

Comments
 (0)