Get the FREE Ultimate OpenClaw Setup Guide →

claude_code-gemini

Simplified Gemini for Claude Code.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio raiansar-claude_code-gemini-mcp python ~/.claude-mcp-servers/gemini-collab/server.py \
  --env GOOGLE_GEMINI_API_KEY="your-google-gemini-api-key"

How to use

This MCP server bridges Claude Code with Google's Gemini AI, enabling seamless collaboration between code editing and Gemini's capabilities. You can ask Gemini questions directly, request code reviews focused on security or performance, and brainstorm ideas for features or architectures. The available tools include: ask_gemini to query Gemini about general topics or explanations, gemini_code_review to get code reviews with a focus area you specify, and gemini_brainstorm to brainstorm solutions or architectures. To use, start Claude Code and invoke the corresponding MCP tools via the Claude Code command palette or the provided mcp commands (e.g., mcp__gemini-collab__ask_gemini, mcp__gemini-collab__gemini_code_review, mcp__gemini-collab__gemini_brainstorm). The server handles authentication with Google Gemini through your API key and provides a lightweight bridge so Claude Code can leverage Gemini inside your coding workflow.

How to install

Prerequisites:\n- Python 3.8+ installed\n- Claude Code CLI installed\n- Google Gemini API key (Get one free)\n\nOption A: One-Line Install\nbash\ncurl -sSL https://raw.githubusercontent.com/RaiAnsar/claude_code-gemini-mcp/main/install.sh | bash\n````\nOption B: Manual Install\n1. Clone this repo:\nbash\ngit clone https://github.com/RaiAnsar/claude_code-gemini-mcp.git\ncd claude_code-gemini-mcp\n\n2. Run setup with your API key:\nbash\n./setup.sh YOUR_GEMINI_API_KEY\n```\nThis will install the MCP server globally for Claude Code to discover. After setup, the server will be available under the gemini-collab identifier.

Additional notes

Tips and notes:\n- Ensure your Google Gemini API key is valid and has access enabled.\n- The MCP server stores its files under the installation path, e.g., ~/.claude-mcp-servers/gemini-collab/. If you move or modify files, update the server path accordingly.\n- If the MCP doesn't show up in Claude Code, try listing or reinstalling with the CLI: claude mcp list, claude mcp remove gemini-collab, claude mcp add --scope user gemini-collab python3 ~/.claude-mcp-servers/gemini-collab/server.py.\n- You may need to install the Google Generative AI Python SDK: pip install google-generativeai.\n- The environment variable GOOGLE_GEMINI_API_KEY should be kept secure and not committed to public repositories.

Related MCP Servers

Sponsor this space

Reach thousands of developers