Skip to content

Commit 84ae009

Browse files
marzvroverCopilot
andauthored
Add Gemini CLI extension (#1232)
* Add gemini manifest * update gemini cli docs * update docker PAT env name * Add trailing `/` for consistency Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add MCP Server description * Readd remote manual steps * Clarify method names --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 66fabb7 commit 84ae009

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

docs/installation-guides/install-gemini-cli.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For security, avoid hardcoding your token. Create or update `~/.gemini/.env` (wh
1414

1515
```bash
1616
# ~/.gemini/.env
17-
GITHUB_PAT=your_token_here
17+
GITHUB_MCP_PAT=your_token_here
1818
```
1919

2020
</details>
@@ -30,9 +30,18 @@ After securely storing your PAT, you can add the GitHub MCP server configuration
3030

3131
> **Note:** For the most up-to-date configuration options, see the [main README.md](../../README.md).
3232
33-
### Method 1: Remote Server (Recommended)
33+
### Method 1: Gemini Extension (Recommended)
3434

35-
The simplest way is to use GitHub's hosted MCP server:
35+
The simplest way is to use GitHub's hosted MCP server via our gemini extension.
36+
37+
`gemini extensions install https://github.com/github/github-mcp-server`
38+
39+
> [!NOTE]
40+
> You will still need to have a personal access token with the appropriate scopes called `GITHUB_MCP_PAT` in your environment.
41+
42+
### Method 2: Remote Server
43+
44+
You can also connect to the hosted MCP server directly. After securely storing your PAT, configure Gemini CLI with:
3645

3746
```json
3847
// ~/.gemini/settings.json
@@ -41,14 +50,14 @@ The simplest way is to use GitHub's hosted MCP server:
4150
"github": {
4251
"httpUrl": "https://api.githubcopilot.com/mcp/",
4352
"headers": {
44-
"Authorization": "Bearer $GITHUB_PAT"
53+
"Authorization": "Bearer $GITHUB_MCP_PAT"
4554
}
4655
}
4756
}
4857
}
4958
```
5059

51-
### Method 2: Local Docker
60+
### Method 3: Local Docker
5261

5362
With docker running, you can run the GitHub MCP server in a container:
5463

@@ -67,14 +76,14 @@ With docker running, you can run the GitHub MCP server in a container:
6776
"ghcr.io/github/github-mcp-server"
6877
],
6978
"env": {
70-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
79+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
7180
}
7281
}
7382
}
7483
}
7584
```
7685

77-
### Method 3: Binary
86+
### Method 4: Binary
7887

7988
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`.
8089

@@ -88,7 +97,7 @@ Then, replacing `/path/to/binary` with the actual path to your binary, configure
8897
"command": "/path/to/binary",
8998
"args": ["stdio"],
9099
"env": {
91-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
100+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
92101
}
93102
}
94103
}

gemini-extension.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "github",
3+
"version": "1.0.0",
4+
"mcpServers": {
5+
"github": {
6+
"description": "Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.",
7+
"httpUrl": "https://api.githubcopilot.com/mcp/",
8+
"headers": {
9+
"Authorization": "Bearer $GITHUB_MCP_PAT"
10+
}
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)