Sandbox
@RaiAnsar/claude_code-gemini-mcp

MCP server for Claude Code and Gemini

This repo installs an MCP server that bridges Claude Code with Google Gemini. It lets you call Gemini for questions, code review, and idea generation from inside Claude Code, with global setup so it works across directories.

249 starsβ€’42 forksβ€’Pythonβ€’Updated 1y ago
Who it's for

Builders who use Claude Code and want Gemini tools available in their agent workflow.

What it delivers

You can ask Gemini, review code, and brainstorm ideas without switching out of Claude Code.

What it does

Gemini question tool

Adds `ask_gemini` for sending a prompt to Gemini from Claude Code.

Code review tool

Adds `gemini_code_review` for review prompts with a focus like security or performance.

Brainstorming tool

Adds `gemini_brainstorm` for exploring ideas and solution paths with Gemini.

Global MCP setup

Installs the server under `~/.claude-mcp-servers/gemini-collab/` so it works in any directory.

How to get it

  1. 1Run
    curl -sSL https://raw.githubusercontent.com/RaiAnsar/claude_code-gemini-mcp/main/install.sh | bash
  2. 2Clone this repo
    git clone https://github.com/RaiAnsar/claude_code-gemini-mcp.git
    cd claude_code-gemini-mcp
  3. 3Run setup with your API key
    ./setup.sh YOUR_GEMINI_API_KEY

README

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

Files in the repo

Repository payloadβ€’8 top-level entries
  • .gitignore
  • EXAMPLES.md
  • install.sh
  • LICENSE
  • README.md
  • requirements.txt
  • server.py
  • setup.sh

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph β€” average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code β€” use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300Β΅s in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up β€” it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k