MCP server that exposes Google Gemini as tools for Claude Code
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Lightweight MCP server that exposes Google Gemini as tools for Claude Code (or any MCP client).
Use Gemini for second opinions, large-context analysis, code review, or anything where a different model perspective helps.
| Tool | Description |
|---|---|
gemini_ask | Ask Gemini a question or give it a task |
gemini_analyze | Send code/text for analysis with a specific instruction |
gemini_chat | Multi-turn conversation with full history |
gemini_models | List available Gemini models |
Go to Google AI Studio and create a free API key.
Option A โ Clone (recommended for Claude Code)
Option B โ npx (no install)
Add to ~/.claude/settings.json:
Or with npx:
| Variable | Default | Description |
|---|---|---|
GEMINI_API_KEY | (required) | Google AI Studio API key |
GEMINI_MODEL | gemini-2.5-pro | Default model for all tools |
| Model | Best for |
|---|---|
gemini-2.5-pro | Best quality, large context (1M tokens) |
gemini-2.5-flash | Fast, good for most tasks |
gemini-2.0-flash | Fastest, simple tasks |
Every tool accepts an optional model parameter to override the default per-call.
| Problem | Solution |
|---|---|
GEMINI_API_KEY is not set | Add the key to your env block in settings.json |
429 Too Many Requests | Built-in retry handles this โ wait a few seconds |
Model not found | Run gemini_models to list valid model names |
| Tools not appearing in Claude Code | Check ~/.claude/settings.json syntax, restart Claude Code |
ECONNREFUSED | Check network/firewall โ the server calls generativelanguage.googleapis.com |
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gemini)<a href="https://allmcps.com/mcp/gemini"><img src="https://allmcps.com/api/badge/gemini?style=directory" alt="Gemini on AllMCPs" /></a>