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
The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
331
-
332
-
```bash
333
-
./github-mcp-server --toolsets all
334
-
```
335
-
336
-
Or using the environment variable:
337
-
338
-
```bash
339
-
GITHUB_TOOLSETS="all" ./github-mcp-server
340
-
```
341
-
342
-
## Dynamic Tool Discovery
343
-
344
-
**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.
345
-
346
-
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.
347
-
348
-
### Using Dynamic Tool Discovery
349
-
350
-
When using the binary, you can pass the `--dynamic-toolsets` flag.
351
-
352
-
```bash
353
-
./github-mcp-server --dynamic-toolsets
354
-
```
355
-
356
-
When using Docker, you can pass the toolsets as environment variables:
357
-
358
-
```bash
359
-
docker run -i --rm \
360
-
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
361
-
-e GITHUB_DYNAMIC_TOOLSETS=1 \
362
-
ghcr.io/github/github-mcp-server
363
-
```
364
-
365
-
## Read-Only Mode
366
-
367
-
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.
368
-
369
-
```bash
370
-
./github-mcp-server --read-only
371
-
```
372
-
373
-
When using Docker, you can pass the read-only mode as an environment variable:
374
-
375
-
```bash
376
-
docker run -i --rm \
377
-
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
378
-
-e GITHUB_READ_ONLY=1 \
379
-
ghcr.io/github/github-mcp-server
380
-
```
381
-
382
-
## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
383
-
384
-
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
385
-
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
386
-
387
-
- For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
388
-
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
The special toolset `all` can be provided to enable all available toolsets regardless of any other configuration:
900
+
901
+
```bash
902
+
./github-mcp-server --toolsets all
903
+
```
904
+
905
+
Or using the environment variable:
906
+
907
+
```bash
908
+
GITHUB_TOOLSETS="all" ./github-mcp-server
909
+
```
910
+
911
+
## Dynamic Tool Discovery
912
+
913
+
**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.
914
+
915
+
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.
916
+
917
+
### Using Dynamic Tool Discovery
918
+
919
+
When using the binary, you can pass the `--dynamic-toolsets` flag.
920
+
921
+
```bash
922
+
./github-mcp-server --dynamic-toolsets
923
+
```
924
+
925
+
When using Docker, you can pass the toolsets as environment variables:
926
+
927
+
```bash
928
+
docker run -i --rm \
929
+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
930
+
-e GITHUB_DYNAMIC_TOOLSETS=1 \
931
+
ghcr.io/github/github-mcp-server
932
+
```
933
+
934
+
## Read-Only Mode
935
+
936
+
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.
937
+
938
+
```bash
939
+
./github-mcp-server --read-only
940
+
```
941
+
942
+
When using Docker, you can pass the read-only mode as an environment variable:
943
+
944
+
```bash
945
+
docker run -i --rm \
946
+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
947
+
-e GITHUB_READ_ONLY=1 \
948
+
ghcr.io/github/github-mcp-server
949
+
```
950
+
951
+
## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
952
+
953
+
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
954
+
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
955
+
956
+
- For GitHub Enterprise Server, prefix the hostname with the `https://` URI scheme, as it otherwise defaults to `http://`, which GitHub Enterprise Server does not support.
957
+
- For GitHub Enterprise Cloud with data residency, use `https://YOURSUBDOMAIN.ghe.com` as the hostname.
"GITHUB_HOST": "https://<your GHES or ghe.com domain name>"
974
+
}
975
+
}
976
+
```
977
+
978
+
## i18n / Overriding Descriptions
979
+
980
+
The descriptions of the tools can be overridden by creating a
981
+
`github-mcp-server-config.json` file in the same directory as the binary.
982
+
983
+
The file should contain a JSON object with the tool names as keys and the new
984
+
descriptions as values. For example:
985
+
986
+
```json
987
+
{
988
+
"TOOL_ADD_ISSUE_COMMENT_DESCRIPTION": "an alternative description",
989
+
"TOOL_CREATE_BRANCH_DESCRIPTION": "Create a new branch in a GitHub repository"
990
+
}
991
+
```
992
+
993
+
You can create an export of the current translations by running the binary with
994
+
the `--export-translations` flag.
995
+
996
+
This flag will preserve any translations/overrides you have made, while adding
997
+
any new translations that have been added to the binary since the last time you
998
+
exported.
999
+
1000
+
```sh
1001
+
./github-mcp-server --export-translations
1002
+
cat github-mcp-server-config.json
1003
+
```
1004
+
1005
+
You can also use ENV vars to override the descriptions. The environment
1006
+
variable names are the same as the keys in the JSON file, prefixed with
1007
+
`GITHUB_MCP_` and all uppercase.
1008
+
1009
+
For example, to override the `TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` tool, you can
1010
+
set the following environment variable:
1011
+
1012
+
```sh
1013
+
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
1014
+
```
1015
+
1016
1016
## Library Usage
1017
1017
1018
1018
The exported Go API of this module should currently be considered unstable, and subject to breaking changes. In the future, we may offer stability; please file an issue if there is a use case where this would be valuable.
0 commit comments