mcp-vision-analyze

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.

Category
Visit Server

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

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured