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
@@ -19,13 +19,11 @@ automation and interaction capabilities for developers and tools.
19
19
3. Lastly you will need to[Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new).
20
20
The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out the[documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)).
21
21
22
-
23
-
24
22
##Installation
25
23
26
24
###Usage with VS Code
27
25
28
-
For quick installation, use one of the one-click install buttons at the top of this README.
26
+
For quick installation, use one of the one-click install buttons at the top of this README. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.
29
27
30
28
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing`Ctrl + Shift + P` and typing`Preferences: Open User Settings (JSON)`.
31
29
@@ -110,9 +108,91 @@ If you don't have Docker, you can use `go build` to build the binary in the
110
108
}
111
109
```
112
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
+
113
193
##GitHub Enterprise Server
114
194
115
-
The flag`--gh-host` and the environment variable`GH_HOST` can be used to set
195
+
The flag`--gh-host` and the environment variable`GITHUB_HOST` can be used to set
116
196
the GitHub Enterprise Server hostname.
117
197
118
198
##i18n / Overriding Descriptions
@@ -331,7 +411,6 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
331
411
###Repositories
332
412
333
413
-**create_or_update_file** - Create or update a single file in a repository
334
-
335
414
-`owner`: Repository owner (string, required)
336
415
-`repo`: Repository name (string, required)
337
416
-`path`: File path (string, required)
@@ -341,50 +420,43 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
341
420
-`sha`: File SHA if updating (string, optional)
342
421
343
422
-**list_branches** - List branches in a GitHub repository
344
-
345
423
-`owner`: Repository owner (string, required)
346
424
-`repo`: Repository name (string, required)
347
425
-`page`: Page number (number, optional)
348
426
-`perPage`: Results per page (number, optional)
349
427
350
428
-**push_files** - Push multiple files in a single commit
351
-
352
429
-`owner`: Repository owner (string, required)
353
430
-`repo`: Repository name (string, required)
354
431
-`branch`: Branch to push to (string, required)
355
432
-`files`: Files to push, each with path and content (array, required)
356
433
-`message`: Commit message (string, required)
357
434
358
435
-**search_repositories** - Search for GitHub repositories
359
-
360
436
-`query`: Search query (string, required)
361
437
-`sort`: Sort field (string, optional)
362
438
-`order`: Sort order (string, optional)
363
439
-`page`: Page number (number, optional)
364
440
-`perPage`: Results per page (number, optional)
365
441
366
442
-**create_repository** - Create a new GitHub repository
Copy file name to clipboardExpand all lines: pkg/github/code_scanning.go
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,16 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
86
86
mcp.Description("The Git reference for the results you want to list."),
87
87
),
88
88
mcp.WithString("state",
89
-
mcp.Description("State of thecode scanning alertsto list. Set to closed to list only closed code scanning alerts. Default: open"),
89
+
mcp.Description("Filtercode scanning alertsby state. Defaults to open"),
90
90
mcp.DefaultString("open"),
91
+
mcp.Enum("open","closed","dismissed","fixed"),
91
92
),
92
93
mcp.WithString("severity",
93
-
mcp.Description("Only code scanning alerts with this severity will be returned. Possible values are: critical, high, medium, low, warning, note, error."),
94
+
mcp.Description("Filter code scanning alerts by severity"),