VideoCapture

by 13rac1

6 stars
Not rated
GitHub

About

Provides webcam access for capturing still images with camera control features including brightness adjustment, resolution settings, and basic image transformations through OpenCV

Details

Author
13rac1
Repository
13rac1/videocapture-mcp
GitHub stars
6
Categories
Other, Media, AI, Design, Developer Tools, Infrastructure
Tags
#web, #video, #iot

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name VideoCapture
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 run
    • Argument 2 --with
    • Argument 3 mcp[cli]
    • Argument 4 --with
    • Argument 5 numpy
    • Argument 6 --with
    • Argument 7 opencv-python
    • Argument 8 mcp
    • Argument 9 run
    • Argument 10 /ABSOLUTE_PATH/videocapture_mcp.py

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

quick_capture

Quickly open a camera, capture a single frame, and close it. Parameters: device_index (int, optional, default is 0), flip (bool, optional, default is False). Returns: The captured frame as an Image object.

open_camera

Open a connection to a camera device. Parameters: device_index (int, optional, default is 0), name (optional string). Returns: Connection ID for the opened camera.

capture_frame

Capture a single frame from the specified video source. Parameters: connection_id (str), flip (bool, optional, default is False). Returns: The captured frame as an Image object.

get_video_properties

Get properties of the video source. Parameters: connection_id (str). Returns: Dictionary of video properties (width, height, fps, etc.).

set_video_property

Set a property of the video source. Parameters: connection_id (str), property_name (str), value (float). Returns: True if successful, False otherwise.

close_connection

Close a video connection and release resources. Parameters: connection_id (str). Returns: True if successful.

list_active_connections

List all active video connections. Returns: List of active connection IDs.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

{
    "cwd": "",
    "env": [],
    "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "numpy",
        "--with",
        "opencv-python",
        "mcp",
        "run",
        "/ABSOLUTE_PATH/videocapture_mcp.py"
    ],
    "shell": false,
    "command": "uv"
}

Macos

{
    "cwd": "",
    "env": [],
    "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "numpy",
        "--with",
        "opencv-python",
        "mcp",
        "run",
        "/ABSOLUTE_PATH/videocapture_mcp.py"
    ],
    "shell": false,
    "command": "uv"
}

Windows

{
    "cwd": "",
    "env": [],
    "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "numpy",
        "--with",
        "opencv-python",
        "mcp",
        "run",
        "C:\\ABSOLUTE_PATH\\videocapture-mcp\\videocapture_mcp.py"
    ],
    "shell": false,
    "command": "uv"
}

An MCP server for accessing and controlling webcams using OpenCV.

A Model Context Protocol server for accessing and controlling webcams via OpenCV

Video Still Capture MCP is a Python implementation of the Model Context Protocol (MCP) that provides AI assistants with the ability to access and control webcams and video sources through OpenCV. This server exposes a set of tools that allow language models to capture images, manipulate camera settings, and manage video connections. There is no video capture.

Here are some examples of the Video Still Capture MCP server in action:

- Python 3.10+
- OpenCV(opencv-python)
-
MCP Python SDK
-
UV(optional)

git clone https://github.com/13rac1/videocapture-mcp.git cd videocapture-mcp pip install -e .
# Mac nano ~/Library/Application\ Support/Claude/claude_desktop_config.json # Linux nano ~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "VideoCapture ": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "--with", "numpy", "--with", "opencv-python", "mcp", "run", "/ABSOLUTE_PATH/videocapture_mcp.py" ] } } }

Ensure you replace/ABSOLUTE_PATH/videocapture-mcpwith the project's absolute path.

nano $env:AppData\Claude\claude_desktop_config.json
{ "mcpServers": { "VideoCapture": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "--with", "numpy", "--with", "opencv-python", "mcp", "run", "C:\ABSOLUTE_PATH\videocapture-mcp\videocapture_mcp.py" ] } } }

Ensure you replaceC:\ABSOLUTE_PATH\videocapture-mcpwith the project's absolute path.

Alternatively, you can use themcpCLI to install the server:

This will automatically configure Claude Desktop to use your videocapture MCP server.

Once integrated, Claude will be able to access your webcam or video source when requested. Simply ask Claude to take a photo or perform any webcam-related task.

- Quick Image Capture: Capture a single image from a webcam without managing connections
- Connection Management: Open, manage, and close camera connections
- Video Properties: Read and adjust camera settings like brightness, contrast, and resolution
- Image Processing: Basic image transformations like horizontal flipping

Quickly open a camera, capture a single frame, and close it.

quick_capture(device_index: int = 0, flip: bool = False) -> Image

- device_index: Camera index (0 is usually the default webcam)
- flip: Whether to horizontally flip the image
- Returns: The captured frame as an Image object

open_camera(device_index: int = 0, name: Optional[str] = None) -> str

- device_index: Camera index (0 is usually the default webcam)
- name: Optional name to identify this camera connection
- Returns: Connection ID for the opened camera

Capture a single frame from the specified video source.

capture_frame(connection_id: str, flip: bool = False) -> Image

- connection_id: ID of the previously opened video connection
- flip: Whether to horizontally flip the image
- Returns: The captured frame as an Image object

get_video_properties(connection_id: str) -> dict

- connection_id: ID of the previously opened video connection
- Returns: Dictionary of video properties (width, height, fps, etc.)

set_video_property(connection_id: str, property_name: str, value: float) -> bool

- connection_id: ID of the previously opened video connection
- property_name: Name of the property to set (width, height, brightness, etc.)
- value: Value to set
- Returns: True if successful, False otherwise

Close a video connection and release resources.

close_connection(connection_id: str) -> bool

- connection_id: ID of the connection to close
- Returns: True if successful

Here's how an AI assistant might use the Webcam MCP server:

I'll take a photo using your webcam.

(The AI would callquick_capture()behind the scenes)

I'll open a connection to your webcam so we can take multiple photos.

(The AI would callopen_camera()and store the connection ID)

Let me increase the brightness of the webcam feed.

(The AI would callset_video_property()with the appropriate parameters)

The server automatically manages camera resources, ensuring all connections are properly released when the server shuts down. For long-running applications, it's good practice to explicitly close connections when they're no longer needed.

If your system has multiple cameras, you can specify the device index when opening a connection:

# Open the second webcam (index 1) connection_id = open_camera(device_index=1)

- Camera Not Found: Ensure your webcam is properly connected and not in use by another application
- Permission Issues: Some systems require explicit permission to access the camera
- OpenCV Installation: If you encounter issues with OpenCV, refer to theofficial installation guide

This project is licensed under the MIT License - see the LICENSE file for details.

Contributions are welcome! Please feel free to submit a Pull Request.

An MCP server for programmatic control of smartscreen.tv displays via HTTP and MCP commands, with YouTube integration.

A 3D Printing MCP server that allows for querying for live state, webcam snapshots, and 3D printer control.

All-in-one AI creative studio — generate videos, images, audio in 11 Indian languages, and 3D models via MCP. Hosted at mcp.arcframe.ai.

MCP server for Google Cast — discover devices, play media, control volume, launch apps, and manage queues over stdio

34-tool MCP server for CutPro's v1 API — analyze videos, clip, render, and publish posts via AI clients like Claude, ChatGPT, and Cursor.

A Python package for media processing using FFmpeg and FastMCP.

A server for creating fast and free lipsync videos for digital avatars, supporting both realistic and cartoon styles.

https://github.com/vamsi-kodimela/maagpi-youtube-mcp

Automate end-to-end youtube production pipeline for face less channels

Cast local files and media URLs to Chromecast and DLNA/UPnP devices on your LAN.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.