mcp-vision-server
Enables image analysis, OCR, and text-to-image generation through OpenAI-compatible APIs. Supports local paths, URLs, or base64 images with configurable models and backup endpoints.
README
mcp-vision-server
基于 goehou/Visual-Enhancement-mcp(MIT)魔改的 MCP 服务,接入 OpenAI 兼容 API,提供看图、识字、生图。
工具
| 工具 | 做什么 |
|---|---|
vision_analyze |
通用图片理解 |
vision_ocr |
逐字提取图片文字 |
image_generate |
文本生成图片(多张/尺寸/模型覆盖) |
图片传法三选一:imagePath(本地路径)/ imageUrl / imageBase64 + imageMediaType。
配置
模型优先级:调用时传 model > 工具专用 > 全局默认。
| 环境变量 | 说明 | 默认值 |
|---|---|---|
VISION_API_BASE_URL |
视觉 API 根地址 | 必填 |
VISION_API_KEY |
视觉 Key | 必填 |
VISION_MODEL |
默认视觉模型 | 必填 |
VISION_ANALYZE_MODEL |
analyze 专用模型 | 回退 VISION_MODEL |
VISION_BACKUP_API_BASE_URL |
ocr 备用视觉平台地址 | 回退 VISION_API_BASE_URL |
VISION_BACKUP_API_KEY |
ocr 备用视觉 Key | 回退 VISION_API_KEY |
VISION_BACKUP_MODEL |
ocr 备用视觉模型 | 回退 VISION_MODEL |
IMAGE_API_BASE_URL |
生图 API 根地址 | 回退 VISION_API_BASE_URL |
IMAGE_API_KEY |
生图 Key | 回退 VISION_API_KEY |
IMAGE_MODEL |
生图模型 | 回退 VISION_MODEL |
VISION_TIMEOUT_MS |
视觉超时(毫秒) | 60000 |
IMAGE_TIMEOUT_MS |
生图超时(毫秒) | 120000 |
OpenCode 配置:
{
"mcp": {
"vision": {
"type": "local",
"command": ["mcp-vision-server"],
"environment": {
"VISION_API_BASE_URL": "...",
"VISION_API_KEY": "...",
"VISION_MODEL": "...",
"IMAGE_API_BASE_URL": "...",
"IMAGE_API_KEY": "...",
"IMAGE_MODEL": "..."
},
"enabled": true
}
}
}
相比原项目
- 新增
image_generate生图工具(多张/尺寸/模型覆盖,URL 下载加固) - 新增
VISION_BACKUP_*备用视觉端点 - 新增
VISION_ANALYZE_MODEL工具级模型覆盖 - 加固:仅允许 http/https 下载、base64 大小上限、错误信息截断、多图全返回、空配置可启动
安装
# 方式一:本地克隆后安装
git clone https://github.com/xiaoshengyvlin/MCP-Vision.git
cd MCP-Vision
npm install -g .
# 方式二:tarball 安装
npm pack && npm install -g mcp-vision-server-0.1.4.tgz
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.