Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
edbdf4b
docs: Add Google Gemini CLI installation guide and integration
ipapapa Jul 26, 2025
89ec9f5
Fix Gemini CLI command syntax and add remote server method
ipapapa Aug 2, 2025
526a6c1
Merge branch 'main' into add-gemini-cli-docs
ipapapa Aug 3, 2025
0127628
Emphasize official Gemini CLI documentation link
ipapapa Aug 5, 2025
a6e2426
Fix Gemini CLI configuration file name: config.json -> settings.json
ipapapa Aug 8, 2025
bc96391
Remove Gemini CLI installation and authentication sections
ipapapa Aug 8, 2025
79e0782
Add Podman as Docker alternative in prerequisites
ipapapa Aug 8, 2025
6bfae0d
Remove references to deprecated npm package
ipapapa Aug 8, 2025
c52a1de
Add comprehensive ~/.gemini/.env file example
ipapapa Aug 8, 2025
e5e7bfd
Fix authorization header to use literal token placeholder
ipapapa Aug 8, 2025
d6696f6
Merge branch 'main' into add-gemini-cli-docs
ipapapa Aug 14, 2025
7e73679
Add issue types (#869)
JoannaaKL Aug 14, 2025
8f794ab
Enable Dependabot (#654)
zkoppert Aug 14, 2025
660967c
Bump SDK version to 0.36.0 (#863)
almaleksia Aug 14, 2025
83c67d1
Use server.ServerResourceTemplate and server.ServerPrompt wrappers (#…
almaleksia Aug 14, 2025
0d4dca9
Update "Close inactive issues" workflow to close issues after 180 day…
tommaso-moro Aug 18, 2025
34434aa
Update Claude MCP install guide after testing (#706)
D1M1TR10S Aug 18, 2025
fc381f8
Add actions job log buffer and profiler (#866)
mattdholloway Aug 19, 2025
615cc60
Add get_release_by_tag tool (#938)
tommaso-moro Aug 21, 2025
72a7214
docs(readme): Update readme to point to correct installation guides i…
beccccaboo Aug 21, 2025
cd4454e
Add Global Security Advisories Toolset (#919)
jurre Aug 21, 2025
ad3bf32
Repository security advisories (#925)
jurre Aug 21, 2025
6d4e070
Update Cursor installation link (#940)
tommaso-moro Aug 21, 2025
b33df25
Change role from "system" to "user" in prompt messages for `AssignCod…
tommaso-moro Aug 21, 2025
7acaad0
Resolve merge conflict with latest upstream main
ipapapa Aug 28, 2025
60fa301
Merge branch 'main' into add-gemini-cli-docs
LuluBeatson Aug 29, 2025
39db9e7
Local MCP is supported
LuluBeatson Aug 29, 2025
ff86293
Refactor Gemini CLI install guide
LuluBeatson Aug 29, 2025
f2e5ad7
Remove Bearer from Authorization header
ipapapa Aug 29, 2025
26d9139
Add reference to main README for latest config
ipapapa Aug 31, 2025
f86124e
Bearer needed for headers, add references
LuluBeatson Sep 2, 2025
12040db
Add minimal response to CRUD tools, `repositories` and `search` tools…
mattdholloway Sep 1, 2025
f898f17
initial org repo create support (#1023)
mattdholloway Sep 2, 2025
f6718c7
Merge branch 'main' into add-gemini-cli-docs
LuluBeatson Sep 2, 2025
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)**.
Expand Down
2 changes: 2 additions & 0 deletions docs/installation-guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<br>Remote: Copilot for Xcode latest version | Easy |
| Copilot in Eclipse | ✅ | ✅ PAT + ❌ No OAuth | Local: Docker or Go build, GitHub PAT<br>Remote: TBD | Easy |
Expand Down
157 changes: 157 additions & 0 deletions docs/installation-guides/install-gemini-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# 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

Choose a reason for hiding this comment

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

Or Podman. (https://podman.io)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have not used Podman but based on my quick check it has Docker command compatibility, so I have added it: 79e0782

Choose a reason for hiding this comment

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

In case there is any doubt.... I use podman with this server and with gemini-cli, and it works great - no surprise here.


<details>
<summary><b>Storing Your PAT Securely</b></summary>
<br>

For security, avoid hardcoding your token. Create or update `~/.gemini/.env` (where `~` is your home or project directory) with your PAT:

Copy link

@DinoChiesa DinoChiesa Aug 8, 2025

Choose a reason for hiding this comment

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

Probably lines 11 through 41 are best left out of this README., which pertains to github-mcp-server. Install instructions for Germini CLI should remain in the README for Gemini CLI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point about lines 11-41. I removed the Gemini CLI installation and authentication sections to keep this focused on GitHub MCP Server setup. This is also consistent with our other installation guides.

```bash
# ~/.gemini/.env
GITHUB_PAT=your_token_here
```

</details>

## GitHub MCP Server Configuration

Choose a reason for hiding this comment

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

The installation could be outdated with the main README.md file
We should inform the user to see the README.md of this project for the latest config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the note as requested: 26d9139


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.

### 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"

Choose a reason for hiding this comment

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

remove "Bearer"

Copy link
Contributor Author

@ipapapa ipapapa Aug 29, 2025

Choose a reason for hiding this comment

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

Oups good catch. I fixed it: f2e5ad7

}
}
}
}
```

### 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"
```

## Important Notes

- **Official repository**: [github/github-mcp-server](https://github.com/github/github-mcp-server)
- **Docker image**: `ghcr.io/github/github-mcp-server` (official and supported)
- **Gemini CLI specifics**: Uses `mcpServers` key, supports both global and project configurations
- **Remote server method**: Preferred approach using GitHub's hosted MCP server at `https://api.githubcopilot.com/mcp/`
Loading