Gemini MCP Server
Integrates Google Gemini API capabilities into Claude Code, supporting text generation, image analysis, and AI image creation. It features specialized tools for creative brainstorming and managing multi-turn chat sessions.
README
Gemini MCP Server
A Model Context Protocol (MCP) server for Google Gemini API integration with Claude Code. Provides text generation, image analysis, creative brainstorming, multi-turn chat, and AI image generation.
Features
| Tool | Description |
|---|---|
gemini_generate |
Generate text content (writing, analysis, code) |
gemini_analyze_image |
Analyze images with vision capabilities |
gemini_brainstorm |
Creative brainstorming for zines, articles, content |
gemini_chat |
Multi-turn conversations with memory |
gemini_list_conversations |
List active chat sessions |
gemini_clear_conversation |
Clear a chat session |
gemini_zine_page |
Generate zine page content with layout suggestions |
gemini_generate_image |
Generate images using Gemini's image models |
Setup
1. Clone the repository
git clone https://github.com/jeffemmett/gemini-mcp.git ~/.claude/mcp-servers/gemini
cd ~/.claude/mcp-servers/gemini
npm install
2. Get a Gemini API Key
- Go to Google AI Studio
- Create a new API key
- Copy the key
3. Set your API key
Add to your shell profile (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish):
# Bash/Zsh
export GEMINI_API_KEY="your_api_key_here"
# Fish
set -gx GEMINI_API_KEY "your_api_key_here"
Then reload your shell or run source ~/.bashrc.
4. Configure Claude Code
Add to your project's .mcp.json or global MCP config:
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/path/to/.claude/mcp-servers/gemini/index.js"],
"env": {
"GEMINI_API_KEY": "${GEMINI_API_KEY}"
}
}
}
}
Replace /path/to/ with your actual home directory path (e.g., /home/username/ or /Users/username/).
Optional Configuration
Output Directory
Generated images and saved outputs go to ~/Documents/gemini-output/ by default. Override with:
export GEMINI_OUTPUT_DIR="/your/preferred/path"
Usage Examples
Once configured, the tools are available in Claude Code:
Text Generation:
Use gemini_generate to write a haiku about programming
Image Analysis:
Use gemini_analyze_image to describe /path/to/image.jpg
Creative Brainstorming:
Use gemini_brainstorm for a zine about urban gardening with punk style
Image Generation:
Use gemini_generate_image to create a collage-style illustration of a mushroom forest
Models Used
- Text:
gemini-1.5-flash(default),gemini-1.5-pro,gemini-2.0-flash-exp - Images:
gemini-2.0-flash-exp-image-generation
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.