From c607b6b0f50ca481b6cfad87ea93c09dcf4c062d Mon Sep 17 00:00:00 2001 From: "Stefan M." Date: Fri, 11 Apr 2025 15:06:35 +0200 Subject: [PATCH 1/2] Update build from source instructions --- README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 00f49b64..438a1b2a 100644 --- a/README.md +++ b/README.md @@ -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": "" + } +} +``` ## GitHub Enterprise Server From ec7ae56ffe95904bf15ab0ce762663072f6dfe8e Mon Sep 17 00:00:00 2001 From: "Stefan M." Date: Fri, 11 Apr 2025 15:11:54 +0200 Subject: [PATCH 2/2] Add `${input:github_token}` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 438a1b2a..05575c65 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ The MCP servers from VS Code and Claude needs to be adjusted respectively: + "stdio" ], "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "" + "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token} OR " } } ```