Home / MCP / Video Still Capture MCP Server

Video Still Capture MCP Server

Provides access to webcams via OpenCV through an MCP server, enabling image capture and camera control.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "videocapture": {
            "command": "uv",
            "args": [
                "run",
                "--with",
                "mcp[cli]",
                "--with",
                "numpy",
                "--with",
                "opencv-python",
                "mcp",
                "run",
                "/ABSOLUTE_PATH/videocapture_mcp.py"
            ]
        }
    }
}

Video Still Capture MCP is a Python-based MCP server that lets you access and control webcams via OpenCV. It exposes a set of tools for capturing images, adjusting camera settings, and managing video connections, enabling AI assistants to interact with video sources programmatically.

How to use

You will interact with this MCP server through an MCP client. Start a camera session when you need to capture frames, adjust properties, or manage connections. You can open a camera, capture frames, flip images if needed, and query or set properties like brightness, contrast, and resolution. Use the available tools to perform these tasks without manually handling low-level OpenCV code.

Key workflows you can perform: open a camera and keep a connection for multiple captures, grab a single frame, adjust live properties, and close the connection when you are done. If you want a quick capture, you can request a single frame and immediately release resources.

Whenever you need a function reference, rely on the tool descriptions to know the exact inputs and outputs. For example, you can specify the camera by device index, choose whether to flip the image, and request property changes by name and value. The server will return an image object for capture requests and a boolean for successful property updates.

How to install

Prerequisites: you need Python 3.10 or newer, OpenCV, the MCP Python SDK, and UV (optional) for easier running and integration.

Install from source and prepare the server to run locally:

git clone https://github.com/13rac1/videocapture-mcp.git
cd videocapture-mcp
pip install -e .

Run the MCP server

Start the MCP server so it can listen for requests from your MCP client.

mcp dev videocapture_mcp.py

Available tools

quick_capture

Open a camera, capture a single frame, and automatically close the camera. Returns the captured image.

open_camera

Open a connection to a camera device and return a connection ID for subsequent operations.

capture_frame

Capture a single frame from an open camera connection, with an optional horizontal flip.

get_video_properties

Retrieve properties of a video source such as width, height, and fps for a given connection.

set_video_property

Set a specific property of the video source like brightness, contrast, width, or height.

close_connection

Close an open camera connection and release associated resources.

list_active_connections

List all currently active camera connections.