gemini-image-mcp
This server lets an AI agent (e.g., Claude Code) analyze images using Google's Gemini vision models and receive text-based answers without loading raw image data into the agent's context window.
Analyze a single image: Provide a local file path or HTTP(S) URL and receive a detailed text description or answer.
Compare multiple images: Pass an array of images (e.g., before/after screenshots) to reason about differences or similarities in a single request.
Ask custom questions: Supply an optional prompt to guide the analysis (e.g., "What does this chart show?"), or let it default to a general description/comparison.
Override the Gemini model per request: Choose a specific model (e.g.,
gemini-pro-latest) for more demanding visual reasoning tasks.Wide format support: Works with PNG, JPEG, WebP, GIF, BMP, HEIC/HEIF, and PDF files.
Context efficiency: Processes raw image bytes server-side and returns only the textual analysis, preventing context window bloat.
Safe key handling: API key is read from a local
.envfile and not exposed to the calling agent.
Typical use cases include interpreting screenshots, UI states, diagrams, charts, and performing visual comparisons.
Analyzes images using Google's Gemini vision models, enabling AI agents to understand visual content via text prompts.
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-image-mcpDescribe this UI mockup: /designs/mockup.png"
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-image-mcp
A tiny MCP server that analyzes images with Google's
Gemini vision models. It exposes one tool, analyze_image, that takes a local image path
(or URL) plus an optional prompt and returns Gemini's text answer.
Why: it lets an agent (e.g. Claude Code) read screenshots, diagrams, charts, or UI states by reference — the raw image bytes go to Gemini, and only the text answer comes back, so they never bloat the calling agent's context window.
It talks straight to the Gemini REST API (generativelanguage.googleapis.com) with fetch —
no Google SDK, no gemini-cli, nothing tied to the deprecated consumer CLI.
Setup
npm install
npm run build
cp .env.example .env # then put your key in .envGet an API key at https://aistudio.google.com/apikey.
Configuration
Set via .env (loaded automatically from the repo root) or ambient environment:
Variable | Required | Default | Notes |
| yes | — | Your AI Studio key. Never commit it. |
| no |
| Use |
The key is sent as an x-goog-api-key header (kept out of URLs/logs) and is never written
to a tracked file — .env is gitignored.
Related MCP server: VisionPower
Use with Claude Code
claude mcp add gemini-image -- node /absolute/path/to/gemini-image-mcp/dist/index.jsThe server loads its own .env, so no key needs to live in Claude's config. Restart Claude
Code, then it can call analyze_image with an image path and an optional prompt.
Tool: analyze_image
Argument | Type | Required | Description |
| string | string[] | yes | A single local file path or |
| string | no | What to ask. Defaults to a detailed description (one image) or a comparison (several). |
| string | no | Per-call model override. |
Pass several images to compare them (before/after, spot-the-difference, "do these match"). Each is
labelled Image 1, Image 2, … in order, so the prompt can refer to them. All images ride in a single
Gemini request.
Supported inputs: PNG, JPEG, WebP, GIF, BMP, HEIC/HEIF, and PDF.
Smoke test
Verify the key + API + image path end to end, without the MCP layer. The prompt comes
first (pass "" for the default), then one or more images:
npm run smoke -- "What does this image say?" ./test/sample.png
npm run smoke -- "What changed between these?" ./before.png ./after.pngLicense
MIT
Available Tools
1 toolanalyze_imageAnalyze image with GeminiA
Analyze a local image file (or image URL) with Google's Gemini vision models and return a text answer. Use this to read screenshots, diagrams, charts, or UI states without loading raw image bytes into the calling agent's context.
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Absolute path to a local image file, or an http(s) URL. | |
| prompt | No | Question/instruction about the image. Defaults to a detailed description. | |
| model | No | Override the Gemini model (e.g. gemini-pro-latest for harder visual reasoning). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions that the tool returns a 'text answer', but does not elaborate on limitations (e.g., file size, format support), security considerations, or whether the image is sent to an external service.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences that efficiently convey the tool's purpose and usage context. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description provides a solid overview of the tool's purpose and usage. However, it could be more complete by mentioning the return format, authentication requirements, or any limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The tool description does not add additional meaning beyond the schema, making it adequate but not outstanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'analyze', the resource ('local image file or image URL'), and the specific use cases ('screenshots, diagrams, charts, or UI states'), making the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly suggests when to use the tool ('read screenshots, diagrams, charts, or UI states') and highlights a key benefit ('without loading raw image bytes'). However, it does not mention when not to use it or provide alternative tools, so it's not a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.0- First observed
analyze_image
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion or overlap with other tools.
The single tool name 'analyze_image' follows a clear verb_noun pattern and is self-consistent.
A single tool is too few for the apparent scope of image analysis; users would likely expect additional tools for model selection or listing capabilities.
The tool surface is severely limited, lacking any supporting tools such as model listing or status checks, leaving obvious gaps in functionality.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
MCP server for Flux AI image generation
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
MCP server for Grok Imagine AI video generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that analyzes images using OpenRouter's Gemini Flash model, supporting local file paths and URLs.11MIT
- AlicenseAqualityAmaintenanceA portable image-understanding MCP server that lets agents analyze local images, URLs, or base64 images via an OpenAI-compatible vision model.131072MIT
- FlicenseNot gradedqualityBmaintenanceMCP server using Google Gemini to read and describe image content, supporting single or multiple images and custom prompts.-
- AlicenseAqualityBmaintenanceMCP server that analyzes images, reads code and ZIP archives, and provides text context for non-vision models.3102MIT
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/AmyJeanes/gemini-image-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server