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
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,23 @@ docker run -i --rm \
219
219
ghcr.io/github/github-mcp-server
220
220
```
221
221
222
+
## Read-Only Mode
223
+
224
+
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.
225
+
226
+
```bash
227
+
./github-mcp-server --read-only
228
+
```
229
+
230
+
When using Docker, you can pass the read-only mode as an environment variable:
231
+
232
+
```bash
233
+
docker run -i --rm \
234
+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
235
+
-e GITHUB_READ_ONLY=1 \
236
+
ghcr.io/github/github-mcp-server
237
+
```
238
+
222
239
## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
223
240
224
241
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set
Copy file name to clipboardExpand all lines: pkg/github/context_tools.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Too
14
14
mcp.WithDescription(t("TOOL_GET_ME_DESCRIPTION", "Get details of the authenticated GitHub user. Use this when a request includes \"me\", \"my\". The output will not change unless the user changes their profile, so only call this once.")),
15
15
mcp.WithToolAnnotation(mcp.ToolAnnotation{
16
16
Title: t("TOOL_GET_ME_USER_TITLE", "Get my user profile"),
17
-
ReadOnlyHint: toBoolPtr(true),
17
+
ReadOnlyHint: ToBoolPtr(true),
18
18
}),
19
19
mcp.WithString("reason",
20
20
mcp.Description("Optional: the reason for requesting the user information"),
@@ -64,7 +64,7 @@ func ListAvailableToolsets(toolsetGroup *toolsets.ToolsetGroup, t translations.T
64
64
mcp.WithDescription(t("TOOL_LIST_AVAILABLE_TOOLSETS_DESCRIPTION", "List all available toolsets this GitHub MCP server can offer, providing the enabled status of each. Use this when a task could be achieved with a GitHub tool and the currently available tools aren't enough. Call get_toolset_tools with these toolset names to discover specific tools you can call")),
65
65
mcp.WithToolAnnotation(mcp.ToolAnnotation{
66
66
Title: t("TOOL_LIST_AVAILABLE_TOOLSETS_USER_TITLE", "List available toolsets"),
@@ -98,7 +98,7 @@ func GetToolsetsTools(toolsetGroup *toolsets.ToolsetGroup, t translations.Transl
98
98
mcp.WithDescription(t("TOOL_GET_TOOLSET_TOOLS_DESCRIPTION", "Lists all the capabilities that are enabled with the specified toolset, use this to get clarity on whether enabling a toolset would help you to complete a task")),
99
99
mcp.WithToolAnnotation(mcp.ToolAnnotation{
100
100
Title: t("TOOL_GET_TOOLSET_TOOLS_USER_TITLE", "List all tools in a toolset"),
101
-
ReadOnlyHint: toBoolPtr(true),
101
+
ReadOnlyHint: ToBoolPtr(true),
102
102
}),
103
103
mcp.WithString("toolset",
104
104
mcp.Required(),
@@ -108,7 +108,7 @@ func GetToolsetsTools(toolsetGroup *toolsets.ToolsetGroup, t translations.Transl
0 commit comments