This repository contains configuration files and setup scripts for integrating the GitHub MCP (Model Context Protocol) server with Google Gemini.
The setup includes:
- GitHub MCP Server: Docker-based GitHub integration for Gemini
- Automated Setup Script: Bash script for easy installation and configuration
- Clean Configuration: Streamlined setup with only the GitHub MCP server
mcp-servers.json- MCP server configuration filegemini-mcp-setup.sh- Automated setup script.env.example- Environment variables templateREADME.md- This documentation
- Docker: Required to run the GitHub MCP server
- GitHub Personal Access Token: For GitHub API authentication (required)
- Optional Configuration: For GitHub Enterprise users
-
Clone the repository:
git clone https://github.com/tan-interspace/mcp-setup-gemini.git cd mcp-setup-gemini -
Configure environment variables:
cp .env.example .env # Edit .env file and add your GitHub Personal Access Token -
Run the setup script:
chmod +x gemini-mcp-setup.sh ./gemini-mcp-setup.sh
-
Restart Gemini to load the new MCP server
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate a new token with appropriate permissions:
repo- Full control of private repositoriesread:org- Read org and team membershipuser:email- Access user email addresses
- Copy the token and add it to your
.envfile:GITHUB_PERSONAL_ACCESS_TOKEN=your_actual_token_here
For GitHub Enterprise users, you can also configure:
# GitHub Enterprise Server URL
GITHUB_ENTERPRISE_URL=https://your-github-enterprise.com
# Custom GitHub API URL
GITHUB_API_URL=https://api.your-github-enterprise.comThe MCP server configuration uses Docker to run the official GitHub MCP server:
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_personal_access_token_here"
}
}
}
}- Docker-based: No need to install Node.js or npm dependencies
- Official GitHub MCP Server: Uses the official GitHub container image
- Secure: Token-based authentication with GitHub API
- Clean Setup: Only includes the GitHub MCP server configuration
- Docker not found: Make sure Docker is installed and running
- Permission denied: Ensure the setup script has execute permissions
- GitHub API errors: Verify your Personal Access Token has the correct permissions
This project is open source and available under the MIT License.