Skip to content

Update build from source instructions #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,30 @@ More about using MCP server tools in VS Code's [agent mode documentation](https:
### Build from source

If you don't have Docker, you can use `go` to build the binary in the
`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.
`cmd/github-mcp-server` directory:
```
GOTOOLCHAIN=auto go install github.com/github/github-mcp-server/cmd/github-mcp-server@latest
```

The MCP servers from VS Code and Claude needs to be adjusted respectively:
```diff
"github": {
- "command": "docker",
+ "command": "~/go/bin/github-mcp-server",
"args": [
- "run",
- "-i",
- "--rm",
- "-e",
- "GITHUB_PERSONAL_ACCESS_TOKEN",
- "ghcr.io/github/github-mcp-server"
+ "stdio"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token} OR <YOUR_TOKEN>"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users shouldn't be hardcoding PATs in a config file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied it from the Claude Desktop section. What should it be instead? 🤔 And should I also update it in the Claude Desktop section?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh fair enough, vscode supports password inputs which prompts for input when the server is launched. Claude doesn't appear to have that feature.

}
}
```

## GitHub Enterprise Server

Expand Down