Skip to content

Commit 09c9799

Browse files
committed
move setup instructions to the top
1 parent 33dc0e0 commit 09c9799

File tree

1 file changed

+114
-114
lines changed

1 file changed

+114
-114
lines changed

README.md

Lines changed: 114 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,120 @@ GitHub MCP Server implemented in Go.
77
Create a GitHub Personal Access Token with the appropriate permissions
88
and set it as the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
99

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
57+
start it with the following command:
58+
59+
```bash
60+
export GITHUB_PERSONAL_ACCESS_TOKEN=your-token-here
61+
code-insiders
62+
```
63+
64+
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+
10124
## Tools
11125

12126
### Users
@@ -349,123 +463,9 @@ For example, to override the `TOOL_ADD_ISSUE_COMMENT_DESCRIPTION` tool, you can
349463
export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description"
350464
```
351465
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 above command 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
398-
start it with the following command:
399-
400-
```bash
401-
export GITHUB_PERSONAL_ACCESS_TOKEN=your-token-here
402-
code-insiders
403-
```
404-
405-
Run **Preferences: Open User Settings (JSON)**, and create or append to the `mcp` setting:
406-
407-
If you are using the docker image, use this configuration:
408-
409-
```json
410-
{
411-
"mcp": {
412-
"inputs": [],
413-
"servers": {
414-
"github-mcp-server": {
415-
"type": "stdio",
416-
"command": "docker",
417-
"args": [
418-
"run",
419-
"-i",
420-
"--rm",
421-
"-e",
422-
"GITHUB_PERSONAL_ACCESS_TOKEN",
423-
"ghcr.io/github/github-mcp-server:main"
424-
],
425-
"env": {}
426-
}
427-
}
428-
}
429-
}
430-
```
431-
432-
If you built the binary from the repo use this configuration:
433-
434-
```json
435-
{
436-
"mcp": {
437-
"inputs": [ ],
438-
"servers": {
439-
"mcp-github-server": {
440-
"command": "path-to-your/github-mcp-server",
441-
"args": ["stdio"],
442-
"env": { }
443-
}
444-
}
445-
}
446-
}
447-
```
448-
449-
Right on top of `servers`, you should see a `start` link to start the server.
450-
451-
452-
Try something like the following prompt to verify that it works:
453-
454-
```
455-
I'd like to know more about my GitHub profile.
456-
```
457-
458-
## GitHub Enterprise Server
459-
460-
The flag `--gh-host` and the environment variable `GH_HOST` can be used to set the GitHub Enterprise Server hostname.
461-
462466
## TODO
463467
464468
Testing
465469
466470
- Integration tests
467471
- Blackbox testing: ideally comparing output to Anthropic's server to make sure that this is a fully compatible drop-in replacement.
468-
469-
And some other stuff:
470-
471-
- ...

0 commit comments

Comments
 (0)