Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite8dbc48

Browse files
Update all documentation to use GITHUB_ACCESS_TOKEN
- Update README.md with GITHUB_ACCESS_TOKEN and deprecation notice- Update docs/server-configuration.md- Update all installation guides- Update script/conformance-test- Add note that server accepts any GitHub access token (PAT or OAuth)Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
1 parent15bac68 commite8dbc48

File tree

9 files changed

+50
-48
lines changed

9 files changed

+50
-48
lines changed

‎README.md‎

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ GitHub Enterprise Server does not support remote server hosting. Please refer to
132132

133133
1. To run the server in a container, you will need to have[Docker](https://www.docker.com/) installed.
134134
2. Once Docker is installed, you will also need to ensure Docker is running. The image is public; if you get errors on pull, you may have an expired token and need to`docker logout ghcr.io`.
135-
3. Lastly you will need to[Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new).
135+
3. Lastly you will need to[Create a GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) or use an OAuth token from your IDE/toolchain.
136136
The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out the[documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)).
137137

138+
>**Note**: The server accepts any valid GitHub access token (PAT or OAuth). The`GITHUB_ACCESS_TOKEN` environment variable is preferred over the deprecated`GITHUB_PERSONAL_ACCESS_TOKEN` variable.
139+
138140
<details><summary><b>Handling PATs Securely</b></summary>
139141

140142
###Environment Variables (Recommended)
@@ -158,11 +160,11 @@ To keep your GitHub PAT secure and reusable across different MCP hosts:
158160
3.**Reference the token in configurations**
159161
```bash
160162
# CLI usage
161-
claude mcp update github -eGITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT
163+
claude mcp update github -eGITHUB_ACCESS_TOKEN=$GITHUB_PAT
162164

163165
# In config files (where supported)
164166
"env": {
165-
"GITHUB_PERSONAL_ACCESS_TOKEN":"$GITHUB_PAT"
167+
"GITHUB_ACCESS_TOKEN":"$GITHUB_PAT"
166168
}
167169
```
168170

