Skip to content
BetaVision & Automation

MCP for OpenCV — Connect AI Agents to OpenCV

Vision results are only useful if they are reproducible. Pipelines are declared as versioned graphs with fixed parameters, hashed inputs and stored artifacts.

Read-only by default8 typed toolsCheckpointed writes
Technical specification
Runtime
Python 3.11+ with OpenCV 4.x / 5.x
Transport
stdio and streamable HTTP
Install
pip install dccmcp-opencv
Backends
CPU and CUDA-execution-provider builds
Inputs
Image folders, video files, RTSP streams, capture devices
Platforms
Linux, macOS, Windows
Last reviewed
2026-09-12
Overview

What is 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.

  • Runtime: Python 3.11+ with OpenCV 4.x / 5.x
  • Transport: stdio and streamable HTTP
  • Install: pip install dccmcp-opencv
Why it breaks

What goes wrong when agents drive OpenCV without a contract

01

Notebook experiments never become pipelines

An agent writes a clever detection cell, and three weeks later nobody can reproduce the thresholds, the preprocessing order, or which images it ran on.

02

Vision parameters are invisible

Thresholds, kernel sizes and color-space conversions hide inside code, so results cannot be swept, compared or signed off.

03

Failures are silent

A pipeline that processes 4 000 images and fails on 40 of them looks successful unless someone counts the outputs.

How it works

How MCP for OpenCV keeps intent, structure and traceability intact

An MCP server for OpenCV workloads that turns image processing, detection, calibration and video inspection into typed, reproducible pipeline operations instead of one-off notebook cells.

Pipelines as versioned graphs

Operations are composed into a named, versioned graph. Parameters are part of the artifact, so a run can be replayed exactly.

Deterministic artifacts

Inputs are hashed, outputs are written with manifests, and a run report lists every image that failed with the reason.

Calibration as a first-class tool

Chessboard, ChArUco and circle-grid calibration are exposed as typed tools that return intrinsic and extrinsic matrices with reprojection error.

Regression on vision output

Goldens are stored per pipeline version, so a change in preprocessing that alters detection output is caught before it reaches a customer build.

Tool reference

MCP for OpenCV tools — every tool and its risk class

Agents discover this list at connect time. You decide which entries are auto-approved, which need a human and which are denied in production files.
  • image.readLoad images with explicit color space, depth and orientation handling.read
  • image.processComposable blur, threshold, morphology, edge and color-space operations.execute
  • calibration.calibrateChessboard, ChArUco and circle-grid calibration returning camera matrices and error.execute
  • detect.patternMarker, contour, blob and template detection with typed result schemas.execute
  • pipeline.composeBuild a named, versioned pipeline graph from primitive operations.write
  • pipeline.runExecute a pipeline over a dataset and emit a manifest with per-item status.execute
  • video.inspectProbe frame rate, codec, dropped frames and stream health, or sample frames.read
  • regression.compareCompare current outputs against stored goldens with tolerance reporting.read
Install

Install MCP for OpenCV in four steps

Everything runs locally. The server binds to loopback by default and only exposes the tools you approve in OpenCV.

Pre-release. These commands describe the interface we are shipping for MCP for OpenCV — the packages are not published yet. Get notified when MCP for OpenCV launches.

STEP 01

Install the package

Install the server in the same environment as your vision dependencies so it can reuse your existing OpenCV build.

pip install dccmcp-opencv
STEP 02

Start the server

Run the server with a workspace directory that holds your pipelines and datasets.

dccmcp-opencv serve --workspace ./vision
STEP 03

Register the client

Point Claude Code, Codex, Cursor, OpenClaw or any other MCP client at the server. Agents then discover your existing pipelines before composing new ones.

{
  "mcpServers": {
    "opencv": { "command": "dccmcp-opencv", "args": ["serve"] }
  }
}
STEP 04

Set resource limits

Cap worker count and memory so long-running sweeps cannot starve a workstation or a shared build agent.

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.

Read the docs
FAQ

Questions teams ask before they install

If something is missing, ask us directly — we answer technical questions with technical answers.
  • No. It wraps the OpenCV build already in your environment and adds a typed, reproducible interface on top. Existing code can be exposed as a custom tool.

  • It can attach to RTSP streams and capture devices for inspection and sampling. For hard real-time control loops, run the generated pipeline in your own process and use DCCMCP for configuration and verification.

  • Each run writes a manifest listing processed, skipped and failed items with reasons, so partial failures are visible instead of silent.

  • Yes, through CUDA-enabled OpenCV builds. The server reports which execution providers are available at startup so an agent knows what it can request.

  • Yes. Any Python callable with a typed signature can be registered as a custom tool through the plugin API, including your own models and hardware integrations.

npx dccmcp-blender@latest serve

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