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
+18-34Lines changed: 18 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -424,7 +424,7 @@ The environment variable `GITHUB_TOOLSETS` takes precedence over the command lin
424
424
425
425
#### Specifying Individual Tools
426
426
427
-
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.
427
+
You can also configure specific tools using the `--tools` flag. Tools can be used independently or combined with toolsets for fine-grained control.
428
428
429
429
1.**Using Command Line Argument**:
430
430
@@ -446,17 +446,9 @@ You can also configure specific tools using the `--tools` flag. Tools can be use
446
446
447
447
This registers all tools from `repos` and `issues` toolsets, plus `get_gist`.
This registers `get_file_contents` plus the dynamic toolset tools (`enable_toolset`, `list_available_toolsets`, `get_toolset_tools`).
456
-
457
449
**Important Notes:**
458
450
459
-
- Tools, toolsets, and dynamic toolsets can all be used together
451
+
- Toolsand toolsets can be used together
460
452
- Read-only mode takes priority: write tools are skipped if `--read-only` is set, even if explicitly requested via `--tools`
461
453
- 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
462
454
- When tools are renamed, old names are preserved as aliases for backward compatibility. See [Tool Renaming](docs/tool-renaming.md) for details.
@@ -657,6 +649,8 @@ The following sets of tools are available:
-`owner`: The owner of the repository. (string, required)
717
+
-`page`: Page number for pagination (min 1) (number, optional)
718
+
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
723
719
-`repo`: The name of the repository. (string, required)
724
720
-`severity`: Filter dependabot alerts by severity (string, optional)
725
721
-`state`: Filter dependabot alerts by state. Defaults to open (string, optional)
@@ -1135,6 +1131,7 @@ The following sets of tools are available:
1135
1131
1136
1132
-**pull_request_read** - Get details for a single pull request
1137
1133
-**Required OAuth Scopes**: `repo`
1134
+
-`after`: Cursor for pagination, used only by the get_review_comments method. Pass the endCursor from the previous page's PageInfo to fetch the next page. (string, optional)
1138
1135
-`method`: Action to specify what pull request data needs to be retrieved from GitHub.
1139
1136
Possible options:
1140
1137
1. get - Get details of a specific pull request.
@@ -1326,9 +1323,17 @@ The following sets of tools are available:
1326
1323
-`order`: Sort order for results (string, optional)
1327
1324
-`page`: Page number for pagination (min 1) (number, optional)
1328
1325
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1329
-
-`query`: Search query using GitHub's powerful code search syntax. Examples: 'content:Skilllanguage:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more. (string, required)
1326
+
-`query`: Search query (GitHubcode search REST). Implicit AND between terms; supports `OR`, `NOT`, and `"quoted phrase"` for exact match. Qualifiers: `repo:owner/repo`, `org:`, `user:`, `language:`, `path:dir` (prefix match), `filename:exact.ext`, `extension:`, `in:file`, `in:path`, `size:`, `is:archived`, `is:fork`. Max 256 chars. Examples: `WithContext language:go org:github`; `"package main" repo:o/r`; `func extension:go path:cmd repo:o/r`; `NOT TODO language:go repo:o/r`. (string, required)
1330
1327
-`sort`: Sort field ('indexed' only) (string, optional)
1331
1328
1329
+
-**search_commits** - Search commits
1330
+
-**Required OAuth Scopes**: `repo`
1331
+
-`order`: Sort order (string, optional)
1332
+
-`page`: Page number for pagination (min 1) (number, optional)
1333
+
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1334
+
-`query`: Commit search query (GitHub commit search REST). Searches commit messages on the default branch only. Scope the search with `repo:owner/repo`, `org:`, or `user:` (queries without a scope qualifier match across all of GitHub and are usually not what you want). Other qualifiers: `author:`, `committer:`, `author-name:`, `committer-name:`, `author-email:`, `committer-email:`, `author-date:`, `committer-date:` (supports `>`, `<`, `>=`, `<=`, and `YYYY-MM-DD..YYYY-MM-DD` ranges), `merge:true|false`, `hash:`, `tree:`, `parent:`, `is:public`. Examples: `repo:owner/repo fix panic`; `org:github author:defunkt committer-date:>=2024-01-01`; `"refactor cache" repo:o/r`; `hash:abc1234 repo:o/r`. (string, required)
1335
+
-`sort`: Sort by author or committer date (defaults to best match) (string, optional)
1336
+
1332
1337
-**search_repositories** - Search repositories
1333
1338
-**Required OAuth Scopes**: `repo`
1334
1339
-`minimal_output`: Return minimal repository information (default: true). When false, returns full GitHub API repository objects. (boolean, optional)
@@ -1355,6 +1360,8 @@ The following sets of tools are available:
-`owner`: The owner of the repository. (string, required)
1363
+
-`page`: Page number for pagination (min 1) (number, optional)
1364
+
-`perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1358
1365
-`repo`: The name of the repository. (string, required)
1359
1366
-`resolution`: Filter by resolution (string, optional)
1360
1367
-`secret_type`: A comma-separated list of secret types to return. All default secret patterns are returned. To return generic patterns, pass the token name(s) in the parameter. (string, optional)
@@ -1485,29 +1492,6 @@ The following sets of tools are available:
1485
1492
1486
1493
</details>
1487
1494
1488
-
## Dynamic Tool Discovery
1489
-
1490
-
**Note**: This feature is currently in beta and is not available in the Remote GitHub MCP Server. Please test it out and let us know if you encounter any issues.
1491
-
1492
-
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 sheer number of tools available.
1493
-
1494
-
### Using Dynamic Tool Discovery
1495
-
1496
-
When using the binary, you can pass the `--dynamic-toolsets` flag.
1497
-
1498
-
```bash
1499
-
./github-mcp-server --dynamic-toolsets
1500
-
```
1501
-
1502
-
When using Docker, you can pass the toolsets as environment variables:
1503
-
1504
-
```bash
1505
-
docker run -i --rm \
1506
-
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1507
-
-e GITHUB_DYNAMIC_TOOLSETS=1 \
1508
-
ghcr.io/github/github-mcp-server
1509
-
```
1510
-
1511
1495
## Read-Only Mode
1512
1496
1513
1497
To run the server in read-only mode, you can use the `--read-only` flag. This will only offer read-only tools, preventing any modifications to repositories, issues, pull requests, etc.
fmt.Fprintf(&buf, "| %s | `context` | **Strongly recommended**: Tools that provide context about the current user and GitHub context you are operating in |\n", contextIcon)
146
146
147
147
// AvailableToolsets() returns toolsets that have tools, sorted by ID
148
-
// Exclude context (custom description above) and dynamic (internal only)
rootCmd.PersistentFlags().Bool("read-only", false, "Restrict the server to read-only operations")
170
167
rootCmd.PersistentFlags().String("log-file", "", "Path to log file")
171
168
rootCmd.PersistentFlags().Bool("enable-command-logging", false, "When enabled, the server will log all command requests and responses to the log file")
Copy file name to clipboardExpand all lines: docs/server-configuration.md
+1-56Lines changed: 1 addition & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ We currently support the following ways in which the GitHub MCP Server can be co
11
11
| Individual Tools |`X-MCP-Tools` header |`--tools` flag or `GITHUB_TOOLS` env var |
12
12
| Exclude Tools |`X-MCP-Exclude-Tools` header |`--exclude-tools` flag or `GITHUB_EXCLUDE_TOOLS` env var |
13
13
| Read-Only Mode |`X-MCP-Readonly` header or `/readonly` URL |`--read-only` flag or `GITHUB_READ_ONLY` env var |
14
-
| Dynamic Mode | Not available |`--dynamic-toolsets` flag or `GITHUB_DYNAMIC_TOOLSETS` env var |
15
14
| Lockdown Mode |`X-MCP-Lockdown` header |`--lockdown-mode` flag or `GITHUB_LOCKDOWN_MODE` env var |
16
15
| Insiders Mode |`X-MCP-Insiders` header or `/insiders` URL |`--insiders` flag or `GITHUB_INSIDERS` env var |
17
16
| Feature Flags |`X-MCP-Features` header |`--features` flag |
@@ -24,7 +23,7 @@ We currently support the following ways in which the GitHub MCP Server can be co
24
23
25
24
## How Configuration Works
26
25
27
-
All configuration options are **composable**: you can combine toolsets, individual tools, excluded tools, dynamic discovery, read-only mode and lockdown mode in any way that suits your workflow.
26
+
All configuration options are **composable**: you can combine toolsets, individual tools, excluded tools, read-only mode and lockdown mode in any way that suits your workflow.
28
27
29
28
Note: **read-only** mode acts as a strict security filter that takes precedence over any other configuration, by disabling write tools even when explicitly requested.
30
29
@@ -287,59 +286,6 @@ When active, this mode will disable all tools that are not read-only even if the
287
286
288
287
---
289
288
290
-
### Dynamic Discovery (Local Only)
291
-
292
-
**Best for:** Letting the LLM discover and enable toolsets as needed.
293
-
294
-
Starts with only discovery tools (`enable_toolset`, `list_available_toolsets`, `get_toolset_tools`), then expands on demand.
When both dynamic mode and specific tools are enabled in the server configuration, the server will start with the 3 dynamic tools + the specified tools.
340
-
341
-
---
342
-
343
289
### Lockdown Mode
344
290
345
291
**Best for:** Public repositories where you want to limit content from users without push access.
@@ -521,7 +467,6 @@ See [Scope Filtering](./scope-filtering.md) for details on how filtering works w
521
467
| Server fails to start | Invalid tool name in `--tools` or `X-MCP-Tools`| Check tool name spelling; use exact names from [Tools list](../README.md#tools)|
522
468
| Write tools not working | Read-only mode enabled | Remove `--read-only` flag or `X-MCP-Readonly` header |
523
469
| Tools missing | Toolset not enabled | Add the required toolset or specific tool |
524
-
| Dynamic tools not available | Using remote server | Dynamic mode is available in the local MCP server only |
0 commit comments