@@ -199,13 +201,13 @@ the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data r
199201
"-i",
200202
"--rm",
201203
"-e",
202-
"GITHUB_PERSONAL_ACCESS_TOKEN",
204+
"GITHUB_ACCESS_TOKEN",
203205
"-e",
204206
"GITHUB_HOST",
205207
"ghcr.io/github/github-mcp-server"
206208
],
207209
"env": {
208-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}",
210+
"GITHUB_ACCESS_TOKEN":"${input:github_token}",
209211
"GITHUB_HOST":"https://<your GHES or ghe.com domain name>"
210212
}
211213
}
@@ -242,11 +244,11 @@ Add the following JSON block to your IDE's MCP settings.
242244
"-i",
243245
"--rm",
244246
"-e",
245-
"GITHUB_PERSONAL_ACCESS_TOKEN",
247+
"GITHUB_ACCESS_TOKEN",
246248
"ghcr.io/github/github-mcp-server"
247249
],
248250
"env": {
249-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
251+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
250252
}
251253
}
252254
}
@@ -278,11 +280,11 @@ Optionally, you can add a similar example (i.e. without the mcp key) to a file c
278280
"-i",
279281
"--rm",
280282
"-e",
281-
"GITHUB_PERSONAL_ACCESS_TOKEN",
283+
"GITHUB_ACCESS_TOKEN",
282284
"ghcr.io/github/github-mcp-server"
283285
],
284286
"env": {
285-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
287+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
286288
}
287289
}
288290
}
@@ -308,7 +310,7 @@ For a complete overview of all installation options, see our **[Installation Gui
308310
###Build from source
309311

310312
If you don't have Docker, you can use`go build` to build the binary in the
311-
`cmd/github-mcp-server` directory, and use the`github-mcp-server stdio` command with the`GITHUB_PERSONAL_ACCESS_TOKEN` environment variable set to your token. To specify the output location of the build, use the`-o` flag. You should configure your server to use the built executable as its`command`. For example:
313+
`cmd/github-mcp-server` directory, and use the`github-mcp-server stdio` command with the`GITHUB_ACCESS_TOKEN` environment variable set to your token. To specify the output location of the build, use the`-o` flag. You should configure your server to use the built executable as its`command`. For example:
312314

313315
```JSON
314316
{
@@ -318,7 +320,7 @@ If you don't have Docker, you can use `go build` to build the binary in the
318320
"command":"/path/to/github-mcp-server",
319321
"args": ["stdio"],
320322
"env": {
321-
"GITHUB_PERSONAL_ACCESS_TOKEN":"<YOUR_TOKEN>"
323+
"GITHUB_ACCESS_TOKEN":"<YOUR_TOKEN>"
322324
}
323325
}
324326
}
@@ -392,7 +394,7 @@ When using Docker, you can pass the toolsets as environment variables:
392394

393395
```bash
394396
docker run -i --rm \
395-
-eGITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
397+
-eGITHUB_ACCESS_TOKEN=<your-token> \
396398
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" \
397399
ghcr.io/github/github-mcp-server
398400
```
@@ -404,13 +406,13 @@ When using Docker, you can pass specific tools as environment variables. You can
404406
```bash
405407
# Tools only
406408
docker run -i --rm \
407-
-eGITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
409+
-eGITHUB_ACCESS_TOKEN=<your-token> \
408410
-e GITHUB_TOOLS="get_file_contents,issue_read,create_pull_request" \
409411
ghcr.io/github/github-mcp-server
410412

411413
# Tools combined with toolsets (additive)
412414
docker run -i --rm \
413-
-eGITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
415+
-eGITHUB_ACCESS_TOKEN=<your-token> \
414416
-e GITHUB_TOOLSETS="repos,issues" \
415417
-e GITHUB_TOOLS="get_gist" \
416418
ghcr.io/github/github-mcp-server
@@ -1344,7 +1346,7 @@ When using Docker, you can pass the toolsets as environment variables:
13441346

13451347
```bash
13461348
docker run -i --rm \
1347-
-eGITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1349+
-eGITHUB_ACCESS_TOKEN=<your-token> \
13481350
-e GITHUB_DYNAMIC_TOOLSETS=1 \
13491351
ghcr.io/github/github-mcp-server
13501352
```
@@ -1361,7 +1363,7 @@ When using Docker, you can pass the read-only mode as an environment variable:
13611363

13621364
```bash
13631365
docker run -i --rm \
1364-
-eGITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1366+
-eGITHUB_ACCESS_TOKEN=<your-token> \
13651367
-e GITHUB_READ_ONLY=1 \
13661368
ghcr.io/github/github-mcp-server
13671369
```
@@ -1378,7 +1380,7 @@ When running with Docker, set the corresponding environment variable:
13781380

13791381
```bash
13801382
docker run -i --rm \
1381-
-eGITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
1383+
-eGITHUB_ACCESS_TOKEN=<your-token> \
13821384
-e GITHUB_LOCKDOWN_MODE=1 \
13831385
ghcr.io/github/github-mcp-server
13841386
```

‎docs/installation-guides/install-antigravity.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ If you prefer running the server locally with Docker:
8585
"-i",
8686
"--rm",
8787
"-e",
88-
"GITHUB_PERSONAL_ACCESS_TOKEN",
88+
"GITHUB_ACCESS_TOKEN",
8989
"ghcr.io/github/github-mcp-server"
9090
],
9191
"env": {
92-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
92+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
9393
}
9494
}
9595
}

‎docs/installation-guides/install-claude.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Aut
4545
###With Docker
4646
1. Run the following command in the Claude Code CLI:
4747
```bash
48-
claude mcp add github -eGITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT -- docker run -i --rm -eGITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
48+
claude mcp add github -eGITHUB_ACCESS_TOKEN=YOUR_GITHUB_PAT -- docker run -i --rm -eGITHUB_ACCESS_TOKEN ghcr.io/github/github-mcp-server
4949
```
5050

