
通过OpenRouter进行AI视觉分析的MCP服务器
概览
你是否曾想使用像GLM-4.6这样的优秀AI模型,但它们没有视觉能力?这个MCP服务器通过OpenRouter的视觉模型为任何模型添加视觉功能,解决了这个问题。 一些非常优秀的AI模型并不支持视觉。你只能在偏好的模型和视觉能力之间做出选择。这个服务器通过OpenRouter的视觉模型提供无缝的视觉功能,弥合了这一差距。 该MCP服务器提供了一个简单的analyze_image工具,可以:- 分析来自URL、文件路径或base64数据的图像 - 使用OpenRouter上的任何视觉模型(如Claude 3.5 Sonnet、GPT-4 Vision等)- 返回详细分析结果 - 优雅地处理错误并进行正确验证 - (推荐:Node.js 20+) - (自带Node.js) 如果你需要安装或更新Node.js: 1. : nodejs.org(推荐初学者) 2.: 3. : - macOS:brew安装节点- Windows:winget install OpenJS。
概述(AI 翻译)
你是否曾想使用像GLM-4.6这样的优秀AI模型,但它们没有视觉能力?这个MCP服务器通过OpenRouter的视觉模型为任何模型添加视觉功能,解决了这个问题。
问题
一些非常优秀的AI模型并不支持视觉。你只能在偏好的模型和视觉能力之间做出选择。这个服务器通过OpenRouter的视觉模型提供无缝的视觉功能,弥合了这一差距。
解决方案
该MCP服务器提供了一个简单的analyze_image工具,可以:
- 分析来自 URL、文件路径或 base64 数据的图像
- 使用OpenRouter上的任何视觉模型(如Claude 3.5 Sonnet、GPT-4 Vision等)
- 返回详细分析结果
- 通过适当的验证优雅地处理错误
系统需求
安装前,请确保您具备:
- Node.js 18.0.0 或更高(推荐:Node.js 20+)
- NPM 8.0.0 或更高版本(自带Node.js)
检查你的版本
安装/更新Node.js
如果你需要安装或更新Node.js:
-
从官方网站下载:nodejs.org(推荐初学者)
-
使用 Node Version Manager (nvm):
-
使用包管理器:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Vision MCP Server
Ever wanted to use a model like GLM-4.6 or other great AI models that just don’t have vision capabilities? This MCP server solves that problem by adding vision capabilities to any model through OpenRouter’s vision models.
The Problem
Some really good AI models don’t support vision. You’re stuck choosing between your preferred model or vision capabilities. This server bridges that gap by providing seamless vision capabilities through OpenRouter’s vision models.
The Solution
This MCP server provides a simple analyze_image tool that can:
- Analyze images from URLs, file paths, or base64 data
- Use any vision model available on OpenRouter (Claude 3.5 Sonnet, GPT-4 Vision, etc.)
- Return detailed analysis results
- Handle errors gracefully with proper validation
System Requirements
Before installing, make sure you have:
- Node.js 18.0.0 or higher (recommended: Node.js 20+)
- npm 8.0.0 or higher (comes with Node.js)
Check Your Versions
node --version # Should show v18.0.0 or higher
npm --version # Should show 8.0.0 or higher
Install/Update Node.js
If you need to install or update Node.js:
- Download from official site: nodejs.org (recommended for beginners)
- Using Node Version Manager (nvm):
# Install nvm first, then: nvm install 20 nvm use 20 - Using package managers:
- macOS:
brew install node - Windows:
winget install OpenJS.NodeJS - Ubuntu/Debian:
sudo apt install nodejs npm
- macOS:
Important: This server is written in TypeScript and uses dependencies (like
node-fetchv3) that require Node.js 18+. Older versions (like Node.js 16 or below) will not work.
Quick Start
Step 1: Get Your OpenRouter API Key
- Go to OpenRouter
- Sign up or log in to your account
- Navigate to “Keys” in your dashboard
- Click “Create Key”
- Copy your API key (starts with
sk-or-v1-...) - Keep this key safe - you’ll need it in Step 3
Step 2: Install the MCP Server
Option A: Install from npm (Recommended)
npm install -g @thenomadinorbit/vision-mcp-server
Success! The package is now globally available as
vision-mcpcommand.
Option B: Install from Source (Development)
git clone https://github.com/TheNomadInOrbit/vision-mcp-server.git
cd vision-mcp-server
npm install
npm run build
npm install -g .
Note: Use this method if you want to modify the source code or contribute to the project.
Step 3: Configure Your MCP Client
Add this server configuration to your MCP client:
{
"mcpServers": {
"vision-analyzer": {
"command": "vision-mcp",
"type": "stdio",
"timeout": 60,
"disabled": false,
"autoApprove": [],
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"vision-analyzer": {
"command": "vision-mcp",
"type": "stdio",
"timeout": 60,
"disabled": false,
"autoApprove": [],
"env": {
"OPENROUTER_API_KEY": "your_api_key_here",
"OPENROUTER_MODEL": "anthropic/claude-3-5-sonnet"
}
}
}
}