mimo-vision-mcp
mimo-vision-mcp
Дайте текстовым LLM возможность видеть через MCP, используя визуальные модели, такие как Xiaomi MiMo-V2.5.
Через MCP (Model Context Protocol) возможности понимания изображений визуальных моделей (например, Xiaomi MiMo-V2.5) предоставляются текстовым LLM без мультимодальных возможностей. Когда текстовая модель сталкивается с изображением/скриншотом/путём к изображению, она может активно вызывать инструменты analyze_image, describe_image, extract_text_from_image и получать визуальные возможности.
🚀 Быстрый запуск в один клик (новичок освоится за 1 минуту, без ввода команд)
В проект встроен WebUI запуск в один клик — всё управление мышью, все настройки окружения выполняются автоматически, без командной строки:
Скачайте / клонируйте проект локально
Дважды щёлкните
start-webui.bat(Windows) — скрипт автоматически создаст.env(из.env.example), установит окружение/зависимости, запустит сервис и автоматически откроет браузерПосле открытия браузера введите свой API Key → нажмите «Применить к CLI», или просто перетащите изображение в окно → выберите визуальную модель → нажмите «Предварительный просмотр», и вы увидите, как визуальная модель «описывает изображение»
При первом запуске автоматически установятся зависимости (требуется интернет, около 1–2 минут), после этого двойной щелчок открывает мгновенно. Совершенно не нужно знать Python, не нужно вручную вводить
pip, не нужно вручную создавать.env— скрипт всё делает автоматически.
Полное подключение визуальных возможностей для текстовых LLM в командной строке см. ниже подключение к opencode.
Related MCP server: vision-bridge-mcp
Принцип работы
Текстовая модель отвечает за «планирование», визуальная модель — за «просмотр», MCP — это интерфейс, соединяющий их — данные изображения не проходят через текстовую модель.
用户给图片路径/URL
→ ① 文本 LLM 根据工具列表 + 调用指引,决定调用 analyze_image
→ ② opencode / 任意 MCP 客户端(stdio)
→ ③ mimo-vision MCP server(图片归一化 + 转发请求)
→ ④ 视觉模型(MiMo-V2.5 等,经 OpenCode Go / 自定义供应商)真正"看"图
→ ⑤ 文本结果原路返回,文本模型转述给用户Возможности
Запуск в один клик: дважды щёлкните
start-webui.bat— автоматическая установка зависимостей, запуск сервиса, открытие браузера, новичкам без порога входаГотово к использованию: по умолчанию подключён OpenCode Go, достаточно ввести API Key, можно также переключиться на официальный Xiaomi / любого пользовательского провайдера
На основе OpenAI-совместимого протокола, локальная передача через stdio, можно подключить opencode / Claude Desktop / Cursor и любой MCP-клиент
Гибкий ввод изображений: локальный путь / http(s) URL / base64 data URI / чистый base64
Поддержка нескольких изображений, автоматическое определение формата (JPEG/PNG/GIF/WebP/BMP), проверка лимита 50MB
Автоматический выбор API-протокола в зависимости от модели:
gpt-*/grok-*используют Responses API, остальные — chat/completions (можно принудительно указать)Встроенная WebUI панель конфигурации: визуальный выбор модели, предварительный просмотр, выбор синхронизируется с CLI, без перезапуска
Без API key возвращается дружелюбное сообщение об ошибке, без сбоев
Структура каталога
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.tomlУстановка
python -m venv .venv
# Windows: .\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.venv/bin/python -m pip install -e ".[dev]"Настройка API Key
Проект по умолчанию использует OpenCode Go для вызова MiMo-V2.5 (модель mimo-v2.5, OpenAI-совместимая конечная точка https://opencode.ai/zen/go/v1).
Подпишитесь на Go на opencode.ai/auth, скопируйте API Key
Скопируйте
.env.exampleв.envи заполните:MIMO_API_KEY=你的-opencode-go-key
Также можно переопределить через переменные окружения (config.py перечитывает .env при каждом вызове):
Переменная | Описание | Значение по умолчанию |
| API Key (можно также | пусто |
| ID провайдера |
|
| ID визуальной модели |
|
| OpenAI-совместимая конечная точка |
|
|
| автоматически |
| Максимальный вывод за один запрос |
|
| Таймаут запроса (секунды) |
|
Смена визуальной модели: в OpenCode Go более быстрые мультимодальные модели можно указать
MIMO_MODELкакgpt-5.6-luna(через/responses) илиminimax-m3. Обратите внимание:mimo-v2.5-pro— чисто текстовая модель, не может видеть изображения.
Запуск MCP server
# 方式一:控制台脚本
mimo-vision-mcp
# 方式二:模块运行
python -m mimo_vision_mcp.serverПодключение к opencode
См. opencode.example.json, зарегистрируйте mimo-vision как локальный stdio MCP server:
{
"$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 }
}Примечание:
experimental.mcp_timeout(по умолчанию 30s) контролирует таймаут вызова инструментов MCP. Визуальные запросы могут занимать десятки секунд, нужно установить более 120s; не устанавливайтеtimeoutотдельно вmcp.mimo-vision, это переопределитmcp_timeoutи приведёт к таймауту. После изменения конфигурации необходимо перезапустить opencode.
Проект также включает AGENTS.md (инструкции для текстовой модели), можно добавить через глобальную конфигурацию "instructions": ["<путь>/AGENTS.md"] в каждую сессию, чтобы текстовая модель при встрече с изображением активно вызывала инструменты.
Описание инструментов
Инструмент | Описание |
| Универсальный вопрос-ответ по изображению, можно несколько изображений |
| Подробное описание содержимого изображения |
| Извлечение текста с изображения (OCR) |
Каждый элемент images поддерживает:
Локальный абсолютный путь:
C:/Users/xx/Pictures/a.pngПубличный URL:
https://example.com/a.jpgbase64 data URI:
data:image/png;base64,....Чистую base64 строку
Возвращает JSON: { "result": "...", "error": "", "model": "...", "usage": {...} }
WebUI (интерактивный интерфейс · запуск в один клик)
Рекомендуемый вход для новичков: графический интерфейс, загрузка изображений, выбор модели, просмотр результата — всё мышью.
Запуск в один клик (самый простой, без команд)
Дважды щёлкните start-webui.bat (Windows):
Скрипт автоматически проверит/создаст окружение, установит зависимости
Автоматически запустит сервис и автоматически откроет браузер
Если сервис уже запущен, просто откроет браузер, без повторного запуска
Для не-Windows пользователей ручной запуск:
python -m pip install -e ".[web]" && python -m webui.app, затем откройте http://127.0.0.1:8000 (порт можно изменить черезMIMO_WEBUI_PORT).
Функции интерфейса
Вверху «CLI / MCP текущая активная модель» показывает провайдера/модель/стиль, которые реально использует командная строка LLM
После выбора модели нажмите «Применить к CLI (синхронизировать с MCP)», конфигурация записывается в
.env, без перезапуска, CLI при следующем вызове использует новую модельВнизу «Предварительный просмотр (не влияет на CLI)» для тестирования эффекта
API Key хранится в localStorage браузера; при «Применить к CLI» можно также записать в
.env
Тестирование
python -m pytest -qЧастые вопросы
Я не умею программировать / не хочу вводить команды?: Дважды щёлкните
start-webui.bat, скрипт автоматически создаст.env, установит зависимости, запустит сервис, откроет браузер — всё мышьюГде ввести API Key?: После клонирования нет
.env(в репозитории только пустой шаблон.env.example). Двойной запуск скрипта автоматически создаст.env, затем введите Key в веб-интерфейсе и нажмите «Применить к CLI», или отредактируйтеMIMO_API_KEYв.envВозвращается «API Key не настроен»: настройте
MIMO_API_KEYв.env(или введите в WebUI и нажмите «Применить к CLI»)Формат изображения не поддерживается: поддерживаются только JPEG/PNG/GIF/WebP/BMP
Ошибка «не удаётся разобрать» при вводе base64: убедитесь, что ввод — корректный base64 и формат в поддерживаемом диапазоне
Таймаут вызова инструмента MCP: увеличьте
experimental.mcp_timeoutдо 120000ms и более
Лицензия
Ссылки
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.
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.
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables 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.-
- AlicenseAqualityBmaintenanceEnables 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.58 npm1MIT