Claude Code Gemini

v1.0.0Coding Agentsstable

Connects Claude Code with Google's Gemini AI, allowing users to ask Gemini questions, get code reviews, and brainstorm ideas directly within Claude Code.

claude-aigemini-flashmcpmcp-server
Share:
242
Stars
0
Downloads
0
Weekly
0/5

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

Ask Gemini questions and get code reviews within Claude Code.
Brainstorm ideas with Google Gemini AI directly in the IDE.
RaiAnsar

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 6, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx claude-code-gemini-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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.

2

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 | bash
3

Run 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.

4

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.py
5

Start 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.

claude

Claude 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.

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.

Quick Config Preview

{ "mcpServers": { "claude-code-gemini-mcp-server": { "command": "npx", "args": ["-y", "claude-code-gemini-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides