Skip to main content
Glama

Claude Code + Gemini MCP Server

by RaiAnsar
MIT License
124

Claude Code + Gemini MCP Server

Connect Claude Code with Google's Gemini AI for powerful AI collaboration. Ask Gemini questions, get code reviews, and brainstorm ideas - all within Claude Code!

🚀 Quick Start (2 minutes)

Prerequisites

  • Python 3.8+ installed
  • Claude Code CLI installed
  • Google Gemini API key (Get one free)

One-Line Install

curl -sSL https://raw.githubusercontent.com/RaiAnsar/claude_code-gemini-mcp/main/install.sh | bash

Manual Install

  1. Clone this repo:
git clone https://github.com/RaiAnsar/claude_code-gemini-mcp.git cd claude_code-gemini-mcp
  1. Run setup with your API key:
./setup.sh YOUR_GEMINI_API_KEY

That's it! 🎉

📖 Usage

Start Claude Code anywhere and use these commands:

claude # Ask Gemini anything mcp__gemini-collab__ask_gemini prompt: "Explain quantum computing in simple terms" # Get code reviews mcp__gemini-collab__gemini_code_review code: "def auth(u): return u.pwd == 'admin'" focus: "security" # Brainstorm ideas mcp__gemini-collab__gemini_brainstorm topic: "How to scale a web app to 1M users" Or simply ask claude code to correlate with Gemini, it is not a rocket sciene... (Author's note)

🛠️ What This Does

  1. Installs the Google Gemini Python SDK
  2. Sets up an MCP server that bridges Claude Code and Gemini
  3. Configures it globally (works in any directory)
  4. Provides tools for collaboration between Claude and Gemini

🔧 Available Tools

  • ask_gemini - Ask Gemini any question
  • gemini_code_review - Get security/performance code reviews
  • gemini_brainstorm - Brainstorm ideas and solutions

📁 Installation Location

The server is installed at: ~/.claude-mcp-servers/gemini-collab/

🐛 Troubleshooting

MCP not showing up?

# Check if it's installed claude mcp list # Reinstall with global scope claude mcp remove gemini-collab claude mcp add --scope user gemini-collab python3 ~/.claude-mcp-servers/gemini-collab/server.py

Connection errors?

  • Check your API key is valid
  • Ensure Python has google-generativeai installed: pip install google-generativeai

🔑 Update API Key

Edit ~/.claude-mcp-servers/gemini-collab/server.py and replace the API key.

🤝 Contributing

Pull requests welcome! Please keep it simple and beginner-friendly.

📜 License

MIT - Use freely!


Made with ❤️ for the Claude Code community

-
security - not tested
A
license - permissive license
-
quality - not tested

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

  1. 🚀 Quick Start (2 minutes)
    1. Prerequisites
    2. One-Line Install
    3. Manual Install
  2. 📖 Usage
    1. 🛠️ What This Does
      1. 🔧 Available Tools
        1. 📁 Installation Location
          1. 🐛 Troubleshooting
            1. 🔑 Update API Key
              1. 🤝 Contributing
                1. 📜 License

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    Provides AI-powered assistance for coding problems using Google's Gemini AI, combined with Perplexity insights and Stack Overflow references, facilitating contextual analysis and automatic response archiving for improved troubleshooting.
                    Last updated -
                    10
                    TypeScript
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Connects Google Search Console with Claude AI to enable SEO professionals to analyze their SEO data through natural language conversations, providing access to property information, search analytics, URL inspection, and sitemap management.
                    Last updated -
                    44
                    Python
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A tool that connects Google Ads with Claude AI, allowing users to analyze advertising data through natural language conversations and access campaign information, performance metrics, keyword analytics, and ad management.
                    Last updated -
                    60
                    Python
                    MIT License
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    Connects Claude Code with multiple AI models (Gemini, Grok-3, ChatGPT, DeepSeek) simultaneously, allowing users to get diverse AI perspectives, conduct AI debates, and leverage each model's unique strengths.
                    Last updated -
                    7
                    Python
                    MIT License

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/RaiAnsar/claude_code-gemini-mcp'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server