Integrates Google Gemini's generative AI capabilities, providing tools for text generation, vision-based image analysis, multi-turn chat sessions, creative brainstorming, and AI image generation using Gemini 1.5 and 2.0 models.
Click on "Install 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 MCP Servergenerate an image of a cyberpunk city in a collage style"
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 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 |
| Generate text content (writing, analysis, code) |
| Analyze images with vision capabilities |
| Creative brainstorming for zines, articles, content |
| Multi-turn conversations with memory |
| List active chat sessions |
| Clear a chat session |
| Generate zine page content with layout suggestions |
| 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 install2. 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 programmingImage Analysis:
Use gemini_analyze_image to describe /path/to/image.jpgCreative Brainstorming:
Use gemini_brainstorm for a zine about urban gardening with punk styleImage Generation:
Use gemini_generate_image to create a collage-style illustration of a mushroom forestModels Used
Text:
gemini-1.5-flash(default),gemini-1.5-pro,gemini-2.0-flash-expImages:
gemini-2.0-flash-exp-image-generation
License
MIT
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.