-
Notifications
You must be signed in to change notification settings - Fork 1.9k
docs: Add Google Gemini CLI installation guide and integration #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. For a gemini-cli
user that is just trying to get this MCP to work, this is very helpful.
Left a few thoughts on the command use and things.
# Install GitHub MCP Server in Google Gemini CLI | ||
|
||
## Prerequisites | ||
1. Google Gemini CLI installed (see [Installation Options](#installation-options)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: should a guide on installing gemini-cli
be in here? or just a link to the gemini-cli
github page for instructions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! I've kept a brief installation section for user convenience (just the basic commands for npm, npx, and Homebrew) but added a link to the https://github.com/google-gemini/gemini-cli for more detailed installation options. This way users get the essentials quickly but can dive deeper if needed. What do you think of this approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly just worried that this information falls behind and perhaps a link to gemini-cli's installation is more robust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I have made a few changes to emphasize the official documentation link first - making it clear users should go there for up-to-date instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the information for how to install Gemini CLI belongs here. AFAIK the analogous information is not in the README files for other tools. Eg for Windsurf, the install guide talks about how to install github-mcp-server for Windsurf, not how to install windsurf.
|
||
1. **Check MCP server status**: | ||
```bash | ||
gemini-cli mcp status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix: i think the command is gemini
and not gemini-cli
.
also, there is no gemini mcp status
command. the closest is gemini --prompt /mcp list
.
for the tools a gemini --prompt /tools
this is true for examples below. you'll need the --prompt
flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups, this was my mistake. I am sorry for this and thank you for catching it. I will fix it below with a new commit.
✅ Changed all gemini-cli commands to gemini
✅ Fixed gemini mcp status
to gemini --prompt /mcp list
✅ Fixed gemini mcp list-tools
to gemini --prompt /tools
✅ Added --prompt
flags where needed throughout the examples
- 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.
|
Reduce detailed installation steps and direct users to official docs for up-to-date instructions, addressing reviewer feedback about maintainability.
|
||
Gemini CLI uses a settings JSON file to configure MCP servers: | ||
|
||
- **Global configuration**: `~/.gemini/config.json` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it not settings.json ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups my mistake, I have fixed it: a6e2426
## Installation Options | ||
|
||
Install Google Gemini CLI using your preferred method. For the most up-to-date installation instructions and troubleshooting, see the [official Gemini CLI documentation](https://github.com/google-gemini/gemini-cli). | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
"httpUrl": "https://api.githubcopilot.com/mcp/", | ||
"trust": true, | ||
"headers": { | ||
"Authorization": "Bearer ${GITHUB_PAT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not currently being resolved, pending google-gemini/gemini-cli#5282
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: e5e7bfd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is being resolved, but not with the .env
files. you can still set GITHUB_PAT
outside of those and it works.
|
||
### Method 2: Local Docker Setup (Alternative) | ||
|
||
**Important**: The npm package `@modelcontextprotocol/server-github` is no longer supported as of April 2025. Use the official Docker image `ghcr.io/github/github-mcp-server` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omit "Important: The npm package @modelcontextprotocol/server-github
is no longer supported as of April 2025."
This doc page is being added in August 2025. No need to reference old stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: 6bfae0d
## Prerequisites | ||
1. Google Gemini CLI installed (see [Installation Options](#installation-options)) | ||
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 |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
} | ||
``` | ||
|
||
Then set the environment variable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People can alternatively use the ~/.gemini/.env
file to store gemini-cli -related environment variables.
EG, the contents might be:
GITHUB_PAT=ghp_sample_sample_sample
GOOGLE_CLOUD_PROJECT=my-gcp-project
GEMINI_API_KEY=AIzSamplelBQGwHw-62R598eI-HFOWd4Ol847g
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: c52a1de
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but only after google-gemini/gemini-cli#5282 is resolved, at least for things resolved in settings.json
.
|
||
- **Official repository**: [github/github-mcp-server](https://github.com/github/github-mcp-server) | ||
- **Docker image**: `ghcr.io/github/github-mcp-server` (official and supported) | ||
- **npm package**: `@modelcontextprotocol/server-github` (deprecated as of April 2025 - no longer functional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I have removed the deprecated npm package
in this commit 6bfae0d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this.
I left a bunch of comments.
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.
Removed lines 11-41 containing Gemini CLI installation commands and authentication setup instructions.
Added Podman as container engine option alongside Docker.
looking good |
Environment variable substitution in headers is not yet supported by Gemini CLI (see google-gemini/gemini-cli#5282).
@DinoChiesa I have addressed the comments above. Thank you so much for the amazing feedback, it helped a lot. Let me know if there is anything else that you might find useful. Otherwise, feel free to "approve" as a reviewer. |
@soisyourface is there any feedback that has not been addressed? Please let me if you approve for this work to finalize. Thank you! |
Closes:
#756