From 9486a5d6a0af5a36a0eb6918b9ea9ad9a7acf673 Mon Sep 17 00:00:00 2001 From: Adam Holt Date: Sun, 8 Nov 2026 18:18:35 +0800 Subject: [PATCH 1/4] docs: document go install for the local MCP server Make the native binary path a first-class option beside Docker, using the v2 module path, and keep go build as the checkout-based alternative. Co-authored-by: Cursor --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 432541f434..eca89032d5 100644 --- a/README.md +++ b/README.md @@ -412,23 +412,22 @@ For a complete overview of all installation options, see our **[Installation Gui > **Note:** Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process. -### Build from source +### Install with Go / build from source -If you don't have Docker, you can use `go build` 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. 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`. +If you prefer a native binary over Docker, install with Go (requires [Go](https://go.dev/dl/) 1.27+): -STDIO API requests identify the server as `github-mcp-server/` and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use `vcs-`. The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The `-dirty` marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, explicitly supplied `main.commit`. This is a VCS build identifier, not a release number. - -Build the complete package with `go build -o github-mcp-server ./cmd/github-mcp-server` from a Git checkout to embed its VCS revision. For builds without VCS metadata, supply the actual release with `-ldflags '-X main.version='` or the full source revision with `-ldflags '-X main.commit='`. Valid metadata is selected in this order: explicit release, explicit source revision, embedded VCS revision, then installed main-module version. Valid explicit revisions remain authoritative even if build-context filtering changes embedded VCS metadata. Missing or malformed candidates fall through to the next usable source. If none is available, STDIO still starts with the development label `dev` and emits a warning on stderr, leaving stdout available for the MCP protocol. Supply real release or revision metadata when version-specific attribution is needed. +```bash +go install github.com/github/github-mcp-server/v2/cmd/github-mcp-server@latest +``` -For example: +This places `github-mcp-server` in `$(go env GOPATH)/bin` (or `GOBIN` if set). Make sure that directory is on your `PATH`, then point your MCP host at the binary: ```JSON { "mcp": { "servers": { "github": { - "command": "/path/to/github-mcp-server", + "command": "github-mcp-server", "args": ["stdio"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "" @@ -439,6 +438,14 @@ For example: } ``` +For OAuth login with a native binary (no fixed Docker callback port), see **[Local Server OAuth Login](docs/oauth-login.md)**. + +To build from a local checkout instead — for example to embed VCS revision metadata — run `go build -o github-mcp-server ./cmd/github-mcp-server` from the repository root (use `-o` to choose the output path). Configure your MCP host to use that executable as its `command`, with the same `args` / `env` shape as above. + +STDIO API requests identify the server as `github-mcp-server/` and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use `vcs-`. The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The `-dirty` marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, explicitly supplied `main.commit`. This is a VCS build identifier, not a release number. + +For builds without VCS metadata, supply the actual release with `-ldflags '-X main.version='` or the full source revision with `-ldflags '-X main.commit='`. Valid metadata is selected in this order: explicit release, explicit source revision, embedded VCS revision, then installed main-module version. Valid explicit revisions remain authoritative even if build-context filtering changes embedded VCS metadata. Missing or malformed candidates fall through to the next usable source. If none is available, STDIO still starts with the development label `dev` and emits a warning on stderr, leaving stdout available for the MCP protocol. Supply real release or revision metadata when version-specific attribution is needed. + ## Tool Configuration The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the `--toolsets` flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size. From 37d187b5075e0579bdea8a7a7374827919d928ba Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 19 Nov 2026 10:03:03 +0000 Subject: [PATCH 2/4] docs: match go install requirement to Go 1.27.3 go.mod and CONTRIBUTING require Go 1.27.3 or later. The README said 1.27+, which go install rejects for this module. Co-authored-by: ango --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ade9ceaf83..a9281c6716 100644 --- a/README.md +++ b/README.md @@ -414,7 +414,7 @@ For a complete overview of all installation options, see our **[Installation Gui ### Install with Go / build from source -If you prefer a native binary over Docker, install with Go (requires [Go](https://go.dev/dl/) 1.27+): +If you prefer a native binary over Docker, install with Go (requires [Go](https://go.dev/dl/) 1.27.3 or later, matching `go.mod`): ```bash go install github.com/github/github-mcp-server/v2/cmd/github-mcp-server@latest From 7a6fe02a1fe1d9430eff73c2381550f0cc06db24 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 20 Nov 2026 10:01:52 +0000 Subject: [PATCH 3/4] docs: match go install requirement to Go 1.27.4 Upstream main now sets go 1.27.4 in go.mod. go install enforces that version, so the README install line should match it. Co-authored-by: ango --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62d3125ad0..5cdcd23438 100644 --- a/README.md +++ b/README.md @@ -414,7 +414,7 @@ For a complete overview of all installation options, see our **[Installation Gui ### Install with Go / build from source -If you prefer a native binary over Docker, install with Go (requires [Go](https://go.dev/dl/) 1.27.3 or later, matching `go.mod`): +If you prefer a native binary over Docker, install with Go (requires [Go](https://go.dev/dl/) 1.27.4 or later, matching `go.mod`): ```bash go install github.com/github/github-mcp-server/v2/cmd/github-mcp-server@latest From b23cc65152c3e33ab518116b716eca2ce2fd4ee9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 23 Nov 2026 10:06:28 +0000 Subject: [PATCH 4/4] docs: add go install to the installation guide index The index still listed only Docker, a pre-built binary, and go build, and it required Go 1.24+. go.mod and the README install line are Go 1.27.4, and go install needs the /v2 module path. Co-authored-by: ango --- docs/installation-guides/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/installation-guides/README.md b/docs/installation-guides/README.md index 888caf64a4..23dea65b56 100644 --- a/docs/installation-guides/README.md +++ b/docs/installation-guides/README.md @@ -56,6 +56,14 @@ The GitHub MCP Server can be installed using several methods. **Docker is the mo - **Best for**: Most users, especially those already using Docker or wanting the simplest setup - **Used by**: Claude Desktop, Copilot in VS Code, Cursor, Windsurf, etc. +### Install with Go +- **Pros**: One command, no clone and no Docker. The binary is `github-mcp-server` on `PATH`. +- **Cons**: Requires [Go 1.27.4 or later](https://go.dev/dl/). `go install` enforces the version in `go.mod`. +- **Command**: `go install github.com/github/github-mcp-server/v2/cmd/github-mcp-server@latest` +- **Best for**: Users who already have Go and want a native binary without a checkout + +Use the `/v2` module path. `github.com/github/github-mcp-server/cmd/github-mcp-server@latest` resolves to the pre-v2 module. Host configuration is the same shape as the [README install section](../../README.md#install-with-go--build-from-source). + ### 📦 Pre-built Binary (Lightweight Alternative) - **Pros**: No Docker required, direct execution via stdio, minimal setup - **Cons**: Need to manually download and manage updates, platform-specific binaries @@ -65,7 +73,7 @@ The GitHub MCP Server can be installed using several methods. **Docker is the mo ### 🔨 Build from Source (Advanced Users) - **Pros**: Latest features, full customization, no external dependencies - **Cons**: Requires Go development environment, more complex setup -- **Prerequisites**: [Go 1.24+](https://go.dev/doc/install) +- **Prerequisites**: [Go 1.27.4 or later](https://go.dev/doc/install) - **Build command**: `go build -o github-mcp-server ./cmd/github-mcp-server` (build the complete package from a Git checkout to retain its source revision). - **Best for**: Developers who want the latest features or need custom modifications @@ -82,7 +90,7 @@ All installations with Personal Access Tokens (PAT) require: Optional (depending on installation method): - **Docker** (for Docker-based installations): [Download Docker](https://www.docker.com/) -- **Go 1.24+** (for building from source): [Install Go](https://go.dev/doc/install) +- **Go 1.27.4 or later** (for `go install` or building from source): [Install Go](https://go.dev/doc/install) ## Security Best Practices