gemini-mcp
Provides tools to interact with Google Gemini models, including asking questions, analyzing code/text, multi-turn conversations, and listing available models, with per-call model overrides.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gemini-mcpUse gemini_ask to explain the difference between std::expected and std::optional"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gemini-mcp
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.
Tools
Tool | Description |
| Ask Gemini a question or give it a task |
| Send code/text for analysis with a specific instruction |
| Multi-turn conversation with full history |
| List available Gemini models |
Related MCP server: Gemini Bridge
Quick Start
1. Get an API key
Go to Google AI Studio and create a free API key.
2. Install
Option A — Clone (recommended for Claude Code)
git clone https://github.com/PavelGuzenfeld/gemini-mcp.git ~/.claude/mcp-servers/gemini
cd ~/.claude/mcp-servers/gemini
npm installOption B — npx (no install)
npx claude-gemini-mcp3. Register with Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/home/you/.claude/mcp-servers/gemini/index.js"],
"env": {
"GEMINI_API_KEY": "your-key-here"
}
}
}
}Or with npx:
{
"mcpServers": {
"gemini": {
"command": "npx",
"args": ["-y", "claude-gemini-mcp"],
"env": {
"GEMINI_API_KEY": "your-key-here"
}
}
}
}Usage Examples
Ask a question
> Use gemini_ask to explain the difference between std::expected and std::optional
Gemini says: std::optional<T> represents a value that may or may not be present...
std::expected<T, E> additionally carries an error value when the expected value is absent...Analyze code
> Use gemini_analyze to review this function for performance issues:
instruction: "Find performance bottlenecks"
content: <your code here>
Gemini says: Line 12 allocates inside the loop — move the vector outside...Multi-turn conversation
> Use gemini_chat with messages:
[{"role": "user", "content": "Design a REST API for a task manager"},
{"role": "model", "content": "Here's a RESTful design..."},
{"role": "user", "content": "Now add authentication"}]
Gemini says: Building on the previous design, add JWT-based auth...Override model per call
> Use gemini_ask with model: "gemini-2.5-flash" to quickly summarize this error logEnvironment Variables
Variable | Default | Description |
| (required) | Google AI Studio API key |
|
| Default model for all tools |
Models
Model | Best for |
| Best quality, large context (1M tokens) |
| Fast, good for most tasks |
| Fastest, simple tasks |
Every tool accepts an optional model parameter to override the default per-call.
Features
Retry with exponential backoff on rate limits (429) and server errors (5xx)
Graceful error reporting back to the MCP client (no crashes)
Per-call model override
Zero configuration beyond the API key
Troubleshooting
Problem | Solution |
| Add the key to your |
| Built-in retry handles this — wait a few seconds |
| Run |
Tools not appearing in Claude Code | Check |
| Check network/firewall — the server calls |
Development
git clone https://github.com/PavelGuzenfeld/gemini-mcp.git
cd gemini-mcp
npm install
npm test # Run smoke tests
node index.js # Start the MCP server locallyLicense
This server cannot be deployed
Maintenance
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server implementation that allows using Google's Gemini AI models (specifically Gemini 1.5 Pro) through Claude or other MCP clients via the Model Context Protocol.1MIT
- AlicenseAqualityFmaintenanceA lightweight MCP server that enables AI coding assistants to interact with Google's Gemini AI through the official CLI.3MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that integrates Google Gemini CLI with Claude Code for AI-powered development assistance, enabling code review, bug analysis, feature planning, and code explanation without requiring an API key.8MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides access to Google Gemini models via Vertex AI, enabling text generation, multi-turn chat, image/video generation, and frontend design through Claude Code.21MIT