MCP Gemini
Enables AI assistants to leverage Google's Gemini models for text generation, image analysis, code review, multi-turn conversations, and web-grounded answers.
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., "@MCP Geminireview this code diff for bugs and style issues"
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.
MCP Gemini
An MCP server that lets AI assistants use Google's Gemini models. Generate text, analyze images, review code, and more — with support for multi-turn conversations and web-grounded answers.
Works with Claude Desktop, Claude Code, or any MCP-compatible client.
Use Cases
Get a second opinion on code reviews
Analyze screenshots or diagrams
Summarize or translate long documents
Have multi-turn conversations with Gemini for brainstorming
Get up-to-date answers with Google Search grounding
Generate structured JSON for use in other tools
Related MCP server: Gemini Gen MCP
Setup
Requires Node.js 18+.
1. Get a Gemini API Key
Go to Google AI Studio and create an API key.
2. Configure Your MCP Client
Add the server to your MCP client's configuration. There are two ways to do this:
Option A: Run directly from GitHub (no install needed)
{
"mcpServers": {
"gemini": {
"command": "npx",
"args": ["-y", "github:danjam/mcp-gemini"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}Option B: Clone and run locally
git clone https://github.com/danjam/mcp-gemini.git
cd mcp-gemini
npm installThen point your MCP client at the local build:
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/path/to/mcp-gemini/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}Replace /path/to/mcp-gemini with the actual path where you cloned the project.
Changing the Default Model
By default, the server uses gemini-flash-latest. To change this, add GEMINI_DEFAULT_MODEL to your environment:
"env": {
"GEMINI_API_KEY": "your-api-key-here",
"GEMINI_DEFAULT_MODEL": "gemini-pro-latest"
}What You Can Do
Generate Text
Ask Gemini to write, answer questions, summarize, translate, or anything else text-based.
Tool: generate_text
Parameter | Type | Required | Description |
| string | Yes | What you want Gemini to do |
| string | No | Which model to use |
| string | No | Set the tone or role (e.g. "You are a helpful tutor") |
| number | No | How creative the response is (0 = focused, 2 = creative). Default: 0.7 |
| number | No | Limit the response length. Default: 2048 |
| boolean | No | Let Gemini search the web for up-to-date answers |
| string | No | Continue a multi-turn conversation (see below) |
| boolean | No | Get the response as structured JSON |
| object | No | Define the exact shape of the JSON response |
| array | No | Adjust content filtering thresholds |
Analyze Images
Send an image and ask questions about it — describe what's in a photo, read text from a screenshot, identify objects, and more. Provide either imageUrl or imageBase64.
Tool: analyze_image
Parameter | Type | Required | Description |
| string | Yes | Your question about the image |
| string | No | URL of the image to analyze |
| string | No | Base64-encoded image (with or without data URI prefix) |
| string | No | Which model to use |
List Models
See all available Gemini models. No parameters needed.
Tool: list_models
Code Review
Review a code diff for bugs, style issues, security concerns, and improvements. Uses low temperature (0.3) for focused, consistent feedback.
Tool: code_review
Parameter | Type | Required | Description |
| string | Yes | The code diff or code to review |
| string | No | Focus areas or additional context (e.g. "focus on security") |
| string | No | Which model to use |
| number | No | Limit the response length. Default: 4096 |
Note: Use list_models to see available models, or pass any model name directly. Pro models aren't available on the free tier — if you see a quota error, switch to a Flash model or upgrade your plan.
Conversations
You can have multi-turn conversations where Gemini remembers what was said before. Pass the same conversationId across multiple generate_text calls:
First message:
{ "prompt": "What is photosynthesis?", "conversationId": "chat-1" }Follow-up:
{ "prompt": "Explain it to a 5-year-old", "conversationId": "chat-1" }
Gemini will remember the first message when answering the follow-up.
Conversations expire after 30 minutes of inactivity.
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danjam/mcp-gemini'
If you have feedback or need assistance with the MCP directory API, please join our Discord server