Claude Code Gemini
Connects Claude Code with Google's Gemini AI, allowing users to ask Gemini questions, get code reviews, and brainstorm ideas directly within Claude Code.
What is Claude Code Gemini?
Claude Code Gemini is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to connects claude code with google's gemini ai, allowing users to ask gemini questions, get code reviews, and brainstorm ideas directly within claude code.
Connects Claude Code with Google's Gemini AI, allowing users to ask Gemini questions, get code reviews, and brainstorm ideas directly within Claude Code.
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Connects Claude Code with Google's Gemini AI, allowing users
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx claude-code-gemini-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Claude Code Gemini
The Claude Code + Gemini MCP Server bridges Claude Code and Google's Gemini AI, letting developers consult a second AI model without leaving their terminal session. It registers three tools — ask_gemini for open-ended questions, gemini_code_review for security and performance analysis of code, and gemini_brainstorm for generating alternative approaches and ideas. This is especially useful for cross-model validation and getting a different perspective on architectural decisions or code quality.
Prerequisites
- Claude Code CLI installed and configured
- Python 3.8+ available on your system
- A Google Gemini API key from Google AI Studio (aistudio.google.com)
- curl available for running the install script
- An MCP-compatible client (Claude Code handles registration automatically)
Obtain a Gemini API key
Visit Google AI Studio at aistudio.google.com, sign in with a Google account, and create a new API key. Copy the key — you will paste it during setup.
Run the installer script
The project provides a one-line install script that clones the repo, sets up a Python virtual environment, and configures the MCP server globally for Claude Code.
curl -sSL https://raw.githubusercontent.com/RaiAnsar/claude_code-gemini-mcp/main/install.sh | bashRun setup and provide your Gemini API key
The installer will invoke setup.sh and prompt you for your Gemini API key. Enter the key you copied from AI Studio. The script writes it to the server configuration file.
Verify the server is registered
The install script registers the server globally so it is available in every Claude Code session. Confirm the server file exists at the expected path.
ls ~/.claude-mcp-servers/gemini-collab/server.pyStart a Claude Code session and test
Open a Claude Code session in any directory. The Gemini tools should be available immediately. Try a quick question to confirm the connection.
claudeClaude Code Gemini Examples
Client configuration
The install script registers the server automatically. If you need to add it manually to Claude Code's MCP config, use this shape. Replace the path and API key with your actual values.
{
"mcpServers": {
"gemini-collab": {
"command": "python3",
"args": ["/Users/yourname/.claude-mcp-servers/gemini-collab/server.py"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key_here"
}
}
}
}Prompts to try
Once connected, use these prompts inside Claude Code to invoke Gemini tools.
- "Ask Gemini: what are the trade-offs between microservices and a monolith for a startup?"
- "Use Gemini to review this function for security issues: [paste code]"
- "Brainstorm with Gemini three alternative approaches to implementing a rate limiter."
- "Ask Gemini to explain how transformer attention mechanisms work in simple terms."
- "Get a Gemini code review focused on performance for this database query: [paste SQL]"Troubleshooting Claude Code Gemini
The install script fails with a Python or pip error
Ensure Python 3.8+ is installed and available as 'python3'. On macOS you may need to install Python via Homebrew: 'brew install python'. Re-run the install script after fixing Python.
Gemini tools return an authentication error
The API key is stored in ~/.claude-mcp-servers/gemini-collab/server.py. Open that file, locate the GEMINI_API_KEY value, and replace it with your valid key from aistudio.google.com. Restart Claude Code afterward.
Tools are not available after installation
The installer registers the server globally for Claude Code. If tools are missing, run 'claude mcp list' to confirm the server appears. If not, re-run the install script or manually add the server entry to your Claude Code MCP config.
Frequently Asked Questions about Claude Code Gemini
What is Claude Code Gemini?
Claude Code Gemini is a Model Context Protocol (MCP) server that connects claude code with google's gemini ai, allowing users to ask gemini questions, get code reviews, and brainstorm ideas directly within claude code. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Claude Code Gemini?
Follow the installation instructions on the Claude Code Gemini GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Claude Code Gemini?
Claude Code Gemini works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Claude Code Gemini free to use?
Yes, Claude Code Gemini is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Claude Code Gemini Alternatives — Similar Coding Agents Servers
Looking for alternatives to Claude Code Gemini? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Claude Code Gemini in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Claude Code Gemini?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.