
Gemini
STDIOMCP server for using Google's Gemini AI models with Claude Desktop
MCP server for using Google's Gemini AI models with Claude Desktop
A powerful MCP (Model Context Protocol) server that brings Google's latest Gemini AI models to your favorite development environment. Access Gemini 2.5's thinking capabilities, vision analysis, embeddings, and more through a seamless integration.
🚀 Works with: Claude Desktop, Cursor, Windsurf, and any MCP-compatible client
🎯 Why use this: Get Gemini's cutting-edge AI features directly in your IDE with full parameter control
📚 Self-documenting: Built-in help system means you never need to leave your editor
Model | Context | Features | Best For |
---|---|---|---|
gemini-2.5-pro | 2M tokens | Thinking, JSON, Grounding | Complex reasoning |
gemini-2.5-flash ⭐ | 1M tokens | Thinking, JSON, Grounding | General use |
gemini-2.5-flash-lite | 1M tokens | Thinking, JSON | Fast responses |
gemini-2.0-flash | 1M tokens | JSON, Grounding | Standard tasks |
gemini-1.5-pro | 2M tokens | JSON | Legacy support |
Get Gemini API Key
Configure Your MCP Client
Config location:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "gemini": { "type": "stdio", "command": "npx", "args": ["-y", "github:aliargun/mcp-server-gemini"], "env": { "GEMINI_API_KEY": "your_api_key_here" } } } }
Add to Cursor's MCP settings:
{ "gemini": { "type": "stdio", "command": "npx", "args": ["-y", "github:aliargun/mcp-server-gemini"], "env": { "GEMINI_API_KEY": "your_api_key_here" } } }
Configure in Windsurf's MCP settings following their documentation.
Use the standard MCP stdio configuration:
{ "type": "stdio", "command": "npx", "args": ["-y", "github:aliargun/mcp-server-gemini"], "env": { "GEMINI_API_KEY": "your_api_key_here" } }
Restart Your MCP Client
Once configured, you can use natural language in your MCP client to access Gemini's capabilities:
"Use Gemini to explain quantum computing"
"Analyze this image with Gemini"
"List all Gemini models"
"Get help on using Gemini"
"Use Gemini 2.5 Pro with temperature 0.3 to review this code"
"Use Gemini in JSON mode to extract key points with schema {title, summary, tags}"
"Use Gemini with grounding to research the latest in quantum computing"
📖 See the complete Usage Guide for detailed examples and advanced features.
# Clone repository git clone https://github.com/aliargun/mcp-server-gemini.git cd mcp-server-gemini # Install dependencies npm install # Set up environment variables cp .env.example .env # Edit .env and add your GEMINI_API_KEY # Start development server npm run dev
Contributions are welcome! Please see our Contributing Guide.
Connection Issues
~/Library/Logs/Claude/mcp-server-gemini.log
for Claude Desktop on Mac)API Key Problems
.claude/
directory is excluded from gitMIT