Get the FREE Ultimate OpenClaw Setup Guide →

videocapture

Model Context Protocol (MCP) server to capture images from an OpenCV-compatible webcam or video source

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 13rac1-videocapture-mcp uv run --with mcp[cli] --with numpy --with opencv-python mcp run /ABSOLUTE_PATH/videocapture_mcp.py

How to use

Video Still Capture MCP is a Python-based MCP server that exposes camera access and control through OpenCV to AI assistants. It provides a set of tools for capturing images, managing camera connections, and adjusting video properties such as brightness, contrast, and resolution. The server emphasizes quick image capture and simple connection management, enabling an agent to open a camera connection, capture frames, apply optional flips, and query or modify camera settings as needed. Tools include quick_capture, open_camera, capture_frame, get_video_properties, set_video_property, close_connection, and list_active_connections, which together let an assistant perform end-to-end camera interactions with minimal footprint.

To use the server, you would install the MCP Python SDK along with OpenCV, start the MCP server, and then issue function calls from your AI assistant or integrated tools. For example, quick_capture can grab a single frame from the default camera, while open_camera and capture_frame allow you to maintain a persistent connection for multiple captures. The get_video_properties and set_video_property tools let you inspect and adjust camera attributes like width, height, brightness, and FPS. The list_active_connections tool helps you monitor ongoing camera sessions, and close_connection ensures proper resource cleanup when you’re done.

How to install

Prerequisites

  • Python 3.10+
  • OpenCV (opencv-python)
  • MCP Python SDK
  • UV (optional, for convenient running with uv run)

Installation from source

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

Run the MCP server

mcp dev videocapture_mcp.py

If you prefer to run via UV (when integrated in Claude/Desktop workflows):

uv run --with mcp[cli] --with numpy --with opencv-python mcp run /ABSOLUTE_PATH/videocapture_mcp.py

Note: Replace /ABSOLUTE_PATH/videocapture_mcp.py with the absolute path to your videocapture_mcp.py file.

Additional notes

Tips and common issues:

  • Ensure your webcam is not in use by another application before starting the MCP server.
  • On some systems, camera permissions may need to be granted for Python processes.
  • If OpenCV import fails, verify that opencv-python is installed in the same Python environment as the MCP server.
  • When using multiple cameras, you can specify device_index in open_camera to select the correct device (e.g., device_index=1).
  • For long-running tasks, explicitly close connections with close_connection to release resources promptly.
  • If integrating with Claude Desktop via UV, ensure the absolute path to your videocapture_mcp.py is correct in the config and restart Claude after changes.
  • Environment variables for camera access are typically handled by the OS; no special vars are required by default.

Related MCP Servers

Sponsor this space

Reach thousands of developers