Skip to main content
Glama

ImageMCP — 给文本模型配一双"眼睛"

部分大模型(如 DeepSeek)不具备图片识别能力。ImageMCP 是一个常驻系统托盘的桌面应用,内置标准 MCP 服务,把图片交给具备多模态能力的模型(默认小米 MiMo mimo-v2.5)识别后,把答案返回给文本模型。任何支持 MCP 的 Code Agent(Claude Code、opencode、Cline、Cursor、Windsurf 等)都能接入。

文件说明

文件

作用

imagemcp.exe

单文件应用。双击启动:常驻系统托盘 + 内嵌设置窗口 + 本机 HTTP MCP 服务

config.json

配置文件(与 exe 同目录,由设置窗口写入)

Related MCP server: pic-id-mcp

快速开始(接收方,无需安装 Python)

第 1 步:放置并启动

imagemcp.execonfig.json 放到同一目录(如 D:\ImageMCP\),双击 imagemcp.exe

  • 桌面右下角出现托盘图标;

  • 自动弹出设置窗口,顶部横幅显示服务状态;

  • 后台自动启动 MCP 服务:http://127.0.0.1:9847/mcp

第 2 步:填写 API 配置

在设置窗口填入:

字段

说明

API 地址 (api_base)

默认 https://api.xiaomimimo.com/v1(OpenAI 兼容即可)

API 密钥 (api_key)

你的多模态模型 API Key

模型 ID

默认 mimo-v2.5

点「保存并检测」→ 顶部横幅变绿色「✓ 服务正常:图片识别可用」即配置成功。

第 3 步:接入 MCP 客户端

在任意 MCP 客户端,把 MCP 服务器指向 http://127.0.0.1:9847/mcp(Streamable HTTP / SSE)。

程序常驻托盘期间服务持续可用;客户端无需再次拉起进程。关闭设置窗口只是最小化到托盘,程序仍在运行;从托盘菜单「退出」才会真正停止。

第 4 步:开始使用

在对话中让助手"看这张图",它会自动调用 analyze_image 识别图片并回答。

各 MCP 客户端接入方式

所有客户端都连同一个地址:

地址:http://127.0.0.1:9847/mcp
类型:Streamable HTTP(部分客户端写作 HTTP / SSE)

客户端

接入方式

Claude Code

claude mcp add --transport http imagemcp http://127.0.0.1:9847/mcp

opencode

opencode.jsonmcp.imagemcp = {"type":"remote","url":"http://127.0.0.1:9847/mcp","enabled":true}

Cline / Roo Code / Kilo Code

MCP Servers → 添加远程/HTTP 服务器,URL 填上面地址

Claude Desktop

claude_desktop_config.json 的 mcpServers 用 HTTP 类型

opencode opencode.json 示例:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "imagemcp": {
      "type": "remote",
      "url": "http://127.0.0.1:9847/mcp",
      "enabled": true
    }
  }
}

代理提示:若连接失败且本机开了系统代理,请把 127.0.0.1localhost 加入代理排除(NO_PROXY),否则本机 HTTP 流量可能被代理拦截。

托盘应用操作

操作

效果

双击托盘图标

打开设置窗口

托盘菜单「复制 MCP 地址」

复制 http://127.0.0.1:9847/mcp 到剪贴板

关闭设置窗口

最小化到托盘,程序继续运行

托盘菜单「退出」

停止 HTTP 服务并退出程序

环境变量覆盖(可选)

IMAGE_MCP_API_BASE / IMAGE_MCP_API_KEY / IMAGE_MCP_MODEL 优先级高于 config.json,适合不想把密钥写入配置文件时使用。

日志

程序运行后会在 exe 同目录生成 imagemcp.log,记录每次 analyze_image 调用的输入与输出:

[2026-08-03 22:58:41.172] [OK] analyze_image 耗时2232ms
  输入 image : C:\Users\...\blue.png
  输入 question: 这张图是什么颜色?一句话
  输出        : 这张图是蓝色(纯蓝色)的。
  • 包含时间、状态(OK/ERROR)、agent 传入的图片来源与提示词、返回内容、耗时;

  • 图片为 base64 data URI 时只记录前缀与长度,避免日志膨胀;

  • 自动轮转:单个日志默认超过 5MB 归档为 imagemcp.log.<时间戳>,默认保留 3 份;

  • 环境变量控制:

    • IMAGEMCP_LOG=0 关闭日志;

    • IMAGEMCP_LOG_MAX_MB=<数字> 调整单文件上限(MB);

    • IMAGEMCP_LOG_KEEP=<数字> 调整保留归档份数。

开发者运行(源码方式)

pip install -r requirements.txt
python main.py            # 托盘应用(默认)
python main.py --serve    # stdio MCP 服务(给只支持 stdio 的客户端)
python main.py --http     # headless HTTP 服务(调试用)

二次打包

pip install -r requirements-dev.txt
build.bat                # 产出 dist\imagemcp.exe

工作原理

任意 MCP 客户端 ──HTTP──▶ imagemcp.exe (127.0.0.1:9847/mcp) ──HTTP──▶ 多模态 API (MiMo)
                              ▲ 常驻托盘
                              │ 读/写 config.json(与 exe 同目录)

analyze_image 工具接受 image(本地绝对路径 / http(s) URL / base64 data URI)与 question,图片统一转为 base64 内联发送,答案直接返回文本模型。限制:单图 ≤ 50MB;支持 JPEG / PNG / GIF / WebP / BMP。

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    Local vision-capable MCP server that lets AI agents describe screenshots, UI, charts, and photos via vision and OCR tools, with support for multiple providers and automatic fallback.
    3
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server that gives text-only AI agents the ability to understand images via vision tools, including multi-image analysis, OCR, comparison, and structured extraction. It uses providers like OpenAI, Anthropic, Gemini, and OpenRouter to return plain text descriptions.
    10
    MIT

View all related MCP servers

Related MCP Connectors

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

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/yphyphyph/ImageMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server