vision-mcp
This server enables non-vision AI models to analyze images and capture screenshots using OpenRouter vision models.
Analyze Images: Send an image (local file path or URL) with a text prompt to a vision-capable OpenRouter model and receive a natural-language response. Local files are validated for size and path security, then encoded as base64 before being sent.
Capture Screenshots (Windows only): Take a screenshot of a running application window by specifying either its process name (e.g.
notepad) or Process ID (PID), using WindowsPrintWindowvia PowerShell.
Allows capturing screenshots of WezTerm windows on Windows via the screen tool, enabling analysis of terminal content through vision models.
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., "@vision-mcpanalyze this image: ./screenshot.png and explain what it shows"
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
An MCP server that helps non-vision models extract and understand images and screenshots via OpenRouter multimodal models.
Features
analyze_image— Send an image (local file or URL) with a text prompt to any OpenRouter vision model and get a natural-language response.screen— Capture a screenshot of an application window by PID or process name (Windows only, usesPrintWindowvia PowerShell).
Related MCP server: Vision MCP Server
Prerequisites
Node.js 18+ (ESM)
An OpenRouter API key with access to a vision-capable model
Setup
# Clone and install
git clone <your-repo>
cd vision-mcp
npm install
# Configure environment
cp .env.example .envEdit .env and set your OpenRouter key and preferred model:
OPENROUTER_API_KEY=sk-or-v1-...
OPENROUTER_MODEL=google/gemini-2.0-flash-lite-preview-02-05:freeEnvironment variables
Variable | Required | Default | Description |
| Yes | — | Your OpenRouter API key |
| Yes | — | Model identifier (e.g. |
| No |
| API base URL override |
| No |
| Maximum allowed image size in MB |
Build & Run
npm run build
npm startThe server uses stdio transport and is designed to be launched by an MCP-enabled host (e.g. Claude, OpenCode). Example configuration block for your MCP client:
{
"mcpServers": {
"vision-mcp": {
"command": "npx",
"args": ["-y", "@forloopcodes/visionmcp"],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-...",
"OPENROUTER_MODEL": "google/gemma-4-31b-it:free"
}
}
}
}Tools
analyze_image
Analyze an image using a vision model.
Arguments:
Name | Type | Required | Description |
|
| Yes | Instruction for the vision model |
|
| Yes | Local file path or |
Local images are loaded, validated (size, path scope), and sent as base64 data URIs. Remote URLs are passed through directly.
screen
Capture a screenshot of a running application window (Windows only).
Arguments:
Name | Type | Required | Description |
|
| Yes | The capture action |
|
| No | Process name to find and capture (e.g. |
|
| No | Process ID to capture |
Provide either target or pid. The server uses PrintWindow via a compiled C# snippet invoked through PowerShell. Supports PW_RENDERFULLCONTENT for DPI-aware captures.
Screen capture requires theSystem.Drawing assembly and works on Windows only. The captured PNG is written to the system temp directory.
Architecture
src/
├── server.ts # MCP server entry point, tool routing
├── image.ts # Image loading, validation, base64 encoding
├── openrouter.ts # OpenRouter API client (multimodal chat completions)
├── types.ts # Shared TypeScript interfaces for API payloads
└── screen/
├── index.ts # Platform abstraction for screen capture
└── windows.ts # PowerShell + Win32 implementation (PrintWindow)The server runs on the Model Context Protocol SDK with stdio transport. Image analysis requests are forwarded to OpenRouter's /chat/completions endpoint with a 60-second timeout. Security boundaries are enforced at the image loader — only files within the working directory are accepted.
Security
Local image paths are checked against the project root to prevent directory traversal.
Screen captures are written to the OS temp directory (
$TMPDIR).The PowerShell execution uses
-ExecutionPolicy Bypassfor the embedded C# script; no external.ps1files are written to disk.
License
MIT
Available Tools
2 toolsanalyze_imageB
Send an image (URL or local path) with a prompt to a vision model via OpenRouter
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Instruction for the vision model | |
| image | Yes | Local file path or http/https URL |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'via OpenRouter,' hinting at an external API call, but it does not disclose potential side effects (e.g., network dependency, costs, latency) or any required permissions. This lack of behavioral detail is a significant gap for a tool that sends data externally.
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 a single sentence that efficiently conveys the tool's purpose. It is concise and front-loaded with the action. While it could be slightly more structured, it has no wasted words.
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?
Given the tool's simplicity (2 params, no output schema, no annotations), the description is adequate but not fully complete. It does not describe the return value or error behavior, which would be useful for an agent. However, for a straightforward tool, it meets minimum viability.
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%, so baseline is 3. The description adds no new meaning beyond the schema for the two parameters: it merely restates that image can be a URL or local path and that prompt is an instruction. It does not explain format constraints or other nuances.
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 clearly states the action (send), the resource (image with prompt), and the target (vision model via OpenRouter). It uses specific verbs and nouns, distinguishing it from the sibling 'screen' tool, which likely performs a different function.
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 implies usage when one needs to analyze an image with a prompt, but it provides no explicit guidance on when to use this tool versus alternatives, nor does it mention when not to use it. The sibling 'screen' is mentioned but not contrasted.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
screenA
Capture a screenshot of an application window by PID or process name (e.g. wezterm)
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Capture action (only capture for now) | |
| target | No | Process name (e.g. wezterm, notepad) | |
| pid | No | Process ID to capture |
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. It states that a screenshot is captured, but does not disclose any side effects, permissions required, or behavior beyond the basic action.
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 a single sentence with an example, no redundant information. Every word serves a purpose.
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?
While the tool is simple, the description lacks information about what is returned (e.g., image data or path). The enum for action is limited but not explained. For a complete agent, return type would be useful.
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?
The input schema already describes each parameter (action, target, pid) with 100% coverage. The description adds value by explaining that target and pid are alternative ways to specify the window, and provides an example.
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 clearly states the purpose: capture a screenshot of an application window using PID or process name. It distinguishes from the sibling tool 'analyze_image', which implies analysis rather than capture.
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 provides two methods (PID or process name) and gives an example (wezterm). However, it does not specify when to use this tool over alternatives or any exclusions.
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.
2 tool updates
v1.0.0- First observed
analyze_image - First observed
screen
TDQS
The two tools have clearly distinct purposes: analyze_image sends an image to a vision model, while screen captures a screenshot. No overlap in functionality.
Both tool names follow a simple pattern, but 'screen' is a single noun used as a verb, while 'analyze_image' is verb_noun. The inconsistency is minor given only two tools.
For a vision-related server, two tools are very minimal. Typical vision servers have at least 5-10 tools for different operations (list models, describe, compare, etc.).
The server lacks essential operations like listing available models, configuring parameters, or handling multiple image inputs. The surface is too narrow for a comprehensive vision tool.
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.
OCR and document understanding: extract text from images, then summarize or translate it.
Screenshot any URL/HTML as PNG/JPEG/WebP, or read it as clean Markdown/text for LLMs.
Analyze images from multiple angles to extract detailed insights or quick summaries. Describe visu…
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to analyze and understand images using OpenRouter's vision models. Supports screenshots, photos, diagrams, and web content with specialized tools for webpage and mobile app analysis.35711MIT
- AlicenseBqualityDmaintenanceEnables vision capabilities for any AI model by routing image analysis requests through OpenRouter's vision models. It provides tools to analyze images from URLs, local file paths, or base64 data.210120MIT
- FlicenseNot gradedqualityCmaintenanceEnables text-only language models to 'see' and describe images by calling multimodal APIs (OpenAI, Anthropic) for image analysis.-
- AlicenseAqualityCmaintenanceEnables non-vision LLMs to analyze images via any OpenAI-compatible vision API. Hardened against truncation, empty responses, and timeouts for reliable analysis.160MIT
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/forloopcodes/vision-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server