gemini-image-mcp

gemini-image-mcp

MCP server that analyzes images with Google's Gemini vision models, allowing agents to describe or ask questions about images without bloating context.

Category
Visit Server

README

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.

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

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured