Skip to content

Commit b0bcb21

Browse files
chore: update readme
1 parent 30ce29b commit b0bcb21

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

Diff for: README.md

+69
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,75 @@ If you don't have Docker, you can use `go` to build the binary in the
9696
command with the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to
9797
your token.
9898

99+
## Tool Configuration
100+
101+
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.
102+
103+
### Available Toolsets
104+
105+
The following sets of tools are available:
106+
107+
| Toolset | Description | Default Status |
108+
| --------------- | ------------------------------------------------------------- | -------------- |
109+
| `repos` | Repository-related tools (file operations, branches, commits) | Enabled |
110+
| `issues` | Issue-related tools (create, read, update, comment) | Enabled |
111+
| `search` | Search functionality (code, repositories, users) | Enabled |
112+
| `pull_requests` | Pull request operations (create, merge, review) | Enabled |
113+
| `code_security` | Code scanning alerts and security features | Disabled |
114+
| `experiments` | Experimental features (not considered stable) | Disabled |
115+
| `everything` | Special flag to enable all features | Disabled |
116+
117+
### Specifying Toolsets
118+
119+
You can enable specific features in two ways:
120+
121+
1. **Using Command Line Argument**:
122+
123+
```bash
124+
github-mcp-server --toolsets repos,issues,pull_requests,code_security
125+
```
126+
127+
2. **Using Environment Variable**:
128+
```bash
129+
GITHUB_TOOLSETS="repos,issues,pull_requests,code_security" ./github-mcp-server
130+
```
131+
132+
The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
133+
134+
### Default Enabled Toolsets
135+
136+
By default, the following toolsets are enabled:
137+
138+
- `repos`
139+
- `issues`
140+
- `pull_requests`
141+
- `search`
142+
143+
### Using With Docker
144+
145+
When using Docker, you can pass the toolsets as environment variables:
146+
147+
```bash
148+
docker run -i --rm \
149+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
150+
-e GITHUB_TOOLSETS="repos,issues,pull_requests,code_security,experiments" \
151+
ghcr.io/github/github-mcp-server
152+
```
153+
154+
### The "everything" Toolset
155+
156+
The special toolset `everything` can be provided to enable all available features regardless of any other toolsets passed:
157+
158+
```bash
159+
./github-mcp-server --toolsets everything
160+
```
161+
162+
Or using the environment variable:
163+
164+
```bash
165+
GITHUB_TOOLSETS="everything" ./github-mcp-server
166+
```
167+
99168
## GitHub Enterprise Server
100169

101170
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set

Diff for: cmd/github-mcp-server/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func initToolsets(passedToolsets []string) (*toolsets.ToolsetGroup, error) {
8484
// fs.AddFeature("gists", "Gist related tools", false)
8585

8686
// Env gets precedence over command line flags
87-
if envFeats := os.Getenv("GITHUB_FEATURES"); envFeats != "" {
87+
if envFeats := os.Getenv("GITHUB_TOOLSETS"); envFeats != "" {
8888
passedToolsets = []string{}
8989
// Split envFeats by comma, trim whitespace, and add to the slice
9090
for _, feature := range strings.Split(envFeats, ",") {

0 commit comments

Comments
 (0)