Skip to content

Commit c402539

Browse files
committed
update install instructions
1 parent 92bceb5 commit c402539

File tree

1 file changed

+74
-14
lines changed

1 file changed

+74
-14
lines changed

README.md

+74-14
Original file line numberDiff line numberDiff line change
@@ -351,40 +351,100 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
351351
352352
## Testing on VS Code Insiders
353353
354-
First of all, install `github-mcp-server` with:
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:
355374
356375
```bash
357376
go install ./cmd/github-mcp-server
358377
```
359378
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+
360405
Run **Preferences: Open User Settings (JSON)**, and create or append to the `mcp` setting:
361406
407+
If you are using the docker image, use this configuration:
408+
362409
```json
363410
{
364-
"mcp": {
365-
"inputs": [
366-
{
367-
"type": "promptString",
368-
"id": "githubpat",
369-
"description": "GitHub Personal Access Token",
370-
"password": true
411+
"mcp": {
412+
"inputs": [
413+
],
414+
"servers": {
415+
"github-mcp-server": {
416+
"type": "stdio",
417+
"command": "docker",
418+
"args": [
419+
"run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server:main"
420+
],
421+
"env": {
422+
}
423+
}
424+
}
371425
}
372-
],
426+
}
427+
```
428+
429+
If you built the binary from the repo use this configuration:
430+
431+
```json
432+
{
433+
"mcp": {
434+
"inputs": [ ],
373435
"servers": {
374436
"mcp-github-server": {
375437
"command": "path-to-your/github-mcp-server",
376438
"args": ["stdio"],
377-
"env": {
378-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:githubpat}"
379-
},
439+
"env": { }
380440
}
381441
}
382442
}
383443
}
384444
```
385445
386-
In `Copilot Edits`, you should now see an option to reload the available `tools`.
387-
Reload, and you should be good to go.
446+
Right on top of `servers`, you should see a `start` link to start the server.
447+
388448
389449
Try something like the following prompt to verify that it works:
390450

0 commit comments

Comments
 (0)