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
@@ -7,6 +7,120 @@ GitHub MCP Server implemented in Go.
7
7
Create a GitHub Personal Access Token with the appropriate permissions
8
8
and set it as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
9
9
10
+
##Testing on VS Code Insiders
11
+
12
+
###Requirements
13
+
14
+
You can either use a Docker image or build the binary from the repo.
15
+
16
+
####Docker image
17
+
18
+
As of now, this repo is private, and hence the docker image is not available publicly. To pull it,
19
+
you need to make sure you can access the GitHub docker registry. See[this](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic)
20
+
for more details.
21
+
22
+
To make sure you can access the GitHub docker registry, run the following command:
23
+
24
+
```bash
25
+
docker pull ghcr.io/github/github-mcp-server:main
26
+
```
27
+
28
+
If the above command works, you are good to go.
29
+
30
+
####Build from repo
31
+
First, install`github-mcp-server` by cloning the repo and running the following command:
32
+
33
+
```bash
34
+
go install ./cmd/github-mcp-server
35
+
```
36
+
37
+
If you don't want to clone the repo, you can run:
38
+
39
+
```bash
40
+
GOPRIVATE=github.com/github go install github.com/github/github-mcp-server/cmd/github-mcp-server@latest
41
+
```
42
+
43
+
This will install the`github-mcp-server` binary in your`$GOPATH/bin` directory.
44
+
45
+
Find where the binary is installed by running:
46
+
47
+
```bash
48
+
# note this assumes $GOPATH/bin is in your $PATH
49
+
which github-mcp-server
50
+
```
51
+
52
+
###Start VS Code Insiders
53
+
54
+
Start VS Code Insiders and make sure you pass the`GITHUB_PERSONAL_ACCESS_TOKEN` environment variable to the process.
55
+
56
+
One way to do this is to make sure that[you can run VS code from your terminal](https://code.visualstudio.com/docs/setup/mac#_launch-vs-code-from-the-command-line) and
Another way is to set the environment variable in your shell configuration file (e.g.,`.bashrc`,`.zshrc`, etc.).
65
+
66
+
Run**Preferences: Open User Settings (JSON)**, and create or append to the`mcp` setting:
67
+
68
+
If you are using the docker image, use this configuration:
69
+
70
+
```json
71
+
{
72
+
"mcp": {
73
+
"inputs": [],
74
+
"servers": {
75
+
"github-mcp-server": {
76
+
"type":"stdio",
77
+
"command":"docker",
78
+
"args": [
79
+
"run",
80
+
"-i",
81
+
"--rm",
82
+
"-e",
83
+
"GITHUB_PERSONAL_ACCESS_TOKEN",
84
+
"ghcr.io/github/github-mcp-server:main"
85
+
],
86
+
"env": {}
87
+
}
88
+
}
89
+
}
90
+
}
91
+
```
92
+
93
+
If you built the binary from the repo use this configuration:
94
+
95
+
```json
96
+
{
97
+
"mcp": {
98
+
"inputs": [ ],
99
+
"servers": {
100
+
"mcp-github-server": {
101
+
"command":"path-to-your/github-mcp-server",
102
+
"args": ["stdio"],
103
+
"env": { }
104
+
}
105
+
}
106
+
}
107
+
}
108
+
```
109
+
110
+
Right on top of`servers`, you should see a`Start` link to start the server.
111
+
112
+
113
+
Try something like the following prompt to verify that it works:
114
+
115
+
```
116
+
I'd like to know more about my GitHub profile.
117
+
```
118
+
119
+
##GitHub Enterprise Server
120
+
121
+
The flag`--gh-host` and the environment variable`GH_HOST` can be used to set the GitHub Enterprise Server hostname.
122
+
123
+
10
124
##Tools
11
125
12
126
###Users
@@ -349,123 +463,9 @@ For example, to override the `TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` tool, you can
349
463
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
350
464
```
351
465
352
-
## Testing on VS Code Insiders
353
-
354
-
### Requirements
355
-
356
-
You can either use a Docker image or build the binary from the repo.
357
-
358
-
#### Docker image
359
-
360
-
As of now, this repo is private and hence the docker image is not available publicly. To pull it,
361
-
you need to make sure you can access the GitHub docker registry. See [this](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic)
362
-
for more details.
363
-
364
-
To make sure you can access the GitHub docker registry, run the following command:
365
-
366
-
```bash
367
-
docker pull ghcr.io/github/github-mcp-server:main
368
-
```
369
-
370
-
If the abovecommand works, you are good to go.
371
-
372
-
#### Build from repo
373
-
First of all, install`github-mcp-server` by cloning the repo and running the following command:
374
-
375
-
```bash
376
-
go install ./cmd/github-mcp-server
377
-
```
378
-
379
-
If you don't want to clone the repo, you can run:
380
-
381
-
```bash
382
-
GOPRIVATE=github.com/github go install github.com/github/github-mcp-server/cmd/github-mcp-server@latest
383
-
```
384
-
385
-
This will install the `github-mcp-server` binary in your `$GOPATH/bin` directory.
386
-
387
-
Find where the binary is installed by running:
388
-
389
-
```bash
390
-
which github-mcp-server
391
-
```
392
-
393
-
### Start VS Code Insiders
394
-
395
-
Start VS Code Insiders and make sure you pass the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable to the process.
396
-
397
-
One way to do this is to make sure that [you can run VS code from your terminal](https://code.visualstudio.com/docs/setup/mac#_launch-vs-code-from-the-command-line) and