Skip to content

Commit 392df2d

Browse files
authored
docs: add read-only instruction to readme (#490)
1 parent c141bf4 commit 392df2d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

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

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+
222239
## GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
223240

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

0 commit comments

Comments
 (0)