MCP for OpenCV — Connect AI Agents to OpenCV
视觉结果只有可复现才有价值。流水线被声明为带版本号的图结构,参数固定、输入带哈希、产物存档。
- 运行时
- Python 3.11+ with OpenCV 4.x / 5.x
- 传输方式
- stdio and streamable HTTP
- 安装方式
- pip install dccmcp-opencv
- 后端
- CPU and CUDA-execution-provider builds
- 输入类型
- Image folders, video files, RTSP streams, capture devices
- 支持平台
- Linux, macOS, Windows
- Last reviewed
- 2026-09-12
什么是 MCP for OpenCV?
MCP for OpenCV is a local MCP server plus a OpenCV plugin that connects AI agents to a real OpenCV session. Agents discover 8 typed tools — including image.read, image.process, calibration.calibrate and detect.pattern — and call them to inspect, create, modify and validate work inside the live application.
Unlike generated OpenCV scripts, every call is validated against your current document, classified as read, write or execute, and recorded in an audit log. OpenCV stays open, the document stays live, and destructive operations are checkpointed so they can be rolled back.
It works with Claude Code, Codex, Cursor, GitHub Copilot, Claude Desktop, Gemini CLI, Trae, Doubao, Qwen Code, CodeBuddy, Custom MCP clients, ML pipeline runners over stdio or streamable HTTP.
- 运行时: Python 3.11+ with OpenCV 4.x / 5.x
- 传输方式: stdio and streamable HTTP
- 安装方式: pip install dccmcp-opencv
没有契约时,让 Agent 驱动 OpenCV 会出什么问题
Notebook 实验永远变不成流水线
Agent 写了一段很聪明的检测代码,三周后没人能复现当时的阈值、预处理顺序,或者它到底跑在哪批图上。
视觉参数是看不见的
阈值、卷积核大小、色彩空间转换都藏在代码里,结果既无法扫描对比,也无法验收签核。
失败是静默的
一条处理 4000 张图、其中 40 张失败的流水线,看起来是成功的——除非有人去数产物。
MCP for OpenCV 如何保住设计意图、结构与可追溯性
流水线即带版本的图
操作被组合成具名、带版本的图。参数是产物的一部分,因此任一运行都能被精确重放。
确定性的产物
输入带哈希,输出带清单,运行报告会列出每一张失败的图与原因。
标定是一等工具
棋盘格、ChArUco 与圆点标定都作为类型化工具暴露,返回内外参矩阵与重投影误差。
对视觉输出做回归
每个流水线版本都保存基准输出,因此改变预处理导致检测结果变化会在到达客户之前被捕获。
MCP for OpenCV 工具清单与风险等级
工具名与参数签名保持英文——它们是 Agent 实际调用的接口。
image.readLoad images with explicit color space, depth and orientation handling.readimage.processComposable blur, threshold, morphology, edge and color-space operations.executecalibration.calibrateChessboard, ChArUco and circle-grid calibration returning camera matrices and error.executedetect.patternMarker, contour, blob and template detection with typed result schemas.executepipeline.composeBuild a named, versioned pipeline graph from primitive operations.writepipeline.runExecute a pipeline over a dataset and emit a manifest with per-item status.executevideo.inspectProbe frame rate, codec, dropped frames and stream health, or sample frames.readregression.compareCompare current outputs against stored goldens with tolerance reporting.read
四步安装 MCP for OpenCV
预发布。 以下命令描述的是我们即将发布的接口,软件包尚未发布。 Get notified when MCP for OpenCV launches.
安装软件包
把服务装进与你的视觉依赖相同的环境,以便复用现有的 OpenCV 构建。
pip install dccmcp-opencv
启动服务
用存放流水线与数据集的目录作为工作区启动服务。
dccmcp-opencv serve --workspace ./vision
注册客户端
把 Claude Code、Codex、Cursor、OpenClaw 或任何其他 MCP 客户端指向该服务。Agent 随后可以发现你已有的流水线,再决定是否新建。
{
"mcpServers": {
"opencv": { "command": "dccmcp-opencv", "args": ["serve"] }
}
}设置资源上限
限制并发数与内存,避免长时间扫描把工作站或共享构建机拖垮。
dccmcp-opencv limits --workers 4 --max-memory 8Gi
MCP for OpenCV works with the agents you already use
- Claude Code
- Codex
- Cursor
- GitHub Copilot
- Claude Desktop
- Gemini CLI
- Trae
- Doubao
- Qwen Code
- CodeBuddy
- Custom MCP clients
- ML pipeline runners
Any other MCP-compatible client works too — one config entry, stdio by default.
常与 OpenCV 搭配使用的其他 MCP 集成
10 integrations available
Compare tool lists, support matrices and policies for every supported application.
团队在安装前最常问的问题
不会。它包装你环境中已有的 OpenCV 构建,在其上增加一个类型化、可复现的接口。现有代码可以通过自定义工具暴露出来。
它可以挂接 RTSP 流与采集设备做巡检与抽帧。对于硬实时控制回路,请把生成的流水线放到你自己的进程里运行,用 DCCMCP 做配置与验证。
每次运行都会写出清单,列出已处理、已跳过与失败的条目及原因,让部分失败可见而不是静默。
支持,通过 CUDA 版 OpenCV 构建。服务在启动时会报告可用的执行提供者,让 Agent 知道自己能请求什么。
可以。任何带类型签名的 Python 可调用对象都能通过插件 API 注册为自定义工具,包括你自己的模型与硬件集成。
Put an agent inside your real tools — without putting your pipeline at risk
Install an integration, set a policy, and let your agent inspect, build and validate work in Blender, Maya, Houdini, 3ds Max, Rhino, ZBrush, Photoshop, FreeCAD, QGIS or OpenCV. Free to start, local by default.
macOS · Windows · Linux — no cloud dependency required