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
+85-12Lines changed: 85 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,88 @@ If you don't have Docker, you can use `go build` to build the binary in the
108
108
}
109
109
```
110
110
111
+
## Tool Configuration
112
+
113
+
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.
114
+
115
+
### Available Toolsets
116
+
117
+
The following sets of tools are available (all are on by default):
The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
159
+
160
+
```bash
161
+
./github-mcp-server --toolsets all
162
+
```
163
+
164
+
Or using the environment variable:
165
+
166
+
```bash
167
+
GITHUB_TOOLSETS="all" ./github-mcp-server
168
+
```
169
+
170
+
## Dynamic Tool Discovery
171
+
172
+
**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.
173
+
174
+
Instead of starting with all tools enabled, you can turn on dynamic toolset discovery. Dynamic toolsets allow the MCP host to list and enable toolsets in response to a user prompt. This should help to avoid situations where the model gets confused by the shear number of tools available.
175
+
176
+
### Using Dynamic Tool Discovery
177
+
178
+
When using the binary, you can pass the `--dynamic-toolsets` flag.
179
+
180
+
```bash
181
+
./github-mcp-server --dynamic-toolsets
182
+
```
183
+
184
+
When using Docker, you can pass the toolsets as environment variables:
185
+
186
+
```bash
187
+
docker run -i --rm \
188
+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
189
+
-e GITHUB_DYNAMIC_TOOLSETS=1 \
190
+
ghcr.io/github/github-mcp-server
191
+
```
192
+
111
193
## GitHub Enterprise Server
112
194
113
195
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set
@@ -330,7 +412,6 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
330
412
### Repositories
331
413
332
414
-**create_or_update_file** - Create or update a single file in a repository
333
-
334
415
-`owner`: Repository owner (string, required)
335
416
-`repo`: Repository name (string, required)
336
417
-`path`: File path (string, required)
@@ -340,50 +421,43 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
340
421
-`sha`: File SHA if updating (string, optional)
341
422
342
423
-**list_branches** - List branches in a GitHub repository
343
-
344
424
-`owner`: Repository owner (string, required)
345
425
-`repo`: Repository name (string, required)
346
426
-`page`: Page number (number, optional)
347
427
-`perPage`: Results per page (number, optional)
348
428
349
429
-**push_files** - Push multiple files in a single commit
350
-
351
430
-`owner`: Repository owner (string, required)
352
431
-`repo`: Repository name (string, required)
353
432
-`branch`: Branch to push to (string, required)
354
433
-`files`: Files to push, each with path and content (array, required)
355
434
-`message`: Commit message (string, required)
356
435
357
436
-**search_repositories** - Search for GitHub repositories
358
-
359
437
-`query`: Search query (string, required)
360
438
-`sort`: Sort field (string, optional)
361
439
-`order`: Sort order (string, optional)
362
440
-`page`: Page number (number, optional)
363
441
-`perPage`: Results per page (number, optional)
364
442
365
443
-**create_repository** - Create a new GitHub repository
"description": "position of the comment in the diff",
1001
1001
},
1002
1002
"line": map[string]interface{}{
1003
-
"type": "number",
1003
+
"type": []string{"number", "null"},
1004
1004
"description": "line number in the file to comment on. For multi-line comments, the end of the line range",
1005
1005
},
1006
1006
"side": map[string]interface{}{
1007
-
"type": "string",
1007
+
"type": []string{"string", "null"},
1008
1008
"description": "The side of the diff on which the line resides. For multi-line comments, this is the side for the end of the line range. (LEFT or RIGHT)",
1009
1009
},
1010
1010
"start_line": map[string]interface{}{
1011
-
"type": "number",
1011
+
"type": []string{"number", "null"},
1012
1012
"description": "The first line of the range to which the comment refers. Required for multi-line comments.",
1013
1013
},
1014
1014
"start_side": map[string]interface{}{
1015
-
"type": "string",
1015
+
"type": []string{"string", "null"},
1016
1016
"description": "The side of the diff on which the start line resides for multi-line comments. (LEFT or RIGHT)",
0 commit comments