MCP Read Images
An MCP server for analyzing images using OpenRouter vision models, offering capabilities like automatic image resizing, model configuration, and handling custom queries about images.
catalystneuro
README
MCP Read Images
An MCP server for analyzing images using OpenRouter vision models. This server provides a simple interface to analyze images using various vision models like Claude-3.5-sonnet and Claude-3-opus through the OpenRouter API.
Installation
npm install @catalystneuro/mcp_read_images
Configuration
The server requires an OpenRouter API key. You can get one from OpenRouter.
Add the server to your MCP settings file (usually located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
for VSCode):
{
"mcpServers": {
"read_images": {
"command": "read_images",
"env": {
"OPENROUTER_API_KEY": "your-api-key-here",
"OPENROUTER_MODEL": "anthropic/claude-3.5-sonnet" // optional, defaults to claude-3.5-sonnet
},
"disabled": false,
"autoApprove": []
}
}
}
Usage
The server provides a single tool analyze_image
that can be used to analyze images:
// Basic usage with default model
use_mcp_tool({
server_name: "read_images",
tool_name: "analyze_image",
arguments: {
image_path: "/path/to/image.jpg",
question: "What do you see in this image?" // optional
}
});
// Using a specific model for this call
use_mcp_tool({
server_name: "read_images",
tool_name: "analyze_image",
arguments: {
image_path: "/path/to/image.jpg",
question: "What do you see in this image?",
model: "anthropic/claude-3-opus-20240229" // overrides default and settings
}
});
Model Selection
The model is selected in the following order of precedence:
- Model specified in the tool call (
model
argument) - Model specified in MCP settings (
OPENROUTER_MODEL
environment variable) - Default model (anthropic/claude-3.5-sonnet)
Supported Models
The following OpenRouter models have been tested:
- anthropic/claude-3.5-sonnet
- anthropic/claude-3-opus-20240229
Features
- Automatic image resizing and optimization
- Configurable model selection
- Support for custom questions about images
- Detailed error messages
- Automatic JPEG conversion and quality optimization
Error Handling
The server handles various error cases:
- Invalid image paths
- Missing API keys
- Network errors
- Invalid model selections
- Image processing errors
Each error will return a descriptive message to help diagnose the issue.
Development
To build from source:
git clone https://github.com/catalystneuro/mcp_read_images.git
cd mcp_read_images
npm install
npm run build
License
MIT License. See LICENSE for details.
Recommended Servers
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.
@kazuph/mcp-fetch
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
mcp-pinterest
A Pinterest Model Context Protocol (MCP) server for image search and information retrieval
DeepSRT MCP Server
An MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.
ScreenshotOne MCP Server
An official MCP server implementation that allows AI assistants to capture website screenshots through the ScreenshotOne API, enabling visual context from web pages during conversations.
Glif
Run AI workflows hosted on Glif.app via MCP, including ComfyUI-based image generators, meme generators, selfies, chained LLM calls, and more
WebPerfect MCP Server
An intelligent MCP server with a fully automated batch pipeline for web-ready images. Features include noise reduction, auto levels/curves, JPEG artifact removal, 4K resizing, smart sharpening with shadow/highlight enhancement, and advanced WebP conversion.
Stealth Browser MCP Server
Provides stealth browser capabilities using Playwright with anti-detection techniques, allowing MCP clients to navigate websites and take screenshots while evading common bot detection systems.
MCP-LOGO-GEN
MCP Tool Server for Logo Generation. This server provides logo generation capabilities using FAL AI, with tools for image generation, background removal, and image scaling.