mcp-vision-analyze
Provides AI vision analysis via OpenRouter, enabling image understanding from local paths or URLs. Supports OCR, error diagnosis, and chart/UI analysis using Gemini models.
README
š MCP Vision Analyze
A lightweight Model Context Protocol (MCP) server for AI image vision analysis. Powered by OpenRouter (Google Gemini, Grok, and more).
Works with: Claude Desktop, Claude Code CLI, Antigravity, Cursor, Pi Agent, Windsurf, Cline, VS Code, and any MCP-compatible client.
⨠Features
- š¼ļø Analyze images from local file paths or HTTP(S) URLs
- š§ Powered by Google Gemini models via OpenRouter
- š° Ultra cheap ā ~$0.0001 per image (free tier available)
- š Extract text from screenshots (OCR)
- š Diagnose error messages in screenshots
- š Analyze charts, diagrams, and UI designs
- š No rate limits ā production ready
- š Secure ā API keys stay local, never stored externally
š¦ Pricing (OpenRouter)
| Model | Input | Output | Best For |
|---|---|---|---|
google/gemini-2.5-flash-lite |
$0.10/M tokens | $0.40/M tokens | Default ā cheapest |
google/gemini-3.1-flash-lite |
$0.25/M tokens | $1.50/M tokens | Better quality |
google/gemini-3-flash-preview |
$0.50/M tokens | $3.00/M tokens | Best reasoning |
google/gemini-3.7-flash |
$0.38/M tokens | $1.88/M tokens | Latest model |
x-ai/grok-4.5 |
$2.00/M tokens | $6.00/M tokens | Grok vision |
š” 1 image analysis ā 1,300 input tokens + 150 output tokens ā $0.0001 š” Free tier available ā no credit card needed to start
š Quick Start
1. Get an API Key
Sign up at OpenRouter and get your API key from openrouter.ai/keys.
2. Install
# Option A: Use directly with npx (recommended)
npx mcp-vision-analyze
# Option B: Clone and install manually
git clone https://github.com/rezkycodes/mcp-vision-analyze.git
cd mcp-vision-analyze
npm install
3. Configure Your MCP Client
Choose your client below. Set OPENROUTER_API_KEY in the env block.
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"vision-analyze": {
"command": "npx",
"args": ["-y", "mcp-vision-analyze"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
}
}
}
}
Claude Code CLI
claude mcp add vision-analyze \
-e OPENROUTER_API_KEY=sk-or-v1-your-openrouter-key \
-- npx -y mcp-vision-analyze
# Or add to .mcp.json in your project root
Or add to .mcp.json in your project root:
{
"mcpServers": {
"vision-analyze": {
"command": "npx",
"args": ["-y", "mcp-vision-analyze"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
}
}
}
}
Antigravity
Add via Settings ā MCP, or edit ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"vision-analyze": {
"command": "npx",
"args": ["-y", "mcp-vision-analyze"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
}
}
}
}
Pi Agent (~/.pi/agent/mcp.json)
{
"vision-analyze": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "mcp-vision-analyze"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
},
"directTools": true
}
}
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"vision-analyze": {
"command": "npx",
"args": ["-y", "mcp-vision-analyze"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
}
}
}
}
VS Code (~/.config/Code/User/mcp.json)
{
"servers": {
"vision-analyze": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-vision-analyze"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
}
}
}
}
OpenCode (~/.config/opencode/opencode.json)
{
"mcp": {
"vision-analyze": {
"type": "local",
"command": ["node", "/path/to/index.js"],
"environment": {
"OPENROUTER_API_KEY": "sk-or-v1-your-openrouter-key"
},
"enabled": true
}
}
}
š ļø Usage
Once configured, the vision_analyze tool becomes available:
Basic ā Analyze a Screenshot
{
"image_url": "/path/to/screenshot.png",
"prompt": "What is shown in this screenshot?"
}
Extract Text (OCR)
{
"image_url": "/path/to/photo.png",
"prompt": "Extract all text from this image"
}
Diagnose an Error
{
"image_url": "/path/to/error.png",
"prompt": "What error is shown and how to fix it?"
}
Use a Different Model
{
"image_url": "/path/to/image.png",
"prompt": "Analyze this chart",
"model": "google/gemini-3-flash-preview"
}
Use Grok Vision
{
"image_url": "/path/to/image.png",
"prompt": "Describe this image",
"model": "x-ai/grok-4.5"
}
š Project Structure
mcp-vision-analyze/
āāā index.js # MCP server (OpenRouter only)
āāā package.json # npm metadata
āāā .env.example # Config template
āāā .env # Your API keys (git-ignored)
āāā .gitignore # Git ignore rules
āāā LICENSE # MIT
āāā README.md # This file
š§ Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
VISION_PROVIDER |
No | openrouter |
Provider (only openrouter supported) |
OPENROUTER_API_KEY |
ā Yes | ā | OpenRouter API key |
OPENROUTER_MODEL |
No | google/gemini-2.5-flash-lite |
OpenRouter model |
š¦ Available Models
| Model | Cost (input/output per M) | Quality |
|---|---|---|
google/gemini-2.5-flash-lite |
$0.10 / $0.40 | āāāā Best value |
google/gemini-3.1-flash-lite |
$0.25 / $1.50 | āāāā Great |
google/gemini-3-flash-preview |
$0.50 / $3.00 | āāāāā Best |
google/gemini-3.7-flash |
$0.38 / $1.88 | āāāāā Latest |
x-ai/grok-4.5 |
$2.00 / $6.00 | āāāā Grok |
š¤ Supported Image Formats
- JPEG / JPG
- PNG
- GIF
- WebP
- BMP (auto-converted)
- SVG (auto-rasterized)
ā FAQ
How much does it cost?
~$0.0001 per image analysis. Free tier available ā no credit card needed.
Can I use Grok for vision?
Yes! Set model: "x-ai/grok-4.5". Grok is not free on OpenRouter.
Does it work offline?
No. Internet connection required for API calls.
Is my image data stored?
No. Images are processed in-memory and sent directly to OpenRouter. Nothing is stored on disk.
š License
MIT
š Credits
Inspired by the vision_analyze tool from Hermes Agent.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.