MCP ExplorerExplorer

Mcp Read Images

@catalystneuroon 10 months ago
7 MIT
FreeCommunity
AI Systems
# MCP Read Images MCP Read Images uses the OpenRouter visual model to analyze images.

Overview

What is Mcp Read Images

mcp_read_images is an MCP server designed for analyzing images using OpenRouter vision models. It provides a straightforward interface to utilize various vision models such as Claude-3.5-sonnet and Claude-3-opus via the OpenRouter API.

Use cases

Use cases for mcp_read_images include analyzing images for content recognition, generating descriptive insights from images, and integrating image analysis into applications that require visual understanding.

How to use

To use mcp_read_images, first install it using npm. Then, configure it with your OpenRouter API key in the MCP settings file. You can analyze images by calling the ‘analyze_image’ tool with the required image path and an optional question.

Key features

Key features of mcp_read_images include support for multiple vision models, easy installation via npm, and a simple interface for image analysis. Users can select models based on their preferences and requirements.

Where to use

mcp_read_images can be used in various fields such as computer vision, image processing, and AI research, where image analysis is essential for deriving insights.

Content

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):

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:

  1. Model specified in the tool call (model argument)
  2. Model specified in MCP settings (OPENROUTER_MODEL environment variable)
  3. 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.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers