Skip to main content
Glama

πŸ” 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


Related MCP server: OpenRouter Image MCP Server

πŸ“¦ 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.

Available Tools

1 tool
vision_analyzeA

Analyze an image using AI vision (Gemini via OpenRouter). Accepts local file paths or HTTP(S) URLs. Returns a detailed text analysis of the image content.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoOpenRouter model to use (default: google/gemini-2.5-flash-lite). Options: google/gemini-2.5-flash-lite, google/gemini-3-flash-preview, google/gemini-3.1-flash-lite
promptYesWhat to analyze or ask about the image. E.g. 'Describe this screenshot', 'What error is shown?', 'Extract all text from this image'
image_urlYesImage source: local file path (/path/to/image.png) or HTTP(S) URL (https://example.com/image.jpg)

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden. It discloses key behavioral aspects: external AI processing via OpenRouter, support for local paths and URLs, and text output. Still, it does not explicitly state that the tool is read-only, nor does it mention potential failure modes, network/privacy implications, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two clear sentences, front-loaded with the core purpose, followed by input and output details. No filler or redundancy; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a straightforward image-analysis tool with 100% schema coverage and no output schema, the description provides adequate context: what it does, where it runs, accepted input forms, and return type. It lacks richer details like error handling or model defaults, but those are either in the schema or not critical for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already clearly documents all three parameters. The description adds minimal new meaning beyond restating that image_url can be a local path or URL and that output is text, which is already present in the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Analyze an image using AI vision'), identifies the subject (image), names the underlying provider (Gemini via OpenRouter), and clarifies accepted input types and output. It fully distinguishes the tool's purpose even without sibling tools present.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use the toolβ€”whenever image analysis is neededβ€”and gives examples in the schema. However, there is no explicit guidance on when not to use it or mention of alternative tools, though no siblings are listed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4/5.0
Disambiguation5/5

The server has exactly one tool, so there is no possibility of confusing it with others. Its purpose is clearly stated and distinct.

Naming Consistency5/5

The single tool follows a clean verb_noun pattern (vision_analyze), which is consistent and self-explanatory.

Tool Count3/5

With only one tool, the server is extremely minimal and feels thin for broader workflows, though it is not trivial and adequately serves a focused purpose.

Completeness5/5

For a server dedicated solely to image analysis, the single tool fully covers the intended capability. There are no obvious missing operations within this narrow domain.

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

Related MCP Servers

Latest Blog Posts

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/rezkycodes/mcp-vision-analyze'

If you have feedback or need assistance with the MCP directory API, please join our Discord server