mimo-vision-mcp
mimo-vision-mcp
Dale capacidad de visión a los LLM solo de texto a través de MCP, impulsado por modelos de visión como Xiaomi MiMo-V2.5.
A través de MCP (Model Context Protocol), se expone la capacidad de comprensión de imágenes de modelos de visión (como MiMo-V2.5 de Xiaomi) a LLM de texto que no poseen capacidades multimodales. Cuando el modelo de texto se encuentra con imágenes/capturas de pantalla/rutas de imagen, puede llamar activamente a herramientas como analyze_image, describe_image, extract_text_from_image para obtener capacidades de visión.
🚀 Inicio con un clic (los principiantes pueden empezar en 1 minuto, sin necesidad de escribir ningún comando)
Este proyecto incluye un inicio con un clic vía WebUI, todo con operaciones de ratón, configuración automática del entorno, sin necesidad de línea de comandos:
Descarga / clona este proyecto en tu máquina local
Haz doble clic en
start-webui.bat(Windows): el script creará automáticamente.env(a partir de.env.example), instalará el entorno/dependencias, iniciará el servicio y abrirá el navegador automáticamenteUna vez abierto el navegador, introduce tu API Key en la página web → haz clic en «Aplicar a CLI», o simplemente arrastra una imagen → elige un modelo de visión → haz clic en «Prueba de vista previa» para ver al modelo de visión "describir la imagen"
En el primer inicio se instalarán las dependencias automáticamente (requiere conexión a internet, unos 1~2 minutos); después, con doble clic se abre al instante. No necesitas saber Python, ni escribir
pipa mano, ni crear.envmanualmente: el script lo hace todo automáticamente.
La integración completa de la capacidad de visión del LLM de texto en la línea de comandos se describe a continuación en Integración con opencode.
Related MCP server: vision-bridge-mcp
Principio
El modelo de texto se encarga de la "orquestación", el modelo de visión se encarga de "ver", y MCP es la interfaz que conecta ambos: los datos de imagen no pasan por el modelo de texto.
用户给图片路径/URL
→ ① 文本 LLM 根据工具列表 + 调用指引,决定调用 analyze_image
→ ② opencode / 任意 MCP 客户端(stdio)
→ ③ mimo-vision MCP server(图片归一化 + 转发请求)
→ ④ 视觉模型(MiMo-V2.5 等,经 OpenCode Go / 自定义供应商)真正"看"图
→ ⑤ 文本结果原路返回,文本模型转述给用户Características
Inicio con un clic: haz doble clic en
start-webui.baty listo; instala dependencias, inicia el servicio y abre el navegador automáticamente, sin barreras para principiantesListo para usar: integra OpenCode Go por defecto; solo necesitas una API Key para empezar, y también puedes cambiar al proveedor oficial de Xiaomi o a cualquier proveedor personalizado
Basado en el protocolo compatible con OpenAI, transporte local stdio, compatible con cualquier cliente MCP como opencode / Claude Desktop / Cursor
Entrada de imágenes flexible: ruta local / URL http(s) / data URI base64 / base64 puro son todos válidos
Soporta múltiples imágenes, detección automática de formato (JPEG/PNG/GIF/WebP/BMP), validación del límite de 50MB
Selección automática del protocolo de API según el modelo:
gpt-*/grok-*usan Responses API, el resto usa chat/completions (se puede forzar)WebUI integrado como panel de configuración: selección visual de modelos, prueba de vista previa, sincronización con CLI sin reiniciar
Mensajes de error amigables si no hay API key, sin fallos
Estructura de directorios
mimo-vision-mcp/
├── mimo_vision_mcp/
│ ├── config.py # 配置读取(.env 实时重读)+ 应用到 MCP
│ ├── image_loader.py # 图片输入归一化 + MIME 探测
│ ├── providers.py # 供应商注册表 + call_vision(chat/responses 适配)
│ └── server.py # FastMCP server + 3 个工具
├── webui/ # WebUI 配置面板(FastAPI + 单页 HTML)
├── tests/ # 单元测试
├── .github/workflows/ci.yml
├── opencode.example.json # opencode 接入配置示例
├── AGENTS.md # 文本模型的调用指引
├── start-webui.bat # 🚀 一键启动(Windows,双击即用)
├── LICENSE
└── pyproject.tomlInstalación
python -m venv .venv
# Windows: .\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.venv/bin/python -m pip install -e ".[dev]"Configuración de la API Key
Este proyecto usa por defecto el plan OpenCode Go para llamar a MiMo-V2.5 (modelo mimo-v2.5, endpoint compatible con OpenAI https://opencode.ai/zen/go/v1).
Suscríbete a Go en opencode.ai/auth y copia la API Key
Copia
.env.examplea.envy rellénalo:MIMO_API_KEY=你的-opencode-go-key
También se puede sobrescribir mediante variables de entorno (config.py relee .env en cada llamada):
Variable | Descripción | Valor por defecto |
| API Key (también se puede usar | vacío |
| ID del proveedor |
|
| ID del modelo de visión |
|
| Endpoint compatible con OpenAI |
|
|
| automático |
| Límite de salida por llamada |
|
| Tiempo de espera de la solicitud (segundos) |
|
Cambiar el modelo de visión: en OpenCode Go, los modelos multimodales más rápidos se pueden configurar cambiando
MIMO_MODELagpt-5.6-luna(usa/responses) ominimax-m3. Ten en cuenta quemimo-v2.5-proes un modelo solo de texto y no puede ver imágenes.
Ejecutar el servidor MCP
# 方式一:控制台脚本
mimo-vision-mcp
# 方式二:模块运行
python -m mimo_vision_mcp.serverIntegración con opencode
Consulta opencode.example.json para registrar mimo-vision como servidor MCP stdio local:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"mimo-vision": {
"type": "local",
"command": ["<你的python路径>", "-m", "mimo_vision_mcp.server"],
"enabled": true,
"environment": { "MIMO_API_KEY": "{env:MIMO_API_KEY}" }
}
},
"experimental": { "mcp_timeout": 120000 }
}Nota:
experimental.mcp_timeout(por defecto 30s) controla el tiempo de espera de las llamadas a herramientas MCP. Las solicitudes de visión pueden tardar decenas de segundos, así que ajústalo a más de 120s; no configurestimeoutpor separado enmcp.mimo-vision, ya que sobrescribiríamcp_timeouty provocaría tiempos de espera. Después de cambiar la configuración, reinicia opencode para que surta efecto.
Este proyecto también incluye AGENTS.md (guía de llamadas para el modelo de texto), que se puede inyectar en cada sesión mediante la configuración global "instructions": ["<ruta>/AGENTS.md"], para que el modelo de texto puro llame activamente a las herramientas cuando encuentre imágenes.
Descripción de herramientas
Herramienta | Descripción |
| Preguntas y respuestas generales sobre imágenes, admite múltiples imágenes |
| Describe el contenido de la imagen en detalle |
| Extrae texto de la imagen (OCR) |
Cada elemento de images admite:
Ruta absoluta local:
C:/Users/xx/Pictures/a.pngURL pública:
https://example.com/a.jpgdata URI base64:
data:image/png;base64,....Cadena base64 pura
Devuelve JSON: { "result": "...", "error": "", "model": "...", "usage": {...} }
WebUI (frontend interactivo · inicio con un clic)
Entrada recomendada para principiantes: interfaz gráfica, sube imágenes, elige modelo, ve los resultados, todo con el ratón.
Inicio con un clic (lo más sencillo, sin necesidad de comandos)
Haz doble clic en start-webui.bat (Windows):
El script comprueba/crea el entorno automáticamente e instala las dependencias
Inicia el servicio automáticamente y abre el navegador
Si el servicio ya está en ejecución, solo abre el navegador, sin iniciar duplicados
Para usuarios que no usan Windows, inicio manual:
python -m pip install -e ".[web]" && python -m webui.app, y luego abre http://127.0.0.1:8000 en el navegador (el puerto se puede cambiar conMIMO_WEBUI_PORT).
Funciones de la interfaz
La parte superior «Modelo activo CLI / MCP» muestra el proveedor/modelo/estilo que usa realmente el LLM de línea de comandos
Después de elegir el modelo, haz clic en «Aplicar a CLI (sincronizar con MCP)»; la configuración se escribe en
.env, sin reiniciar, y la próxima llamada del CLI usará el nuevo modeloLa parte inferior «Prueba de vista previa (no afecta al CLI)» sirve para probar el resultado primero
La API Key se guarda en el localStorage del navegador; al hacer clic en «Aplicar a CLI» también se puede escribir en
.env
Pruebas
python -m pytest -qPreguntas frecuentes
¿No sé programar / no quiero escribir comandos?: haz doble clic en
start-webui.bat; el script creará.env, instalará dependencias, iniciará el servicio y abrirá el navegador automáticamente, todo con el ratón¿Dónde se rellena la API Key?: después de clonar no hay
.env(el repositorio solo contiene la plantilla vacía.env.example). Al hacer doble clic en el script de inicio se genera.envautomáticamente; luego rellena la Key en la página web y haz clic en «Aplicar a CLI», o edita directamenteMIMO_API_KEYen.envDevuelve "API Key no configurada": configura
MIMO_API_KEYen.env(o rellénala directamente en el WebUI y haz clic en «Aplicar a CLI»)Formato de imagen no compatible: solo se admiten JPEG/PNG/GIF/WebP/BMP
Error "no se puede analizar" con entrada base64: asegúrate de que la entrada sea base64 válido y que el formato esté dentro de los admitidos
Tiempo de espera agotado en llamadas a herramientas MCP: ajusta
experimental.mcp_timeouta más de 120000ms
Licencia
Referencias
Available Tools
3 toolsanalyze_imageA
分析图片内容并回答你的问题(基于视觉模型)。
当用户要求"看图片/描述图片/识别图中内容/截图分析",或对话中出现本地图片路径、 图片 URL 或 base64 图片数据时,主动调用本工具。
Args: images: 图片列表,每项可以是: - 本地绝对路径,如 "C:/Users/xx/Pictures/a.png" - 公网 URL,如 "https://example.com/a.jpg" - base64 data URI,如 "data:image/png;base64,...." - 纯 base64 字符串 prompt: 对图片提出的问题或指令,如 "这张图里有什么动物?" detail: 可选,图片采样精细度,取 "low" / "high" / "auto"
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | ||
| images | Yes | ||
| prompt | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
无注解,描述承担全部行为披露责任。仅提到'基于视觉模型'暗示外部调用,但未说明网络依赖、图片大小限制、失败处理或隐私影响等关键行为。描述只覆盖输入格式,行为细节缺失。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
描述采用分节结构(触发条件+参数解释),信息密集且无冗余。中文表述流畅,但长度稍长,每句均有价值,整体简洁。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
工具中等复杂,有输出schema故无需描述返回值。描述覆盖了参数和触发场景,但未提及错误处理或资源限制等潜在注意事项,在有无注解情况下仍可更完整。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
schema覆盖率为0%,描述完全弥补了参数含义:详细列出images的四种合法格式(路径、URL、data URI、纯base64),解释prompt用途,并明确detail为采样精细度且枚举值low/high/auto。超越schema预期。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述明确说明工具是'分析图片内容并回答你的问题',使用具体动词和资源。但未明确区分与兄弟工具describe_image、extract_text_from_image的边界,可能混淆,因此扣一分。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
描述提供了明确的触发条件(用户要求看图片/描述图片等或出现图片路径/URL/base64),并指示'主动调用'。但未说明何时不使用(如仅需纯描述时是否应选describe_image),不过整体指引清晰。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_imageA
详细描述图片内容(基于视觉模型)。
当用户要求"描述/介绍一下这张图、看到什么"时调用。输入约定同 analyze_image。
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | ||
| images | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility. It mentions '基于视觉模型' (vision model based) but does not elaborate on output format, limitations, or side effects. It also references '输入约定同 analyze_image' without specifying those conventions, leaving behavior opaque. Some context is given but insufficient for a fully transparent description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences, no fluff, directly states purpose and when to call. It is well-structured with a clear trigger and a reference for input conventions. However, the conciseness comes at the cost of completeness, but for the dimension of conciseness and structure, it is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fails to provide comprehensive guidance: no exclusions, no detail on output, no mention of what happens for invalid input, and no standalone parameter explanation. The context signals show no annotations and 0% parameter coverage, so the description must compensate but only partially does by reusing analyze_image's conventions. For a simple tool this may be acceptable, but for an AI agent making decisions, it's insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning no parameter descriptions are provided in the schema. The description mentions '输入约定同 analyze_image' which implies conventions are shared, but since analyze_image's conventions are not spelled out here, the agent must look elsewhere. The description lists only 'detail' and 'images' names without explanation. This adds minimal clarity, and the description does not compensate for the missing parameter docs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('详细描述图片内容' = describe image content in detail) and specifically mentions the vision model basis. While it doesn't explicitly contrast with sibling tools, the phrasing '当用户要求...' distinguishes it from extract_text_from_image which focuses on text extraction. Purpose is clear and specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit trigger conditions ('当用户要求描述/介绍一下这张图、看到什么时调用') and points to analyze_image for input conventionsastra. However, it does not mention exclusions or when to prefer extract_text_from_image over this tool, so some guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_text_from_imageA
提取图片中的文字(OCR,基于视觉模型)。
当用户要求"识别/提取图中文字、截图里的文本"时调用。输入约定同 analyze_image。
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | ||
| images | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It adds that it's 'OCR based on vision model', which gives some insight into how it works. However, it does not disclose potential limitations, error behavior, or whether images are stored, leaving some behavioral aspects unspecified. The read-only nature mitigates the gap, but the description is thin.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, two sentences, with the main purpose front-loaded. Every sentence adds value, and there is no wasted wording. The reference to analyze_image is efficient, though it creates a dependency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema is present, so return values are covered externally. The description covers purpose and usage trigger. The only gap is that it relies on the sibling tool for input conventions, but given the tool's simplicity and the presence of sibling context, it is adequately complete for an OCR tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It only says 'input conventions same as analyze_image' without explaining what images or detail mean in practice. This is a pointer to sibling information rather than an explanation, failing to provide direct parameter semantics for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool extracts text from images via OCR with a specific verb and resource. It also distinguishes from sibling tools by explicitly mentioning when to use it for 'recognize/extract text in images, screenshots', which sets it apart from analyze_image and describe_image.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides an explicit trigger condition: 'Call when user asks to recognize/extract text in images'. It also references input conventions from analyze_image, giving clear context. However, it does not explicitly mention when not to use this tool, though the sibling distinction is implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
analyze_image - First observed
describe_image - First observed
extract_text_from_image
TDQS
Scored across 3 tools
The tools analyze_image and describe_image have overlapping purposes—both process images to provide content understanding, and analyze_image accepts a prompt that could easily request a description. This creates selection ambiguity, while extract_text_from_image is clearly distinct.
All tool names follow the consistent verb_noun pattern: analyze_image, describe_image, extract_text_from_image. The naming is predictable and makes functionality intuitively obvious.
With only 3 tools, the server stays within the typical 3-15 range and is appropriately scoped for a vision analysis service. Each tool addresses a high-level need without excessive bloat.
The set covers core image understanding (general Q&A, full description, OCR), but lacks dedicated tools for tasks like classification, comparison, or object detection. The overlap between analyze and describe indicates a design gap, though the current coverage handles basic workflows.
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
MCP server exposing the YourImageShare upload API (upload/list/delete) as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables image understanding and OCR through Xiaomi's MiMo vision language model, providing tools for image description, Q&A, and text recognition via MCP. Supports both image URLs and local file paths.-
- AlicenseAqualityDmaintenanceEnables non-multimodal models to see images by providing MCP tools for image understanding and OCR, backed by any OpenAI-compatible vision model.2MIT
- AlicenseAqualityCmaintenanceEnables text-only reasoning models to see images by wrapping vision-language models as MCP tools, supporting image description, OCR, chart analysis, and custom questioning within MCP-compatible IDEs.4MIT
- AlicenseNot gradedqualityAmaintenanceProvides multimodal vision MCP tools for image analysis, OCR, object detection, text-to-image generation, and image similarity, integrating OpenAI, Qwen, and Gemini.126 npmMIT