mcp-six-eyes
mcp-six-eyes
MCP 服务器,为纯文本 AI 代理提供理解图像的能力,包括多图像对话,如“参考图 1 和图 2”或“比较这些截图”。
纯文本模型无法看到像素。该服务器弥合了这一差距:代理调用视觉工具,服务器与多模态 API 通信,代理获得纯文本响应。
Agent (text-only)
│ tool call: analyze / compare / refer / ocr / …
▼
mcp-six-eyes (this server)
│ 1..N images: path | URL | base64 (labels: 1, 2, before, …)
▼
Vision API (OpenAI / Anthropic / Gemini / OpenRouter / custom)
│
▼
Plain-text description / OCR / comparison / structured extract
│
▼
Agent continues reasoning with text为什么有效
MCP 暴露代理可以调用的工具。代理永远不需要原生视觉能力:
用户上传或指向一张或多张图像
代理调用视觉工具,传入这些来源(以及可选的标签)
服务器加载图像并将其发送给多模态模型
服务器仅返回文本,并带有稳定的图像标签
纯文本代理像使用任何其他工具结果一样使用该文本
Related MCP server: MCP Vision Server
工具
工具 | 用途 |
| 对一张或多张图像进行通用问答 |
| 密集的场景/UI 描述(非常适合代理的“上下文转储”) |
| 提取可见文本(多图时按图像分节) |
| 对比 2 张以上图像(前后对比、A/B、变体) |
| 回答引用“图 1”、“两张图”等的问题 |
| UI/UX 截图审查和多步骤流程 |
| 图表、绘图、表格、仪表板 |
| 架构图 / 流程图 / ERD / 白板解释器 |
| 从表单、收据、表格、标签中提取结构化 JSON |
| 显示配置的提供商/模型和限制 |
图像输入
每个图像工具都接受:
单张:
image:本地路径、file://、http(s)、数据 URL 或 base64多张:
images:来源数组 或{ source, label?, mimeType? }对象可以同时传递两者;它们会被合并
标签默认为 "1"、"2"、……,因此代理提示如“比较图 1 和图 2”可以清晰映射。自定义标签也可以("before"、"after"、"fig-a")。
# one image
analyze_image({ image: "./shot.png", prompt: "What failed?" })
# multi-image with default labels 1..n
compare_images({
images: ["./a.png", "./b.png"],
prompt: "What changed in the error state?"
})
# multi-image with explicit labels (best for long threads)
refer_images({
images: [
{ source: "./login.png", label: "1" },
{ source: "./dashboard.png", label: "2" }
],
prompt: "Using image 1 and image 2, is the user authenticated?"
})支持的来源形式:
本地文件路径(
/path/to/image.png或C:\path\to\image.png)file://URIhttp(s)URL数据 URL(
data:image/png;base64,...)原始 base64(尽可能传递
mimeType)
要求
Node.js 20+
支持视觉的 API 密钥(OpenAI、Anthropic、Google、OpenRouter 或任何兼容 OpenAI 的端点)
安装
以 mcp-six-eyes 发布在 npm 上。
npx -y mcp-six-eyes或全局安装 / 作为项目依赖安装:
npm install -g mcp-six-eyes
# or
npm install mcp-six-eyes大多数人将其接入 MCP 客户端,而不是手动运行。示例 Claude Desktop / Cursor 配置:
{
"mcpServers": {
"mcp-six-eyes": {
"command": "npx",
"args": ["-y", "mcp-six-eyes"],
"env": {
"VISION_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-..."
}
}
}
}为什么 npx 在这里很流行:
无需全局安装
客户端按需启动服务器
-y在首次运行时跳过安装提示npm 会缓存包以供后续启动
本地开发
npm install
npm run build然后任选其一:
{
"mcpServers": {
"mcp-six-eyes": {
"command": "npx",
"args": ["-y", "."],
"env": {
"VISION_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-..."
}
}
}
}或将 Node 指向构建后的入口点:
{
"mcpServers": {
"mcp-six-eyes": {
"command": "node",
"args": ["./build/index.js"],
"env": {
"VISION_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-..."
}
}
}
}环境
在 MCP 客户端的 env 块中设置提供商密钥(推荐),或在本地 .env 中设置以用于开发。
最小 OpenAI 设置:
VISION_PROVIDER=openai
OPENAI_API_KEY=sk-...可选模型 / 限制:
VISION_MODEL=gpt-4o-mini
VISION_MAX_IMAGES=10
VISION_MAX_IMAGE_BYTES=20971520
VISION_CACHE_MAX_ENTRIES=200服务器通过 stdio 使用 MCP 协议。不要将应用程序日志写入 stdout。
缓存
视觉调用按内容在内存中进行记忆化。缓存键对实际图像字节以及任务、提示、标签和令牌上限(而非来源字符串)进行哈希,因此模型对同一图像重新调用 describe_image(或任何视觉工具)时,会立即获得之前的答案,并标记为 Cached: yes,而不会再次向视觉 API 计费。
默认:
VISION_CACHE_MAX_ENTRIES=200(有界,最旧的先被淘汰)设置
VISION_CACHE_MAX_ENTRIES=0以禁用对于给定键,第一个答案生效;更改的文件或 URL 会产生新键
失败和回退响应永远不会被缓存
缓存仅在进程生命周期内有效(无磁盘持久化)
客户端说明
Claude Desktop
配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%AppData%\Claude\claude_desktop_config.json
使用 使用 npx 快速开始 中的 npx 块。
Cursor
将相同的服务器块添加到 .cursor/mcp.json(项目)或全局 Cursor MCP 配置中。
其他 stdio MCP 主机
任何能够启动的主机:
npx -y mcp-six-eyes并传递环境变量即可。
提供商
提供商 |
| 密钥环境变量 | 默认模型 |
OpenAI |
|
|
|
Anthropic |
|
|
|
Google Gemini |
|
|
|
OpenRouter |
|
|
|
自定义 OpenAI 兼容 |
|
| 设置 |
可选回退:
VISION_FALLBACK_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...示例代理用法
单张截图
User: What's wrong in this screenshot? ./screenshots/build-error.png
Agent → ocr_image({ image: "./screenshots/build-error.png" })
Agent → analyze_image({
image: "./screenshots/build-error.png",
prompt: "Explain the error and suggest a fix"
})
Agent → answers in plain text多图像:引用 / 比较
User: I uploaded two shots. Compare image 1 and 2. Did the fix work?
Agent → compare_images({
images: [
{ source: "./before.png", label: "1" },
{ source: "./after.png", label: "2" }
],
prompt: "Did the red error banner disappear after the fix?"
})User: Refer image 1 and image 2. Which CTA is primary?
Agent → refer_images({
images: [
{ source: "./landing-a.png", label: "1" },
{ source: "./landing-b.png", label: "2" }
],
prompt: "Which image has the stronger primary CTA and why?"
})UI 流程、图表、示意图、结构化提取
inspect_ui({
images: ["./step1.png", "./step2.png", "./step3.png"],
prompt: "Describe the checkout flow and any friction"
})
read_chart({
image: "https://example.com/revenue.png",
prompt: "Summarize the trend and call out outliers"
})
explain_diagram({
image: "./architecture.png",
prompt: "List services and data flow"
})
extract_from_images({
image: "./receipt.jpg",
schema: "{\"merchant\":string,\"date\":string,\"total\":number,\"items\":[{\"name\":string,\"price\":number}]}"
})架构
src/
index.ts MCP server + tools
config.ts env/provider config
image.ts path/URL/base64 loader + multi-image labels
prompts.ts task prompts (analyze/describe/ocr/compare/...)
providers/
index.ts provider router + fallback
openai-compatible.ts OpenAI / OpenRouter / custom (multi-image)
anthropic.ts Claude vision (multi-image)
google.ts Gemini vision (multi-image)
types.ts shared contracts
test/ unit tests (node:test, mocked providers)
assets/
logo.png project logo设计说明
工具而非资源:图像理解是带有副作用(API 成本)的操作,因此作为工具暴露。
纯文本输出:没有视觉能力的主机模型只需要文本内容块。
带标签的多图像:聊天 UI 中的代理谈论“图 1/2”;标签保持这种基础稳定。
任务特定工具:compare / refer / UI / chart / diagram / extract 在工具选择上优于一个巨型提示。
Stdio 传输:桌面代理最简单的本地集成。
无 stdout 日志:stdout 保留给 JSON-RPC;诊断信息发送到 stderr。
提供商抽象:无需更改代理学习的工具名称即可切换后端。
开发
npm install
npm test
npm start脚本 | 用途 |
| 将 TypeScript 编译到 |
| 仅类型检查 |
| 构建 + 完整单元测试套件 |
| 针对当前 |
| 快速图像加载器冒烟脚本 |
| 在 stdio 上运行 MCP 服务器 |
使用 MCP Inspector 调试:
npx @modelcontextprotocol/inspector node ./build/index.js有关 PR 和编码指南,请参阅 CONTRIBUTING.md。
链接
npm: mcp-six-eyes
维护者: rimunace
发布工作流
本地更改后的维护者路径:
# one-time
npm login
# bump version + CHANGELOG, then ship
npm test
npm publish --access public可选辅助脚本(测试,然后 npm publish):
npm run release安全
API 密钥保留在环境变量 / 客户端配置中,绝不会出现在工具响应中
远程 URL 获取是明确的工具输入;请谨慎对待不受信任的 URL
通过
VISION_MAX_IMAGE_BYTES拒绝大图像(默认 20MB)每次调用的图像数量通过
VISION_MAX_IMAGES限制(默认 10)响应缓存仅将内容哈希和结果文本保存在内存中;不会持久化到磁盘
完整政策:SECURITY.md。
贡献
欢迎提交 issue 和 pull request。请在打开 PR 之前运行 npm test,并阅读 CONTRIBUTING.md。
许可证
Maintenance
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that analyzes images with Google's Gemini vision models, allowing agents to describe or ask questions about images without bloating context.1MIT
- FlicenseNot gradedqualityBmaintenanceA versatile MCP server that adds vision capabilities (image analysis, OCR, image/video generation) to AI models lacking native vision, with support for multiple providers and automatic task routing.1
- AlicenseNot gradedqualityCmaintenanceMCP server for analyzing images using multiple vision LLM providers (OpenCode, OpenAI, Anthropic, Google, and custom OpenAI-compatible endpoints). Provides tools to analyze single or multiple images, list providers, and test vision capabilities.MIT
- AlicenseAqualityCmaintenanceEnables non-vision LLMs to analyze images via any OpenAI-compatible vision API. Hardened against truncation, empty responses, and timeouts for reliable analysis.1177MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for Flux AI image generation
MCP server for NanoBanana AI image generation and editing
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RimunAce/mcp-six-eyes'
If you have feedback or need assistance with the MCP directory API, please join our Discord server