You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> 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:
36
45
37
46
```json
38
47
// ~/.gemini/settings.json
39
48
{
40
49
"mcpServers": {
41
50
"github": {
42
51
"httpUrl": "https://api.githubcopilot.com/mcp/",
43
-
"trust": true,
44
52
"headers": {
45
-
"Authorization": "Bearer $GITHUB_PAT"
53
+
"Authorization": "Bearer $GITHUB_MCP_PAT"
46
54
}
47
55
}
48
56
}
49
57
}
50
58
```
51
59
52
-
### Method 2: Local Docker
60
+
### Method 3: Local Docker
53
61
54
62
With docker running, you can run the GitHub MCP server in a container:
55
63
@@ -68,14 +76,14 @@ With docker running, you can run the GitHub MCP server in a container:
68
76
"ghcr.io/github/github-mcp-server"
69
77
],
70
78
"env": {
71
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
79
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
72
80
}
73
81
}
74
82
}
75
83
}
76
84
```
77
85
78
-
### Method 3: Binary
86
+
### Method 4: Binary
79
87
80
88
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`.
81
89
@@ -89,7 +97,7 @@ Then, replacing `/path/to/binary` with the actual path to your binary, configure
89
97
"command": "/path/to/binary",
90
98
"args": ["stdio"],
91
99
"env": {
92
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
100
+
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_PAT"
93
101
}
94
102
}
95
103
}
@@ -122,6 +130,10 @@ To verify that the GitHub MCP server has been configured, start Gemini CLI in yo
122
130
List my GitHub repositories
123
131
```
124
132
133
+
## Additional Configuration
134
+
135
+
You can find more MCP configuration options for Gemini CLI here: [MCP Configuration Structure](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html#configuration-structure). For example, bypassing tool confirmations or excluding specific tools.
// See https://docs.github.com/en/enterprise-server@3.17/admin/configuring-settings/hardening-security-for-your-enterprise/enabling-subdomain-isolation#about-subdomain-isolation
0 commit comments