From 09deac45d4f0bf00d8d78d41334267a594f92935 Mon Sep 17 00:00:00 2001 From: Matt Holloway Date: Tue, 2 Sep 2025 11:30:13 +0100 Subject: [PATCH 1/7] initial org repo create support (#1023) --- README.md | 1 + .../__toolsnaps__/create_repository.snap | 6 +++- pkg/github/repositories.go | 11 +++++-- pkg/github/repositories_test.go | 29 +++++++++++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b9f31ee48..8f0eba5ad 100644 --- a/README.md +++ b/README.md @@ -815,6 +815,7 @@ The following sets of tools are available (all are on by default): - `autoInit`: Initialize with README (boolean, optional) - `description`: Repository description (string, optional) - `name`: Repository name (string, required) + - `organization`: Organization to create the repository in (omit to create in your personal account) (string, optional) - `private`: Whether repo should be private (boolean, optional) - **delete_file** - Delete file diff --git a/pkg/github/__toolsnaps__/create_repository.snap b/pkg/github/__toolsnaps__/create_repository.snap index aaba75f3c..6ed2dbf41 100644 --- a/pkg/github/__toolsnaps__/create_repository.snap +++ b/pkg/github/__toolsnaps__/create_repository.snap @@ -3,7 +3,7 @@ "title": "Create repository", "readOnlyHint": false }, - "description": "Create a new GitHub repository in your account", + "description": "Create a new GitHub repository in your account or specified organization", "inputSchema": { "properties": { "autoInit": { @@ -18,6 +18,10 @@ "description": "Repository name", "type": "string" }, + "organization": { + "description": "Organization to create the repository in (omit to create in your personal account)", + "type": "string" + }, "private": { "description": "Whether repo should be private", "type": "boolean" diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index dce8501db..cef227ba5 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -393,7 +393,7 @@ func CreateOrUpdateFile(getClient GetClientFn, t translations.TranslationHelperF // CreateRepository creates a tool to create a new GitHub repository. func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) { return mcp.NewTool("create_repository", - mcp.WithDescription(t("TOOL_CREATE_REPOSITORY_DESCRIPTION", "Create a new GitHub repository in your account")), + mcp.WithDescription(t("TOOL_CREATE_REPOSITORY_DESCRIPTION", "Create a new GitHub repository in your account or specified organization")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ Title: t("TOOL_CREATE_REPOSITORY_USER_TITLE", "Create repository"), ReadOnlyHint: ToBoolPtr(false), @@ -405,6 +405,9 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun mcp.WithString("description", mcp.Description("Repository description"), ), + mcp.WithString("organization", + mcp.Description("Organization to create the repository in (omit to create in your personal account)"), + ), mcp.WithBoolean("private", mcp.Description("Whether repo should be private"), ), @@ -421,6 +424,10 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun if err != nil { return mcp.NewToolResultError(err.Error()), nil } + organization, err := OptionalParam[string](request, "organization") + if err != nil { + return mcp.NewToolResultError(err.Error()), nil + } private, err := OptionalParam[bool](request, "private") if err != nil { return mcp.NewToolResultError(err.Error()), nil @@ -441,7 +448,7 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun if err != nil { return nil, fmt.Errorf("failed to get GitHub client: %w", err) } - createdRepo, resp, err := client.Repositories.Create(ctx, "", repo) + createdRepo, resp, err := client.Repositories.Create(ctx, organization, repo) if err != nil { return ghErrors.NewGitHubAPIErrorResponse(ctx, "failed to create repository", diff --git a/pkg/github/repositories_test.go b/pkg/github/repositories_test.go index 6db069874..468d7c29b 100644 --- a/pkg/github/repositories_test.go +++ b/pkg/github/repositories_test.go @@ -1115,6 +1115,7 @@ func Test_CreateRepository(t *testing.T) { assert.NotEmpty(t, tool.Description) assert.Contains(t, tool.InputSchema.Properties, "name") assert.Contains(t, tool.InputSchema.Properties, "description") + assert.Contains(t, tool.InputSchema.Properties, "organization") assert.Contains(t, tool.InputSchema.Properties, "private") assert.Contains(t, tool.InputSchema.Properties, "autoInit") assert.ElementsMatch(t, tool.InputSchema.Required, []string{"name"}) @@ -1166,6 +1167,34 @@ func Test_CreateRepository(t *testing.T) { expectError: false, expectedRepo: mockRepo, }, + { + name: "successful repository creation in organization", + mockedClient: mock.NewMockedHTTPClient( + mock.WithRequestMatchHandler( + mock.EndpointPattern{ + Pattern: "/orgs/testorg/repos", + Method: "POST", + }, + expectRequestBody(t, map[string]interface{}{ + "name": "test-repo", + "description": "Test repository", + "private": false, + "auto_init": true, + }).andThen( + mockResponse(t, http.StatusCreated, mockRepo), + ), + ), + ), + requestArgs: map[string]interface{}{ + "name": "test-repo", + "description": "Test repository", + "organization": "testorg", + "private": false, + "autoInit": true, + }, + expectError: false, + expectedRepo: mockRepo, + }, { name: "successful repository creation with minimal parameters", mockedClient: mock.NewMockedHTTPClient( From 7dd6c7f99f954995160bd1bc2ab72eb0d80dd368 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:34:23 +0200 Subject: [PATCH 2/7] build(deps): bump actions/checkout from 4 to 5 (#878) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/code-scanning.yml | 2 +- .github/workflows/docker-publish.yml | 2 +- .github/workflows/docs-check.yml | 2 +- .github/workflows/go.yml | 2 +- .github/workflows/goreleaser.yml | 2 +- .github/workflows/license-check.yml | 2 +- .github/workflows/lint.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/code-scanning.yml b/.github/workflows/code-scanning.yml index 83d2c30be..5226e93f8 100644 --- a/.github/workflows/code-scanning.yml +++ b/.github/workflows/code-scanning.yml @@ -35,7 +35,7 @@ jobs: runner: '["ubuntu-22.04"]' steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index cd2d923cb..67e5f3a18 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml index c28c528b2..fee936a67 100644 --- a/.github/workflows/docs-check.yml +++ b/.github/workflows/docs-check.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Go uses: actions/setup-go@v5 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e3ef25022..d845479b0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Go uses: actions/setup-go@v5 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 263607ee1..e5c4acbec 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Go uses: actions/setup-go@v5 diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index 50f34ff60..5cc732c8f 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Go uses: actions/setup-go@v5 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b40193e72..f3000096b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-go@v5 with: go-version: stable From a8c029374fb013b380bf3a046a03a22870733539 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:50:51 +0200 Subject: [PATCH 3/7] Bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (#1031) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.10.0 to 1.11.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-version: 1.11.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b566e6c40..1f215fdc0 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/migueleliasweb/go-github-mock v1.3.0 github.com/spf13/cobra v1.9.1 github.com/spf13/viper v1.20.1 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 ) require ( diff --git a/go.sum b/go.sum index 24377c8aa..72730b820 100644 --- a/go.sum +++ b/go.sum @@ -87,8 +87,8 @@ github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqj github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= From c345e9b0b063db4866ace3c4ec35f795a3471d89 Mon Sep 17 00:00:00 2001 From: Ioannis Papapanagiotou Date: Thu, 4 Sep 2025 12:00:31 +0300 Subject: [PATCH 4/7] docs: Add Google Gemini CLI installation guide and integration (#757) * docs: Add Google Gemini CLI installation guide and integration - Add comprehensive installation guide for Google Gemini CLI - Include Docker and binary configuration options - Add authentication setup for Gemini API and Vertex AI - Update main README.md to include Gemini CLI in installation guides - Update installation guides index with Gemini CLI entry and support matrix - Follow established documentation patterns and security best practices * Fix Gemini CLI command syntax and add remote server method - Replace all 'gemini-cli' commands with correct 'gemini' syntax - Fix verification commands to use '/mcp list' and '/tools' prompts - Add httpUrl remote server method as primary configuration option - Update config file paths from settings.json to config.json - Correct npx installation command syntax - Add link to official Gemini CLI documentation Addresses feedback from soisyourface in PR review. * Emphasize official Gemini CLI documentation link Reduce detailed installation steps and direct users to official docs for up-to-date instructions, addressing reviewer feedback about maintainability. * Fix Gemini CLI configuration file name: config.json -> settings.json The correct configuration file for Gemini CLI is settings.json, not config.json. This applies to both global (~/.gemini/settings.json) and project-specific (.gemini/settings.json) configurations as confirmed by official documentation. * Remove Gemini CLI installation and authentication sections Removed lines 11-41 containing Gemini CLI installation commands and authentication setup instructions. * Add Podman as Docker alternative in prerequisites Added Podman as container engine option alongside Docker. * Remove references to deprecated npm package * Add comprehensive ~/.gemini/.env file example * Fix authorization header to use literal token placeholder Environment variable substitution in headers is not yet supported by Gemini CLI (see google-gemini/gemini-cli#5282). * Add issue types (#869) * feat: add type to issues * test: add `type` test for create and update issues * Generate docs and toolsnaps * Update pkg/github/issues.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Use github ptr --------- Co-authored-by: Pranav RK Co-authored-by: Pranav RK <39577726+radar07@users.noreply.github.com> Co-authored-by: Alon Kenneth <11458012+akenneth@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Enable Dependabot (#654) * Create/Update dependabot.yaml * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Bump SDK version to 0.36.0 (#863) * Use server.ServerResourceTemplate and server.ServerPrompt wrappers (#886) * Update "Close inactive issues" workflow to close issues after 180 days of inactivity (#909) * update PR_DAYS_BEFORE_STALE * update to mark as stale after 60 days * Update Claude MCP install guide after testing (#706) * Revise Claude installation guide - Verified Claude Code installation steps - Identified and documented issues with Claude Desktop setup - Updated installation documentation based on testing * Revise instructions for opening Claude Code Updated recommendations for opening Claude Code. * Update docs/installation-guides/install-claude.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/installation-guides/install-claude.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update installation guide for Claude setup Added installation option for using Claude Code using a release binary. * Change section title for Go Binary installation Updated section title for clarity regarding installation without Docker. * Close double quote in bash command --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: LuluBeatson Co-authored-by: Matt Holloway Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com> * Add actions job log buffer and profiler (#866) * add sliding window for actions logs * refactor: fix sliding * remove trim content * only use up to 1mb of memory for logs * update to tail lines in second pass * add better memory usage calculation * increase window size to 5MB * update test * update vers * undo vers change * add incremental memory tracking * use ring buffer * remove unused ctx param * remove manual GC clear * fix cca feedback * extract ring buffer logic to new package * handle log content processing errors and use correct param for maxjobloglines * fix tailing * account for if tailLines exceeds window size * add profiling thats reusable * remove profiler testing * refactor profiler: introduce safeMemoryDelta for accurate memory delta calculations * linter fixes * Update pkg/buffer/buffer.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * use flag for maxJobLogLines * add param passing for context window size * refactor: rename contextWindowSize to contentWindowSize for consistency * fix: use tailLines if bigger but only if <= 5000 * fix: limit tailLines to a maximum of 500 for log content download * Update cmd/github-mcp-server/main.go Co-authored-by: Adam Holt * Update cmd/github-mcp-server/main.go Co-authored-by: Adam Holt * move profiler to internal/ * update actions test with new profiler location * fix: adjust buffer size limits * make line buffer 1028kb * fix mod path * change test to use same buffer size as normal use * improve test for non-sliding window implementation to not count empty lines * make test memory measurement more accurate * remove impossible conditional --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Adam Holt * Add get_release_by_tag tool (#938) * add get_release_by_tag tool * add tool * add tests * autogen * remove comment * docs(readme): Update readme to point to correct installation guides index (#892) * docs(readme): Update readme to point to correct installation guides index * feat(contributors): add list_repository_contributors tool * Revert "feat(contributors): add list_repository_contributors tool" This reverts commit ece480ea6f99f7131a6faa2d12fb2f62d3e53332. --------- Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com> * Add Global Security Advisories Toolset (#919) * Repository security advisories (#925) * Add support for listing repo level security advisories * Add support for listing repo security advisories at the org level * Update Cursor installation link (#940) * use new link * update local install link * Change role from "system" to "user" in prompt messages for `AssignCodingAgentPrompt` and `IssueToFixWorkflowPrompt`. Role "system" is not allowed by Claude Code in MCP provided prompt (allowed only role "user" and "assistant") (#941) Co-authored-by: 0xGosu <0xGosu@gmail.com> * Local MCP is supported * Refactor Gemini CLI install guide * Remove Bearer from Authorization header * Add reference to main README for latest config * Bearer needed for headers, add references * Add minimal response to CRUD tools, `repositories` and `search` toolsets (#988) * add comprehensive minimal response where appropriate * remove unneeded comments * remove incorrect diff param * update docs * rm comment * Update pkg/github/repositories.go Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com> * update toolsnaps and docs * change minimal_output to use new OptionalBoolParamWithDefault * Update pkg/github/repositories.go Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com> * refactor minimal conversion funcs to minimal_types.go * consolidate response structs and remove unneeded message field * consolidate response further * remove CloneURL field * Update pkg/github/repositories.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update pkg/github/server.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix undefined * change incorrect comment * remove old err var declaration * Update pkg/github/repositories.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix syntax issue * update toolsnaps --------- Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * initial org repo create support (#1023) --------- Co-authored-by: JoannaaKL Co-authored-by: Pranav RK Co-authored-by: Pranav RK <39577726+radar07@users.noreply.github.com> Co-authored-by: Alon Kenneth <11458012+akenneth@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Zack Koppert Co-authored-by: Ksenia Bobrova Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com> Co-authored-by: Dimitrios Philliou Co-authored-by: LuluBeatson Co-authored-by: Matt Holloway Co-authored-by: Adam Holt Co-authored-by: Rebecca Biju <113070179+beccccaboo@users.noreply.github.com> Co-authored-by: Jurre Co-authored-by: 0xGosu <0xGosu@gmail.com> Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com> --- README.md | 1 + docs/installation-guides/README.md | 2 + .../installation-guides/install-gemini-cli.md | 156 ++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 docs/installation-guides/install-gemini-cli.md diff --git a/README.md b/README.md index 8f0eba5ad..c4618fc78 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,7 @@ For other MCP host applications, please refer to our installation guides: - **[GitHub Copilot in other IDEs](/docs/installation-guides/install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot - **[Claude Code & Claude Desktop](docs/installation-guides/install-claude.md)** - Installation guide for Claude Code and Claude Desktop - **[Cursor](docs/installation-guides/install-cursor.md)** - Installation guide for Cursor IDE +- **[Google Gemini CLI](docs/installation-guides/install-gemini-cli.md)** - Installation guide for Google Gemini CLI - **[Windsurf](docs/installation-guides/install-windsurf.md)** - Installation guide for Windsurf IDE For a complete overview of all installation options, see our **[Installation Guides Index](docs/installation-guides)**. diff --git a/docs/installation-guides/README.md b/docs/installation-guides/README.md index f55cc6bef..13af2f7aa 100644 --- a/docs/installation-guides/README.md +++ b/docs/installation-guides/README.md @@ -6,6 +6,7 @@ This directory contains detailed installation instructions for the GitHub MCP Se - **[GitHub Copilot in other IDEs](install-other-copilot-ides.md)** - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot - **[Claude Applications](install-claude.md)** - Installation guide for Claude Web, Claude Desktop and Claude Code CLI - **[Cursor](install-cursor.md)** - Installation guide for Cursor IDE +- **[Google Gemini CLI](install-gemini-cli.md)** - Installation guide for Google Gemini CLI - **[Windsurf](install-windsurf.md)** - Installation guide for Windsurf IDE ## Support by Host Application @@ -19,6 +20,7 @@ This directory contains detailed installation instructions for the GitHub MCP Se | Claude Code | ✅ | ✅ PAT + ❌ No OAuth| GitHub MCP Server binary or remote URL, GitHub PAT | Easy | | Claude Desktop | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Moderate | | Cursor | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy | +| Google Gemini CLI | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy | | Windsurf | ✅ | ✅ PAT + ❌ No OAuth | Docker or Go build, GitHub PAT | Easy | | Copilot in Xcode | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT
Remote: Copilot for Xcode latest version | Easy | | Copilot in Eclipse | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT
Remote: TBD | Easy | diff --git a/docs/installation-guides/install-gemini-cli.md b/docs/installation-guides/install-gemini-cli.md new file mode 100644 index 000000000..21abc8653 --- /dev/null +++ b/docs/installation-guides/install-gemini-cli.md @@ -0,0 +1,156 @@ +# Install GitHub MCP Server in Google Gemini CLI + +## Prerequisites + +1. Google Gemini CLI installed (see [official Gemini CLI documentation](https://github.com/google-gemini/gemini-cli)) +2. [GitHub Personal Access Token](https://github.com/settings/personal-access-tokens/new) with appropriate scopes +3. For local installation: [Docker](https://www.docker.com/) installed and running + +
+Storing Your PAT Securely +
+ +For security, avoid hardcoding your token. Create or update `~/.gemini/.env` (where `~` is your home or project directory) with your PAT: + +```bash +# ~/.gemini/.env +GITHUB_PAT=your_token_here +``` + +
+ +## GitHub MCP Server Configuration + +MCP servers for Gemini CLI are configured in its settings JSON under an `mcpServers` key. + +- **Global configuration**: `~/.gemini/settings.json` where `~` is your home directory +- **Project-specific**: `.gemini/settings.json` in your project directory + +After securely storing your PAT, you can add the GitHub MCP server configuration to your settings file using one of the methods below. You may need to restart the Gemini CLI for changes to take effect. + +> **Note:** For the most up-to-date configuration options, see the [main README.md](../../README.md). + +### Method 1: Remote Server (Recommended) + +The simplest way is to use GitHub's hosted MCP server: + +```json +// ~/.gemini/settings.json +{ + "mcpServers": { + "github": { + "httpUrl": "https://api.githubcopilot.com/mcp/", + "trust": true, + "headers": { + "Authorization": "Bearer $GITHUB_PAT" + } + } + } +} +``` + +### Method 2: Local Docker + +With docker running, you can run the GitHub MCP server in a container: + +```json +// ~/.gemini/settings.json +{ + "mcpServers": { + "github": { + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "-e", + "GITHUB_PERSONAL_ACCESS_TOKEN", + "ghcr.io/github/github-mcp-server" + ], + "env": { + "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT" + } + } + } +} +``` + +### Method 3: Binary + +You can download the latest binary release from the [GitHub releases page](https://github.com/github/github-mcp-server/releases) or build it from source by running `go build -o github-mcp-server ./cmd/github-mcp-server`. + +Then, replacing `/path/to/binary` with the actual path to your binary, configure Gemini CLI with: + +```json +// ~/.gemini/settings.json +{ + "mcpServers": { + "github": { + "command": "/path/to/binary", + "args": ["stdio"], + "env": { + "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT" + } + } + } +} +``` + +## Verification + +To verify that the GitHub MCP server has been configured, start Gemini CLI in your terminal with `gemini`, then: + +1. **Check MCP server status**: + + ``` + /mcp list + ``` + + ``` + ℹConfigured MCP servers: + + 🟢 github - Ready (96 tools, 2 prompts) + Tools: + - github__add_comment_to_pending_review + - github__add_issue_comment + - github__add_sub_issue + ... + ``` + +2. **Test with a prompt** + ``` + List my GitHub repositories + ``` + +## Troubleshooting + +### Local Server Issues + +- **Docker errors**: Ensure Docker Desktop is running + ```bash + docker --version + ``` +- **Image pull failures**: Try `docker logout ghcr.io` then retry +- **Docker not found**: Install Docker Desktop and ensure it's running + +### Authentication Issues + +- **Invalid PAT**: Verify your GitHub PAT has correct scopes: + - `repo` - Repository operations + - `read:packages` - Docker image access (if using Docker) +- **Token expired**: Generate a new GitHub PAT + +### Configuration Issues + +- **Invalid JSON**: Validate your configuration: + ```bash + cat ~/.gemini/settings.json | jq . + ``` +- **MCP connection issues**: Check logs for connection errors: + ```bash + gemini --debug "test command" + ``` + +## References + +- Gemini CLI Docs > [MCP Configuration Structure](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html#configuration-structure) From 3dc912c10ccb3417dcd00f9110a5113a11b95148 Mon Sep 17 00:00:00 2001 From: Dimitrios Philliou Date: Thu, 4 Sep 2025 08:21:42 -0700 Subject: [PATCH 5/7] Update README.md (#1044) Removing public preview note. Co-authored-by: Iryna Kulakova <52420926+IrynaKulakova@users.noreply.github.com> Co-authored-by: Adam Holt --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index c4618fc78..d1ce061da 100644 --- a/README.md +++ b/README.md @@ -85,11 +85,6 @@ Alternatively, to manually configure VS Code, choose the appropriate JSON block > **Note:** Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info. -> ⚠️ **Public Preview Status:** The **remote** GitHub MCP Server is currently in Public Preview. During preview, access may be gated depending on authentication type and surface: -> - OAuth: Subject to GitHub Copilot Editor Preview Policy until GA -> - PAT: Controlled via your organization's PAT policies -> - MCP Servers in Copilot policy: Enables/disables access to all MCP servers in VS Code, with other Copilot editors migrating to this policy in the coming months. - ### Configuration See [Remote Server Documentation](/docs/remote-server.md) on how to pass additional configuration settings to the remote GitHub MCP Server. From bbb411fe37b7168b8e4ef1278ab0c882953d0f24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 17:24:25 +0200 Subject: [PATCH 6/7] build(deps): bump docker/metadata-action from 5.0.0 to 5.8.0 (#880) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.0.0 to 5.8.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/96383f45573cb7f253c731d3b3ab81c87ef81934...c1e51972afc2121e065aed6d45c65596fe445f3f) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-version: 5.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 67e5f3a18..015a91e30 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -63,7 +63,7 @@ jobs: # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | From 9db2e17204d9588795b01db9407a7465b3db2411 Mon Sep 17 00:00:00 2001 From: Tony Truong Date: Tue, 9 Sep 2025 13:26:22 +0200 Subject: [PATCH 7/7] Updating tool get_pull_request_comments -> get_pull_request_review_comments (#1062) * update get_pull_request_comments to get_pull_request_review_comments to signify difference * fix remaining old references * cleanup dangling tool snap --- README.md | 10 +++++----- ....snap => get_pull_request_review_comments.snap} | 6 +++--- pkg/github/pullrequests.go | 14 +++++++------- pkg/github/pullrequests_test.go | 8 ++++---- pkg/github/tools.go | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) rename pkg/github/__toolsnaps__/{get_pull_request_comments.snap => get_pull_request_review_comments.snap} (60%) diff --git a/README.md b/README.md index d1ce061da..46eef3b4b 100644 --- a/README.md +++ b/README.md @@ -701,11 +701,6 @@ The following sets of tools are available (all are on by default): - `pullNumber`: Pull request number (number, required) - `repo`: Repository name (string, required) -- **get_pull_request_comments** - Get pull request comments - - `owner`: Repository owner (string, required) - - `pullNumber`: Pull request number (number, required) - - `repo`: Repository name (string, required) - - **get_pull_request_diff** - Get pull request diff - `owner`: Repository owner (string, required) - `pullNumber`: Pull request number (number, required) @@ -718,6 +713,11 @@ The following sets of tools are available (all are on by default): - `pullNumber`: Pull request number (number, required) - `repo`: Repository name (string, required) +- **get_pull_request_review_comments** - Get pull request review comments + - `owner`: Repository owner (string, required) + - `pullNumber`: Pull request number (number, required) + - `repo`: Repository name (string, required) + - **get_pull_request_reviews** - Get pull request reviews - `owner`: Repository owner (string, required) - `pullNumber`: Pull request number (number, required) diff --git a/pkg/github/__toolsnaps__/get_pull_request_comments.snap b/pkg/github/__toolsnaps__/get_pull_request_review_comments.snap similarity index 60% rename from pkg/github/__toolsnaps__/get_pull_request_comments.snap rename to pkg/github/__toolsnaps__/get_pull_request_review_comments.snap index 6699f6d97..92996fec2 100644 --- a/pkg/github/__toolsnaps__/get_pull_request_comments.snap +++ b/pkg/github/__toolsnaps__/get_pull_request_review_comments.snap @@ -1,9 +1,9 @@ { "annotations": { - "title": "Get pull request comments", + "title": "Get pull request review comments", "readOnlyHint": true }, - "description": "Get comments for a specific pull request.", + "description": "Get pull request review comments. They are comments made on a portion of the unified diff during a pull request review. These are different from commit comments and issue comments in a pull request.", "inputSchema": { "properties": { "owner": { @@ -26,5 +26,5 @@ ], "type": "object" }, - "name": "get_pull_request_comments" + "name": "get_pull_request_review_comments" } \ No newline at end of file diff --git a/pkg/github/pullrequests.go b/pkg/github/pullrequests.go index d7547519d..b2e4e9290 100644 --- a/pkg/github/pullrequests.go +++ b/pkg/github/pullrequests.go @@ -975,12 +975,12 @@ func UpdatePullRequestBranch(getClient GetClientFn, t translations.TranslationHe } } -// GetPullRequestComments creates a tool to get the review comments on a pull request. -func GetPullRequestComments(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) { - return mcp.NewTool("get_pull_request_comments", - mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_COMMENTS_DESCRIPTION", "Get comments for a specific pull request.")), +// GetPullRequestReviewComments creates a tool to get the review comments on a pull request. +func GetPullRequestReviewComments(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) { + return mcp.NewTool("get_pull_request_review_comments", + mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_REVIEW_COMMENTS_DESCRIPTION", "Get pull request review comments. They are comments made on a portion of the unified diff during a pull request review. These are different from commit comments and issue comments in a pull request.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_GET_PULL_REQUEST_COMMENTS_USER_TITLE", "Get pull request comments"), + Title: t("TOOL_GET_PULL_REQUEST_REVIEW_COMMENTS_USER_TITLE", "Get pull request review comments"), ReadOnlyHint: ToBoolPtr(true), }), mcp.WithString("owner", @@ -1023,7 +1023,7 @@ func GetPullRequestComments(getClient GetClientFn, t translations.TranslationHel comments, resp, err := client.PullRequests.ListComments(ctx, owner, repo, pullNumber, opts) if err != nil { return ghErrors.NewGitHubAPIErrorResponse(ctx, - "failed to get pull request comments", + "failed to get pull request review comments", resp, err, ), nil @@ -1035,7 +1035,7 @@ func GetPullRequestComments(getClient GetClientFn, t translations.TranslationHel if err != nil { return nil, fmt.Errorf("failed to read response body: %w", err) } - return mcp.NewToolResultError(fmt.Sprintf("failed to get pull request comments: %s", string(body))), nil + return mcp.NewToolResultError(fmt.Sprintf("failed to get pull request review comments: %s", string(body))), nil } r, err := json.Marshal(comments) diff --git a/pkg/github/pullrequests_test.go b/pkg/github/pullrequests_test.go index ea2df97f4..18fc8d87d 100644 --- a/pkg/github/pullrequests_test.go +++ b/pkg/github/pullrequests_test.go @@ -1555,10 +1555,10 @@ func Test_UpdatePullRequestBranch(t *testing.T) { func Test_GetPullRequestComments(t *testing.T) { // Verify tool definition once mockClient := github.NewClient(nil) - tool, _ := GetPullRequestComments(stubGetClientFn(mockClient), translations.NullTranslationHelper) + tool, _ := GetPullRequestReviewComments(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - assert.Equal(t, "get_pull_request_comments", tool.Name) + assert.Equal(t, "get_pull_request_review_comments", tool.Name) assert.NotEmpty(t, tool.Description) assert.Contains(t, tool.InputSchema.Properties, "owner") assert.Contains(t, tool.InputSchema.Properties, "repo") @@ -1636,7 +1636,7 @@ func Test_GetPullRequestComments(t *testing.T) { "pullNumber": float64(999), }, expectError: true, - expectedErrMsg: "failed to get pull request comments", + expectedErrMsg: "failed to get pull request review comments", }, } @@ -1644,7 +1644,7 @@ func Test_GetPullRequestComments(t *testing.T) { t.Run(tc.name, func(t *testing.T) { // Setup client with mock client := github.NewClient(tc.mockedClient) - _, handler := GetPullRequestComments(stubGetClientFn(client), translations.NullTranslationHelper) + _, handler := GetPullRequestReviewComments(stubGetClientFn(client), translations.NullTranslationHelper) // Create call request request := createMCPRequest(tc.requestArgs) diff --git a/pkg/github/tools.go b/pkg/github/tools.go index 728d78097..10a3f3eca 100644 --- a/pkg/github/tools.go +++ b/pkg/github/tools.go @@ -86,7 +86,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG toolsets.NewServerTool(GetPullRequestFiles(getClient, t)), toolsets.NewServerTool(SearchPullRequests(getClient, t)), toolsets.NewServerTool(GetPullRequestStatus(getClient, t)), - toolsets.NewServerTool(GetPullRequestComments(getClient, t)), + toolsets.NewServerTool(GetPullRequestReviewComments(getClient, t)), toolsets.NewServerTool(GetPullRequestReviews(getClient, t)), toolsets.NewServerTool(GetPullRequestDiff(getClient, t)), ).