MCP读取图像
一个使用 OpenRouter 视觉模型分析图像的 MCP 服务器。该服务器提供了一个简单的接口,允许通过 OpenRouter API 使用各种视觉模型(例如 Claude-3.5-sonnet 和 Claude-3-opus)分析图像。
安装
配置
服务器需要 OpenRouter API 密钥。您可以从OpenRouter获取。
将服务器添加到您的 MCP 设置文件(对于 VSCode,通常位于~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
):
用法
服务器提供了一个单独的工具analyze_image
,可以用来分析图像:
模型选择
按以下优先顺序选择模型:
- 工具调用中指定的模型(
model
参数) - MCP 设置中指定的模型(
OPENROUTER_MODEL
环境变量) - 默认模型(anthropic/claude-3.5-sonnet)
支持的型号
以下 OpenRouter 型号已经过测试:
- 人类学/克劳德-3.5-十四行诗
- 人类学/克劳德-3-作品-20240229
特征
- 自动调整图像大小并进行优化
- 可配置模型选择
- 支持关于图像的自定义问题
- 详细错误消息
- 自动 JPEG 转换和质量优化
错误处理
服务器处理各种错误情况:
- 无效的图片路径
- 缺少 API 密钥
- 网络错误
- 无效的模型选择
- 图像处理错误
每个错误都会返回一条描述性消息来帮助诊断问题。
发展
从源代码构建:
执照
MIT 许可证。详情请参阅许可证。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
使用 OpenRouter 视觉模型分析图像的 MCP 服务器,提供自动调整图像大小、模型配置和处理有关图像的自定义查询等功能。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityThis MCP server aids users in searching and analyzing their photo library by location, labels, and people, offering functionalities like photo analysis and fuzzy matching for enhanced photo management.Last updated -21PythonMIT License
- AsecurityAlicenseAqualityMCP OpenVision is a Model Context Protocol (MCP) server that provides image analysis capabilities powered by OpenRouter vision models. It enables AI assistants to analyze images via a simple interface within the MCP ecosystem.Last updated -110PythonMIT License
- -securityFlicense-qualityAn MCP server that analyzes webpage design images using vision models and generates development documentation in Markdown format.Last updated -Python
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants to analyze images using OpenRouter vision models through a simple interface.Last updated -11PythonMIT License