5151
With an environment variable:
5252
```bash
53-
claude mcp add github -eGITHUB_PERSONAL_ACCESS_TOKEN=$(grep GITHUB_PAT .env| cut -d'=' -f2) -- docker run -i --rm -eGITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
53+
claude mcp add github -eGITHUB_ACCESS_TOKEN=$(grep GITHUB_PAT .env| cut -d'=' -f2) -- docker run -i --rm -eGITHUB_ACCESS_TOKEN ghcr.io/github/github-mcp-server
5454
```
5555
2. Restart Claude Code
5656
3. Run`claude mcp list` to see if the GitHub server is configured
@@ -61,7 +61,7 @@ claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$(grep GITHUB_PAT .env | c
6161
2. Add to your`PATH`
6262
3. Run:
6363
```bash
64-
claude mcp add-json github'{"command": "github-mcp-server", "args": ["stdio"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"}}'
64+
claude mcp add-json github'{"command": "github-mcp-server", "args": ["stdio"], "env": {"GITHUB_ACCESS_TOKEN": "YOUR_GITHUB_PAT"}}'
6565
```
6666
2. Restart Claude Code
6767
3. Run`claude mcp list` to see if the GitHub server is configured
@@ -104,11 +104,11 @@ Add this codeblock to your `claude_desktop_config.json`:
104104
"-i",
105105
"--rm",
106106
"-e",
107-
"GITHUB_PERSONAL_ACCESS_TOKEN",
107+
"GITHUB_ACCESS_TOKEN",
108108
"ghcr.io/github/github-mcp-server"
109109
],
110110
"env": {
111-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
111+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
112112
}
113113
}
114114
}

‎docs/installation-guides/install-cursor.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ The local GitHub MCP server runs via Docker and requires Docker Desktop to be in
6161
"-i",
6262
"--rm",
6363
"-e",
64-
"GITHUB_PERSONAL_ACCESS_TOKEN",
64+
"GITHUB_ACCESS_TOKEN",
6565
"ghcr.io/github/github-mcp-server"
6666
],
6767
"env": {
68-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
68+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
6969
}
7070
}
7171
}

‎docs/installation-guides/install-gemini-cli.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ With docker running, you can run the GitHub MCP server in a container:
7272
"-i",
7373
"--rm",
7474
"-e",
75-
"GITHUB_PERSONAL_ACCESS_TOKEN",
75+
"GITHUB_ACCESS_TOKEN",
7676
"ghcr.io/github/github-mcp-server"
7777
],
7878
"env": {
79-
"GITHUB_PERSONAL_ACCESS_TOKEN":"$GITHUB_MCP_PAT"
79+
"GITHUB_ACCESS_TOKEN":"$GITHUB_MCP_PAT"
8080
}
8181
}
8282
}
@@ -97,7 +97,7 @@ Then, replacing `/path/to/binary` with the actual path to your binary, configure
9797
"command":"/path/to/binary",
9898
"args": ["stdio"],
9999
"env": {
100-
"GITHUB_PERSONAL_ACCESS_TOKEN":"$GITHUB_MCP_PAT"
100+
"GITHUB_ACCESS_TOKEN":"$GITHUB_MCP_PAT"
101101
}
102102
}
103103
}

‎docs/installation-guides/install-other-copilot-ides.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ For users who prefer to run the GitHub MCP server locally. Requires Docker insta
5656
"type":"stdio",
5757
"command":"docker",
5858
"args": [
59-
"run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN",
59+
"run","-i","--rm","-e","GITHUB_ACCESS_TOKEN",
6060
"ghcr.io/github/github-mcp-server"
6161
],
6262
"env": {
63-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_pat}"
63+
"GITHUB_ACCESS_TOKEN":"${input:github_pat}"
6464
}
6565
}
6666
}
@@ -116,11 +116,11 @@ For users who prefer to run the GitHub MCP server locally. Requires Docker insta
116116
"command":"docker",
117117
"args": [
118118
"run","-i","--rm",
119-
"-e","GITHUB_PERSONAL_ACCESS_TOKEN",
119+
"-e","GITHUB_ACCESS_TOKEN",
120120
"ghcr.io/github/github-mcp-server"
121121
],
122122
"env": {
123-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
123+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
124124
}
125125
}
126126
}
@@ -172,11 +172,11 @@ For users who prefer to run the GitHub MCP server locally. Requires Docker insta
172172
"command":"docker",
173173
"args": [
174174
"run","-i","--rm",
175-
"-e","GITHUB_PERSONAL_ACCESS_TOKEN",
175+
"-e","GITHUB_ACCESS_TOKEN",
176176
"ghcr.io/github/github-mcp-server"
177177
],
178178
"env": {
179-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
179+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
180180
}
181181
}
182182
}
@@ -229,11 +229,11 @@ For users who prefer to run the GitHub MCP server locally. Requires Docker insta
229229
"command":"docker",
230230
"args": [
231231
"run","-i","--rm",
232-
"-e","GITHUB_PERSONAL_ACCESS_TOKEN",
232+
"-e","GITHUB_ACCESS_TOKEN",
233233
"ghcr.io/github/github-mcp-server"
234234
],
235235
"env": {
236-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
236+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
237237
}
238238
}
239239
}

