mimo-vision
Provides an image description tool for MCP, sending images to mimo-v2.5 multimodal models and returning textual descriptions, with automatic API key discovery and fallback across free and paid endpoints.
README
mimo-vision
跨工具视觉 MCP server:把图片发给多模态模型(mimo-v2.5 系),把返回的文字描述交给主模型。stdio + JSON-RPC 2.0,Python 3 标准库、零第三方依赖,Windows / WSL / macOS / Linux 通用。
工具
| 工具 | 参数 | 说明 |
|---|---|---|
describe_image |
path(必填)、question(可选) |
描述图片文件,返回文字 |
工作原理
- API key 解析:显式环境变量优先(约定俗成配置),否则自动发现当前工具的 auth 文件(零配置兜底)。
- 线路选择:默认免费 Zen 线路(
mimo-v2.5-free,200K 上下文);请求失败(超时 / 任意 4xx/5xx)时每请求回退到付费 Go 线路(mimo-v2.5,1M)一次;MIMO_VISION_ALLOW_PAID=false可禁用付费兜底。 - 图片预处理:检测到 ImageMagick 时缩放长边 ≤ 2048px、JPEG q85、
-strip去元数据;否则原图直发。
设计决策见 adr/0001-cross-tool-vision-mcp-auto-apikey.md。
配置方式
方式一:显式配置(约定俗成,推荐固定/生产环境)
Codex(~/.codex/config.toml):
[mcp_servers.mimo-vision]
command = 'python'
args = ['C:\path\to\mimo-vision\vision_server.py']
startup_timeout_sec = 120
[mcp_servers.mimo-vision.env]
MIMO_VISION_API_KEY = 'sk-...'
MIMO_VISION_BASE_URL = 'https://opencode.ai/zen/v1'
MIMO_VISION_MODEL = 'mimo-v2.5-free'
Claude Desktop / Claude Code(claude_desktop_config.json / 项目 .mcp.json):
{
"mcpServers": {
"mimo-vision": {
"command": "python",
"args": ["C:\\path\\to\\mimo-vision\\vision_server.py"],
"env": {
"MIMO_VISION_API_KEY": "sk-...",
"MIMO_VISION_BASE_URL": "https://opencode.ai/zen/v1",
"MIMO_VISION_MODEL": "mimo-v2.5-free"
}
}
}
}
方式二:零配置(自动发现,推荐本机日常)
env 不填任何值,server 按优先级自动复用当前工具已登录的 key:
- 环境变量:
MIMO_VISION_API_KEY>VISION_API_KEY>OPENCODE_API_KEY>OPENAI_API_KEY>ANTHROPIC_API_KEY ~/.codex/auth.json(Codex)~/.claude/settings.json(Claude Code;ANTHROPIC_AUTH_TOKEN仅当ANTHROPIC_BASE_URL指向 opencode 类端点时采用)~/.local/share/opencode/auth.json(仅opencode-go/opencode_go,不取无关 provider)
环境变量
| 变量 | 说明 | 默认 |
|---|---|---|
MIMO_VISION_API_KEY |
显式 key(最高优先级) | 无 |
VISION_API_KEY / OPENCODE_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY |
显式 key(依次降级) | 无 |
MIMO_VISION_BASE_URL |
显式线路 base URL(跳过自动选路,单线路不兜底) | 无 |
MIMO_VISION_MODEL |
显式模型(同上) | 无 |
MIMO_VISION_ALLOW_PAID |
是否允许付费线路兜底(false/0/no/off 禁用) |
true |
开发
python -m unittest discover -s tests # 运行全部测试
python vision_server.py # 以 stdio 方式启动
安装 / 发布
项目已按可发布包结构组织(pyproject.toml,运行时零第三方依赖):
pip install . # 本地安装,得到 `mimo-vision` 命令
mimo-vision # 直接以 stdio 方式启动(等价于 python vision_server.py)
其他机器(无需手动装依赖):
uvx --from /path/to/mimo-vision mimo-vision # 从本地目录运行
uvx mimo-vision # 发布到 PyPI 后一行运行
安装后注册可简化为(Codex):
[mcp_servers.mimo-vision]
command = 'mimo-vision'
startup_timeout_sec = 120
失败语义
任何失败(无 key、双线路失败、文件不存在、非图片、预处理异常)都以工具级错误返回:{isError: true, content: [{type: "text", text: "可操作提示"}]},进程不退出、连接不断开。
安全
- 只读 ADR 列出的指定 auth 文件,不扫描目录、不打印 / 写盘 / 上传 key;
- key 仅在请求头
Authorization: Bearer ...中使用。
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.