Skip to content

Commit e905d0f

Browse files
authored
Merge branch 'main' into issue-461
2 parents 5a75247 + 392df2d commit e905d0f

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,23 @@ docker run -i --rm \
278278
ghcr.io/github/github-mcp-server
279279
```
280280

281+
## Read-Only Mode
282+
283+
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.
284+
285+
```bash
286+
./github-mcp-server --read-only
287+
```
288+
289+
When using Docker, you can pass the read-only mode as an environment variable:
290+
291+
```bash
292+
docker run -i --rm \
293+
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
294+
-e GITHUB_READ_ONLY=1 \
295+
ghcr.io/github/github-mcp-server
296+
```
297+
281298
## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
282299

283300
The flag `--gh-host` and the environment variable `GITHUB_HOST` can be used to set

pkg/github/code_scanning.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
9090
mcp.Required(),
9191
mcp.Description("The name of the repository."),
9292
),
93-
mcp.WithString("ref",
94-
mcp.Description("The Git reference for the results you want to list."),
95-
),
9693
mcp.WithString("state",
9794
mcp.Description("Filter code scanning alerts by state. Defaults to open"),
9895
mcp.DefaultString("open"),
9996
mcp.Enum("open", "closed", "dismissed", "fixed"),
10097
),
98+
mcp.WithString("ref",
99+
mcp.Description("The Git reference for the results you want to list."),
100+
),
101101
mcp.WithString("severity",
102102
mcp.Description("Filter code scanning alerts by severity"),
103103
mcp.Enum("critical", "high", "medium", "low", "warning", "note", "error"),

0 commit comments

Comments
 (0)