‎docs/installation-guides/install-windsurf.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ Windsurf supports Streamable HTTP servers with a `serverUrl` field:
4040
"-i",
4141
"--rm",
4242
"-e",
43-
"GITHUB_PERSONAL_ACCESS_TOKEN",
43+
"GITHUB_ACCESS_TOKEN",
4444
"ghcr.io/github/github-mcp-server"
4545
],
4646
"env": {
47-
"GITHUB_PERSONAL_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
47+
"GITHUB_ACCESS_TOKEN":"YOUR_GITHUB_PAT"
4848
}
4949
}
5050
}

‎docs/server-configuration.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The examples below use VS Code configuration format to illustrate the concepts.
6464
"--tools=get_file_contents,get_me,pull_request_read"
6565
],
6666
"env": {
67-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
67+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
6868
}
6969
}
7070
```
@@ -108,7 +108,7 @@ The examples below use VS Code configuration format to illustrate the concepts.
108108
"--toolsets=issues,pull_requests"
109109
],
110110
"env": {
111-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
111+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
112112
}
113113
}
114114
```
@@ -156,7 +156,7 @@ Enable entire toolsets, then add individual tools from toolsets you don't want f
156156
"--tools=get_gist,pull_request_read"
157157
],
158158
"env": {
159-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
159+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
160160
}
161161
}
162162
```
@@ -217,7 +217,7 @@ When active, this mode will disable all tools that are not read-only even if the
217217
"--read-only"
218218
],
219219
"env": {
220-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
220+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
221221
}
222222
}
223223
```
@@ -252,7 +252,7 @@ Starts with only discovery tools (`enable_toolset`, `list_available_toolsets`, `
252252
"--dynamic-toolsets"
253253
],
254254
"env": {
255-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
255+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
256256
}
257257
}
258258
```
@@ -270,7 +270,7 @@ Starts with only discovery tools (`enable_toolset`, `list_available_toolsets`, `
270270
"--tools=get_me,search_code"
271271
],
272272
"env": {
273-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
273+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
274274
}
275275
}
276276
```
@@ -319,7 +319,7 @@ Lockdown mode ensures the server only surfaces content in public repositories fr
319319
"--lockdown-mode"
320320
],
321321
"env": {
322-
"GITHUB_PERSONAL_ACCESS_TOKEN":"${input:github_token}"
322+
"GITHUB_ACCESS_TOKEN":"${input:github_token}"
323323
}
324324
}
325325
```

‎script/conformance-test‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ run_mcp_test() {
124124
echo"$LIST_RESOURCES_MSG"
125125
echo"$LIST_PROMPTS_MSG"
126126
sleep 0.5
127-
)|GITHUB_PERSONAL_ACCESS_TOKEN=1$binary stdio$flags2>/dev/null
127+
)|GITHUB_ACCESS_TOKEN=1$binary stdio$flags2>/dev/null
128128
)
129129

130130
end_time=$(date +%s.%N)
@@ -182,7 +182,7 @@ run_mcp_dynamic_test() {
182182
sleep 0.1
183183
echo"$LIST_TOOLSETS_AFTER_MSG"
184184
sleep 0.3
185-
)|GITHUB_PERSONAL_ACCESS_TOKEN=1$binary stdio$flags2>/dev/null
185+
)|GITHUB_ACCESS_TOKEN=1$binary stdio$flags2>/dev/null
186186
)
187187

188188
end_time=$(date +%s.%N)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp