vision-mcp
Click on "Deploy 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., "@vision-mcp Extract text from image at /tmp/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.
vision-mcp
Give MCP-compatible AI agents image analysis, metadata inspection, cropping, OCR, and image comparison through any OpenAI-compatible vision model.
Features
Analyze screenshots, charts, documents, UI, objects, and general images.
Inspect image dimensions and metadata without calling a model.
Crop and zoom into regions using normalized coordinates.
Extract visible text with a VLM or an optional dedicated OCR model.
Compare two to four images.
Accept public URLs, local files, data URLs, and Base64 images.
Run locally over the standard MCP stdio transport.
Related MCP server: vision-bridge-mcp
Claude Code
Requirements
Python 3.10 or newer
An OpenAI-compatible vision API endpoint and API key
uvx downloads the published package from PyPI into an isolated environment
and runs it. It does not use the source code in your current directory and
does not permanently install the package into your system Python.
Add To Claude Code
The command below configures Claude Code to start vision-mcp from PyPI:
claude mcp add --scope user vision \
--env UV_DEFAULT_INDEX=https://pypi.org/simple \
VISION_API_KEY="your-api-key" \
VISION_BASE_URL="https://your-provider.example/v1" \
VISION_MODEL_ID="your-vision-model" \
-- uvx vision-mcpUse UV_DEFAULT_INDEX=https://pypi.org/simple when your local PyPI mirror has
not synchronized the latest release.
Verify the connection:
claude mcp get vision
claude mcp listThen start Claude Code and ask:
Use vision_capabilities to show the available vision tools.Analyze a local image:
Use vision_inspect on /data/example.png, then use vision_analyze to describe it.By default, local image access is limited to /data and /tmp. Add another
directory with:
claude mcp remove --scope user vision
claude mcp add --scope user vision \
--env UV_DEFAULT_INDEX=https://pypi.org/simple \
VISION_API_KEY="your-api-key" \
VISION_BASE_URL="https://your-provider.example/v1" \
VISION_MODEL_ID="your-vision-model" \
VISION_ALLOWED_PATHS="/data,/tmp,/home/your-user/Pictures" \
-- uvx vision-mcpDedicated OCR Model
Without dedicated OCR configuration, vision_extract_text uses the configured
vision model. To use a separate OCR model:
claude mcp add --scope user vision \
--env UV_DEFAULT_INDEX=https://pypi.org/simple \
VISION_API_KEY="your-vision-api-key" \
VISION_BASE_URL="https://your-provider.example/v1" \
VISION_MODEL_ID="your-vision-model" \
OCR_ENABLED=true \
OCR_API_KEY="your-ocr-api-key" \
OCR_BASE_URL="https://your-provider.example/v1" \
OCR_MODEL_ID="your-ocr-model" \
-- uvx vision-mcpNever commit real API keys to Git.
Other MCP Clients
Use this stdio configuration with MCP clients that accept JSON configuration:
{
"mcpServers": {
"vision": {
"command": "uvx",
"args": ["vision-mcp"],
"env": {
"UV_DEFAULT_INDEX": "https://pypi.org/simple",
"VISION_API_KEY": "your-api-key",
"VISION_BASE_URL": "https://your-provider.example/v1",
"VISION_MODEL_ID": "your-vision-model"
}
}
}
}Tools
Tool | Purpose |
| Analyze an image with task-specific prompts |
| Read image dimensions, format, size, and mode |
| Crop and analyze a normalized image region |
| Extract visible text using OCR or the VLM |
| Compare two to four images |
| Show server configuration and limits |
Response format
Every tool returns a JSON string. Clients must json.loads the result
before reading any field. All top-level keys are always present (even when
empty), so consumers can iterate the envelope without dict.get(...)
guards.
Success envelope
{
"schema_version": "1.0",
"ok": true,
"tool": "vision_analyze",
"task": "general",
"model": "...",
"source": null,
"sources": [],
"result": {},
"warnings": [],
"raw_model_output": null,
"error": null
}Field | Type | When set |
|
| Always. Currently |
|
| Always. |
|
| Always. The tool name (e.g. |
|
| The |
|
| The configured model identifier (e.g. |
|
| Single-image tools. |
|
|
|
|
| Tool-specific (see below). |
|
| Always a list (empty on success). Soft-failure notes (e.g. |
|
| Sanitized provider response when |
|
|
|
SourceMeta fields: type (url / file / data_url / base64),
mime_type, width, height, size_bytes, source_ref (only when
include_source_ref=true; redacted to host/path for URLs or basename
for files; null for data URLs and base64).
Failure envelope
{
"schema_version": "1.0",
"ok": false,
"tool": "vision_analyze",
"task": "general",
"model": "...",
"source": null,
"sources": [],
"result": null,
"warnings": [],
"raw_model_output": null,
"error": {
"code": "INVALID_INPUT",
"message": "Input is not a valid supported image",
"retryable": false,
"details": {}
}
}error.code values: INVALID_INPUT, IMAGE_TOO_LARGE, UNSUPPORTED_FORMAT,
SECURITY_ERROR, PROVIDER_ERROR, TIMEOUT, INTERNAL_ERROR.
retryable=true means the caller may try the same call again.
Per-tool result shape
Tool |
|
|
|
|
|
|
|
|
|
|
|
|
|
Arrays that are not yet parsed from model output are returned as empty
arrays (no fabricated structure). observations, inferences, and
differences are empty in the current release; only summary carries
the model's free-form text.
Multi-image input
vision_compare accepts 2–4 images. The envelope reports them in
sources: [SourceMeta, ...] (one entry per input, in input order).
source is null for multi-image tools. All other image tools accept a
single image and use source; sources is [].
Opt-in flags
include_raw: bool = False— whentrue,raw_model_outputcontains a sanitized subset of the provider response:{model, response_metadata: {model_name, finish_reason, system_fingerprint}, usage_metadata: {input_tokens, output_tokens, total_tokens}}. HTTP headers, request IDs, signed URLs, and raw exception text are dropped before reaching the envelope. Off by default to keep responses small and to avoid leaking auth material.include_source_ref: bool = False— whentrue,source.source_refis populated with a redacted reference:host/pathfor URLs (query string stripped, including signed tokens) orbasenamefor local files.data_urland base64 inputs always returnnullforsource_ref. Off by default to avoid leaking paths and signed URLs.
URL Handling
VISION_URL_MODE controls remote-image handling:
autopasses URLs through for analysis and comparison, but downloads them when inspection, cropping, or OCR requires image bytes.passthroughprefers URL passthrough, except for tools that require bytes.downloadalways downloads and verifies remote images before model calls.
Downloads are streamed with byte limits, redirects are security checked, and downloaded or encoded inputs are verified as supported images.
Troubleshooting
If Claude Code cannot find the PyPI package:
UV_DEFAULT_INDEX=https://pypi.org/simple uvx --refresh vision-mcpIf the MCP server does not connect:
claude mcp get vision
uvx vision-mcpIf you change the Claude Code configuration:
claude mcp remove --scope user visionThen add it again with the updated values.
Development
git clone https://github.com/666666999999666/vision_mcp.git
cd vision_mcp
python -m venv .venv
.venv/bin/pip install -e ".[dev]"
cp .env.example .env
.venv/bin/python -m unittest discover -s tests -vLicense
MIT
Available Tools
6 toolsvision_analyzeA
Analyze an image using a vision-language model. Returns a unified JSON envelope wrapping summary, observations, uncertainties, and suggested follow-ups (see README 'Response format' for the full schema).
Supports URL, local file path, data URL, and Base64 input.
Task types guide the model:
general: General analysis (default)
qa: Answer a specific question about the image
ui: Analyze UI/layout/interactions/accessibility
chart: Analyze charts/graphs/data
document: OCR and document structure
object: Identify and locate objects
screenshot: Analyze application screenshots
code_screenshot: Read code from screenshots
Inputs: image_source (required), task, detail, prompt, +2 more. Returns: result
vision_capabilitiesA
Return current vision-mcp server capabilities, supported models, and limits. Call this to discover what the server can do before using other tools.
Inputs: no named parameters. Returns: result
vision_compareA
Compare two or more images and identify differences. Use for:
UI regression testing (before/after screenshots)
Design vs implementation comparison
Bug screenshot comparison
Version diff of documents
Returns structured differences with confidence levels.
Inputs: image_sources (required), focus, prompt, include_raw, +1 more. Returns: result
vision_crop_analyzeA
Crop a region of an image and analyze it with VLM. This is the most powerful tool for inspecting small text, UI elements, chart data, or error messages.
Coordinates are NORMALIZED (0.0 to 1.0), where (0,0) is top-left and (1,1) is bottom-right.
Workflow: Use vision_inspect first to get dimensions, then vision_analyze for overview, then vision_crop_analyze to zoom into specific regions of interest.
Inputs: x (required), y (required), width (required), height (required), +5 more. Returns: result
vision_extract_textA
Extract visible text from an image using OCR. Returns structured text organized by reading order.
Use this for: screenshots with text, scanned documents, receipts, tables, forms, Chinese/English OCR, and any text-heavy images.
Uses a configured dedicated OCR model when enabled. If the dedicated OCR model is unavailable, automatically falls back to the VLM provider.
Inputs: image_source (required), language, include_raw, preserve_layout, +1 more. Returns: result
vision_inspectA
Inspect image metadata (dimensions, format, size, mode) without calling VLM. Use this before detailed analysis to understand the image dimensions and plan crop coordinates.
Inputs: image_source (required), include_source_ref. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: general analysis, comparison, region analysis, OCR, and metadata inspection. There is no overlap in functionality.
All tool names follow the consistent pattern 'vision_<verb>' or 'vision_<verb>_<noun>', using lowercase and underscores. The naming is predictable and readable.
With 5 tools, the server is well-scoped for image analysis. Each tool addresses a core need without unnecessary clutter.
The tool set covers all essential image analysis operations: general analysis, comparison, region analysis, OCR, and metadata inspection. The vision_capabilities task type also provides self-description.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models. Up to 4 images per call, SVG vectorization, background removal, upscaling and image-to-video. Remote MCP with OAuth, no API keys.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides image analysis, inspection, cropping, OCR, and comparison capabilities via the Model Context Protocol, allowing AI agents to process and manipulate images using vision models.69 PyPI2MIT
- AlicenseAqualityDmaintenanceBridges a vision model to enable text-only models like DeepSeek to describe images, extract text, and compare images via MCP tools.560 npm9MIT
- AlicenseAqualityDmaintenanceEnables AI agents to analyze images, extract text, compare images, and analyze video through any OpenAI-compatible vision model.4375 npm20MIT
- AlicenseAqualityDmaintenanceEnables text-only agents to process images by accepting image files, base64 data, or URLs, sending them to multimodal models, and returning structured text results via MCP.41MIT