Skip to main content
Glama

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 .env

Get 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

GEMINI_API_KEY

yes

Your AI Studio key. Never commit it.

GEMINI_MODEL

no

gemini-flash-latest

Use gemini-pro-latest for harder visual reasoning.

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.js

The 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

image

string | string[]

yes

A single local file path or http(s) URL, or an array of them to compare/reason about together.

prompt

string

no

What to ask. Defaults to a detailed description (one image) or a comparison (several).

model

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.png

License

MIT

Available Tools

1 tool
analyze_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
imageYesAbsolute path to a local image file, or an http(s) URL.
promptNoQuestion/instruction about the image. Defaults to a detailed description.
modelNoOverride the Gemini model (e.g. gemini-pro-latest for harder visual reasoning).

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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. 1 tool updatev0.1.0
    • First observedanalyze_image

TDQS

A3.9/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no possibility of confusion or overlap with other tools.

Naming Consistency5/5

The single tool name 'analyze_image' follows a clear verb_noun pattern and is self-consistent.

Tool Count2/5

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.

Completeness2/5

The tool surface is severely limited, lacking any supporting tools such as model listing or status checks, leaving obvious gaps in functionality.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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