mimo-vision-mcp
mimo-vision-mcp
MCP を介して、Xiaomi MiMo-V2.5 などのビジョンモデルを利用し、テキストのみの LLM に視覚能力を提供します。
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から)、環境/依存関係を自動インストール、サービスを起動し、ブラウザを自動的に開きますブラウザが開いたら、Web ページで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 を 1 つ入力するだけで開始できます。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)を呼び出します。
opencode.ai/auth で Go を購読し、API Key をコピーします
.env.exampleを.envにコピーして記入します:MIMO_API_KEY=你的-opencode-go-key
環境変数による上書きも可能です(config.py は呼び出しのたびに .env をリアルタイムで再読み込みします):
変数 | 説明 | デフォルト値 |
| API Key( | 空 |
| プロバイダー ID |
|
| ビジョンモデル ID |
|
| OpenAI 互換エンドポイント |
|
|
| 自動 |
| 1 回の出力上限 |
|
| リクエストタイムアウト(秒) |
|
ビジョンモデルの切り替え: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.serveropencode への接続
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(デフォルト 30 秒)が MCP ツール呼び出しのタイムアウトを制御します。ビジョンリクエストは数十秒かかる場合があるため、120 秒以上に調整する必要があります。mcp.mimo-vision内で個別にtimeoutを設定しないでください。mcp_timeoutを上書きしてタイムアウトの原因になります。設定変更後は opencode を再起動する必要があります。
このプロジェクトには AGENTS.md(テキストモデル向けの呼び出しガイド)も同梱されており、グローバル設定 "instructions": ["<パス>/AGENTS.md"] で各セッションに注入でき、テキストのみのモデルが画像に遭遇したときにツールを積極的に呼び出すようにできます。
ツールの説明
ツール | 説明 |
| 汎用画像 Q&A、複数画像対応 |
| 画像内容の詳細な説明 |
| 画像内のテキスト抽出(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が生成され、その後 Web ページで Key を入力して「CLI に適用」をクリックするか、.envのMIMO_API_KEYを直接編集します「API Key が設定されていません」と表示される:
.envにMIMO_API_KEYを設定します(または 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.
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
- AlicenseAqualityDmaintenanceEnables 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