agent-eyes-mcp
It gives text-only LLM agents the ability to 'see' images by running a single MCP tool that sends images to a vision-language model and returns a text description.
Describe one or more images via local file path, http(s) URL, data: URI, or raw base64 string
Use preset tasks: describe (default), ocr, ui, or qa
Ask a custom question about the image(s), which overrides the preset task
Pass multiple images at once; each gets its own section in the reply
Choose detail level: low, high, or auto (OpenAI-compatible provider only)
Work with multiple backends: OpenAI-compatible, Anthropic, Gemini, or local Ollama
Automatically preprocesses large images: downscaling, tiling, EXIF normalization, metadata stripping, and pixel-bomb rejection
Caches results in memory and optionally on disk to avoid repeated API calls
Returns structured output with text, model, provider, image count, and cache status
Can also be used from the CLI, e.g.
agent-eyes-mcp describe ./screenshot.png
Provides image description capabilities using Google Gemini vision-language models.
Provides image description capabilities using local Ollama vision-language models.
Provides image description capabilities through OpenAI-compatible vision-language models, including default DashScope and other compatible endpoints.
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., "@agent-eyes-mcpRead the error message in error_screenshot.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.
agent-eyes-mcp
Give text-only LLM agents eyes: describe images through a vision-language model (VLM) via MCP or CLI.
Text models cannot see screenshots, error dialogs, or charts. agent-eyes-mcp is a single npm package that runs as an MCP server (stdio) exposing one tool, describe_image, which sends one or more images to a VLM API and returns a text description. The image is never attached to the model's context — the VLM does the seeing, the text model reads the answer.
Install in one line: npx -y agent-eyes-mcp.
Features
One MCP tool,
describe_image— accepts a local file path, anhttp(s)URL, adata:URI, or a raw base64 string; pass one image or an array of several.Four preset tasks —
describe(default),ocr,ui,qa, plus an optional free-formquestionthat overrides the task.Model-friendly tool description — tells the agent exactly when to use it (screenshots, error screens, charts, UI, image paths in messages) and that it exists precisely for the case where an image cannot be attached directly to the conversation.
Automatic preprocessing — images over 10 MB or wider than 2048 px are downscaled; large high-resolution images are split into a full view plus tiled crops (multi-crop) so small VLMs can read them. EXIF orientation is normalized and metadata stripped; re-encoding retries at lower JPEG quality to stay within the byte budget. Falls back to the original bytes on any failure. Images whose header claims more than 100 megapixels (a pixel bomb) are rejected as too large rather than processed.
Multi-image descriptions — pass several images at once; the reply contains one
## Image N (<source>)section per image.Four provider backends — OpenAI-compatible (default, e.g. DashScope / MiniMax), Anthropic, Google Gemini, and local Ollama, selected with
VISION_PROVIDER.Safe by default — local files are sandboxed to the working directory (
AGENT_EYES_ALLOWED_DIRto widen), URLs are SSRF-guarded (DNS failures fail closed; private, NAT64, IPv4-mapped, and non-unicast addresses are rejected; every redirect hop is re-checked — see URL safety), and total input across all images is capped at 20 MB.Two-layer cache — in-process LRU (128 entries) plus an optional persistent disk cache (
AGENT_EYES_DISK_CACHE=1). The key issha256(raw bytes + prompt + model + provider + detail)computed before preprocessing, so identical image + question + model pairs never call the API twice — even across restarts.Structured output — successful tool calls also return
structuredContentwith the full text, model, provider, image count, and cache status.Output protection — descriptions longer than 4000 characters are written in full to a temp file; the tool returns the first 2000 characters plus the file path.
Never crashes on bad input — every failure (missing API key, network error, missing file, out-of-bounds path) returns structured, actionable error text.
Pure stdio MCP — no logs on stdout (they would corrupt JSON-RPC); all logging goes to stderr.
Related MCP server: llm-vision-mcp
Quick start
export VISION_API_KEY=sk-... # required (default provider)
npx -y agent-eyes-mcp # starts the MCP stdio serverClaude Code
.mcp.json at the project root (or use claude mcp add):
{
"mcpServers": {
"agent-eyes": {
"command": "npx",
"args": ["-y", "agent-eyes-mcp"],
"env": {
"VISION_API_KEY": "sk-...",
"VISION_MODEL": "qwen-vl-max"
}
}
}
}or with the CLI:
claude mcp add agent-eyes --env VISION_API_KEY=sk-... -- npx -y agent-eyes-mcpClaude Code hook: point image references at describe_image
Text-only Claude Code sessions cannot attach images. The built-in hook subcommand injects a hint (via additionalContext) whenever the user's message references an image file, telling the agent to use describe_image instead of trying to read the file. Add it to .claude/settings.json:
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "npx -y agent-eyes-mcp hook",
"timeout": 5
}
]
}
]
}
}The hook never blocks the prompt — on no image match it exits silently with code 0.
Cursor
Settings → MCP → Add server, or .cursor/mcp.json:
{
"mcpServers": {
"agent-eyes": {
"command": "npx",
"args": ["-y", "agent-eyes-mcp"],
"env": {
"VISION_API_KEY": "sk-..."
}
}
}
}Then ask the agent to "read this screenshot", "what does this error say", etc.
Kimi Code
~/.kimi-code/mcp.json (user level) or .kimi-code/mcp.json (project level), or run /mcp-config in the TUI:
{
"mcpServers": {
"agent-eyes": {
"command": "npx",
"args": ["-y", "agent-eyes-mcp"],
"env": {
"VISION_API_KEY": "sk-..."
}
}
}
}Other MCP clients
Any client that supports stdio MCP servers works the same way: run npx -y agent-eyes-mcp and pass VISION_API_KEY (plus VISION_PROVIDER / VISION_BASE_URL / VISION_MODEL as needed) in the server's environment. The tool is named describe_image (clients usually show it as agent-eyes_describe_image or mcp__agent-eyes__describe_image).
CLI usage
agent-eyes-mcp # start the MCP stdio server (default)
agent-eyes-mcp serve # same
agent-eyes-mcp describe ./screenshot.png # describe an image
agent-eyes-mcp describe a.png b.png -q "Which one shows the error?" # multiple images
agent-eyes-mcp describe https://example.com/a.png -t ocr
agent-eyes-mcp describe data:image/png;base64,... --detail low
agent-eyes-mcp --helpIn CLI mode the description is printed in full to stdout.
Providers
VISION_PROVIDER selects the backend; unknown values fail fast with an actionable error.
| Default base URL | Default model | Auth / notes |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| No API key. |
Reasoning models (MiniMax-M3, Qwen3, …) that emit <think>...</think> blocks have the reasoning stripped automatically — including truncated blocks that never close; a response that is only reasoning is treated as an error.
Example — MiniMax as the backend (verified end to end):
export VISION_PROVIDER=openai # default
export VISION_BASE_URL=https://api.minimaxi.com/v1
export VISION_MODEL=MiniMax-M3
export VISION_API_KEY=sk-... # MiniMax API keyEnvironment variables
Variable | Required | Default | Description |
| no |
| Backend: |
| openai* | — | API key for the OpenAI-compatible provider (also a fallback for anthropic/gemini). |
| no |
| Base URL of an OpenAI-compatible |
| no |
| OpenAI-compatible model name. |
| anthropic* | — | Anthropic API key (falls back to |
| no |
| Anthropic Messages API base URL. |
| no |
| Anthropic model name. |
| gemini* | — | Google Gemini API key (falls back to |
| no |
| Gemini |
| no |
| Gemini model name. |
| no |
| Local Ollama base URL. |
| no |
| Ollama vision model name (must be pulled first). |
| no | working directory | Root directory the file sandbox permits (relative paths still resolve against |
| no | (off) | Set to |
| no |
| Disk cache directory (created lazily). |
| no |
| Vision API request timeout in milliseconds. |
| no |
| URL image fetch timeout in milliseconds. |
| no |
| DNS lookup timeout (for URL fetches) in milliseconds. |
* required for that provider only.
Image inputs, preprocessing & limits
Form | Example | Notes |
File path |
| Relative paths resolve against |
URL |
|
|
data: URI |
| The declared MIME is validated against the image magic bytes. |
base64 |
| MIME is sniffed from magic bytes. |
Preprocessing (before calling the VLM):
Images whose long edge exceeds 2048 px or whose size exceeds 10 MB are downscaled to fit inside 2048 px and re-encoded as JPEG; quality is stepped down (85 → 35) until the view fits 10 MB. EXIF orientation is applied and metadata stripped.
Images at or above 1800 px on the long edge and 3.5 MP are split into a full (downscaled) view plus up to 4 tiles (5 views total). The reply's prompt tells the model that view 1 is the full image and views 2..N are crops ordered left-to-right then top-to-bottom.
If
sharpcannot decode the image, or any preprocessing step fails, the original bytes are passed through untouched — preprocessing never turns a valid image into an error.Images whose decoded pixel count exceeds 100 megapixels are rejected with an actionable
too_largeerror (pixel bomb). The metadata read bypasses sharp's own default pixel limit so the oversized file is detected up front, before any decode work.Total input across all images is capped at 20 MB (checked on the raw bytes before preprocessing). Exceeding it returns an actionable error; a single large image is preprocessed instead of rejected.
URL safety model
Fetching an http(s) URL is the riskiest input path, so it is handled defensively:
DNS failures fail closed. If the host cannot be resolved, the request is a hard
fetch_failederror — there is no "try anyway" fallback.The resolved address is checked, not the hostname. Loopback, private (RFC 1918), link-local, CGNAT (RFC 6598), multicast, broadcast, and reserved addresses are rejected. IPv4-mapped IPv6 addresses (
::ffff:a.b.c.d) are unwrapped and re-checked as IPv4, and the NAT64 prefix64:ff9b::/96(which also covers the RFC 8215 /48 form) is rejected outright. Any other non-unicast IPv6 address is rejected.Redirects are followed manually, one hop at a time (max 5). Every hop must be an
http(s)URL that passes the same address checks; a redirect tofile:, a private host, or a local address is rejected. This keeps a public image host from bouncing the fetch into the local network.Connections are pinned to the validated addresses. DNS is resolved once per hop, every answer is validated, and the connection's
lookupis replaced with a function that only ever returns those validated addresses — the fetch performs no second DNS resolution, so a resolver that changes its answers between check and connect (DNS rebinding / TOCTOU) cannot redirect the connection to a private address. URL fetching uses undici's ownfetchbecause Node's built-infetchrejects dispatchers from the npm undici package.Body cap: at most 20 MB is read (streamed), and the connection is never used for anything else.
Known tradeoffs (accepted for now)
These came out of a security/robustness review but are deliberately out of scope for this round:
Provider construction boilerplate — the four providers in
src/provider.tseach repeat the same constructor plumbing (apiKey/baseUrl/model/fetchImpl). A shared base class or factory would dedupe it; left explicit so each adapter stays self-contained.Duplicate limit constants —
MAX_TILE_EDGEandMAX_DOWNSCALE_EDGEare both 2048 and could be merged. Likewise the documented limits (10 MB, 2048 px, 20 MB, 100 MP) are repeated in prose here and in the CLI help instead of being derived from the shared constants.Hand-rolled response parsing — provider responses are parsed with defensive type casts rather than schemas; a small zod schema per provider would yield exact error messages for malformed payloads.
Caching, structured output & output protection
Memory cache: in-process LRU, 128 entries. The key is
sha256(raw resolved bytes + prompt + model + provider + detail), computed before preprocessing so a hit skips all sharp work.Disk cache: with
AGENT_EYES_DISK_CACHE=1, successful descriptions are written underAGENT_EYES_DISK_CACHE_DIR(defaultos.tmpdir()/agent-eyes-mcp/cache) as<key>.txt(0700 dir / 0600 files, atomic temp-file+rename writes, capped at 500 entries by mtime) and reused across restarts; a disk hit backfills the memory cache. Read/write failures are logged and ignored.Structured output: successful
describe_imagetool calls returnstructuredContent={ text, model, provider, imageCount, cached, truncatedTo? }alongside the plain-text content.Output: MCP tool replies longer than 4000 characters are stored in full in a private temp file (
os.tmpdir()/agent-eyes-mcp/truncated/description-<uuid>.txt, 0700 dir / 0600 file); the tool returns the first 2000 characters plus the file path. CLI mode always prints the full description.
Error handling
All failures return structured text like [agent-eyes-mcp] Error (sandbox_denied): ... Hint ... as the tool's content — the process never crashes. Logs go to stderr only; stdout is reserved for MCP JSON-RPC (or CLI output).
Development
npm install
npm run typecheck # tsc --noEmit
npm run build # tsup -> single ESM bundle at dist/index.js (sharp stays external)
npm test # vitest
npm run smoke # spawns the built server and drives initialize/tools/list/tools/call over stdioRoadmap
MCP Registry listing /
mcp.jsoninstallationRemote (HTTP/SSE) transport
License
MIT
Available Tools
1 tooldescribe_imageA
Analyze one or more images with a vision-language model (VLM) and return a text description. USE THIS TOOL when an image cannot be attached directly to the conversation but the model needs to see it: screenshots and screen recordings, error dialogs / crash screens, terminal or log output captured as images, charts, plots and diagrams, UI mockups and designs, photos, memes, or whenever a message references an image file path, http(s) URL, data: URI, or base64 string.Provide the image as: a local file path (relative paths resolve against the server working directory), an http(s) URL, a data: URI, or a raw base64 string. Pass a single string, or an array of strings to describe several images together (the reply contains one section per image).Optional parameters: question for a targeted question (overrides task), task preset (describe | ocr | ui | qa, default describe), detail level (low | high | auto, default high; forwarded only by the OpenAI-compatible provider).
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | Preset task. Ignored when question is provided. | describe |
| image | Yes | Image location(s): a local file path (relative paths resolve against the working directory), an http(s) URL, a data: URI, or a raw base64 string. Pass one string, or an array of strings for multiple images. | |
| detail | No | Image detail level sent to the vision API. Only the OpenAI-compatible provider forwards it. | high |
| question | No | Optional targeted question about the image(s). When provided, overrides task. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden of disclosing behavior. It specifies the model used (VLM), return format (text description, one section per image), accepted input formats (paths, URLs, data URIs, base64), and nuances like 'relative paths resolve against the server working directory' and 'detail ... forwarded only by the OpenAI-compatible provider.' This goes well beyond the bare minimum.
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?
The description is longer than average but well-organized: it begins with the core purpose, then covers when to use, input formats, and optional parameters. Every section earns its place; the only minor deduction is for slight redundancy with the schema, which could be trimmed.
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?
With no output schema, no annotations, and no sibling tools, the description still fully equips an agent: it explains input formats, output structure ('the reply contains one section per image'), parameter overrides, and provider-specific behavior. This is more than sufficient for a tool of this complexity.
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%, and each parameter already includes a descriptive comment in the schema. The description largely restates this information (e.g., 'question for a targeted question (overrides task)' matches the schema's 'Overrides task') rather than adding entirely new semantic detail. It does offer minor clarifications like the array meaning 'several images together,' but this is also already in the schema.
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 opens with a specific verb+resource: 'Analyze one or more images with a vision-language model (VLM) and return a text description.' It clearly distinguishes when this tool is needed (when an image cannot be attached directly to the conversation) and lists concrete use cases, which effectively differentiates it from any hypothetical alternative.
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 tells agents when to use the tool: 'USE THIS TOOL when an image cannot be attached directly to the conversation' followed by a comprehensive list of scenarios (screenshots, error dialogs, charts, etc.). This provides clear context and practical guidance without needing to name sibling tools.
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
describe_image
TDQS
With only one tool, there is no possibility of confusion or overlap. The tool's purpose is clearly defined in its description.
The single tool name 'describe_image' follows a clear verb_noun pattern, which is consistent and predictable even with only one tool.
A one-tool server feels thin, but the tool description covers a broad range of image understanding tasks. It is borderline, not excessive.
The tool covers many use cases (OCR, UI analysis, question answering, multiple image formats), but lacks separate operations like listing supported models or image preprocessing. Minor gaps, but core functionality is solid.
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
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables any LLM to describe images from file paths, URLs, or base64 data by forwarding them to a supported vision provider such as OpenAI, Anthropic, or local Ollama models.1,06010MIT
- AlicenseBqualityBmaintenanceProvides vision capabilities to text-only LLMs by analyzing image files via Qwen-VL and returning textual descriptions, with support for OCR, UI analysis, diagram/chart understanding, and code extraction through MCP stdio.7364MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that provides a 'borrowed eye' for text-only LLMs, enabling them to identify and describe local images via the Qwen VL vision model, including face recognition, scene description, OCR, and targeted visual questioning.3Apache 2.0
- FlicenseNot gradedqualityBmaintenanceA desktop tray MCP server that gives text-only LLMs vision by sending images to a multimodal model (e.g., MiMo) and returning the answer, allowing MCP-compatible agents to analyze local images, URLs, or base64 data.2-
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/huangzhixin0420/agent-eyes-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server