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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
@@ -108,9 +108,91 @@ If you don't have Docker, you can use `go build` to build the binary in the
}
```
## Tool Configuration
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.
### Available Toolsets
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:
```bash
./github-mcp-server --toolsets all
```
Or using the environment variable:
```bash
GITHUB_TOOLSETS="all" ./github-mcp-server
```
## Dynamic Tool Discovery
**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.
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.
### Using Dynamic Tool Discovery
When using the binary, you can pass the `--dynamic-toolsets` flag.
```bash
./github-mcp-server --dynamic-toolsets
```
When using Docker, you can pass the toolsets as environment variables:
```bash
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_DYNAMIC_TOOLSETS=1 \
ghcr.io/github/github-mcp-server
```
## GitHub Enterprise Server
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
the GitHub Enterprise Server hostname.
## i18n / Overriding Descriptions
Expand DownExpand Up
@@ -329,7 +411,6 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
### Repositories
- **create_or_update_file** - Create or update a single file in a repository
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `path`: File path (string, required)
Expand All
@@ -339,50 +420,43 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `sha`: File SHA if updating (string, optional)
- **list_branches** - List branches in a GitHub repository
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `page`: Page number (number, optional)
- `perPage`: Results per page (number, optional)
- **push_files** - Push multiple files in a single commit
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `branch`: Branch to push to (string, required)
- `files`: Files to push, each with path and content (array, required)
- `message`: Commit message (string, required)
- **search_repositories** - Search for GitHub repositories
- `query`: Search query (string, required)
- `sort`: Sort field (string, optional)
- `order`: Sort order (string, optional)
- `page`: Page number (number, optional)
- `perPage`: Results per page (number, optional)
- **create_repository** - Create a new GitHub repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
"description": "position of the comment in the diff",
},
"line": map[string]interface{}{
"type": "number",
"type":[]string{"number", "null"},
"description": "line number in the file to comment on. For multi-line comments, the end of the line range",
},
"side": map[string]interface{}{
"type": "string",
"type":[]string{"string", "null"},
"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)",
},
"start_line": map[string]interface{}{
"type": "number",
"type":[]string{"number", "null"},
"description": "The first line of the range to which the comment refers. Required for multi-line comments.",
},
"start_side": map[string]interface{}{
"type": "string",
"type":[]string{"string", "null"},
"description": "The side of the diff on which the start line resides for multi-line comments. (LEFT or RIGHT)",
},
"body": map[string]interface{}{
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.