Video Still Capture MCP
Overview
Examples
Orange Example
[object Object] | [object Object] |
[object Object] | [object Object] |
Magnet Example
[object Object] | [object Object] |
[object Object] | [object Object] |
Installation
Prerequisites
- Python 3.10+
- [OpenCV](https://opencv.org/) (`opencv-python`)
- [MCP Python SDK](https://modelcontextprotocol.io/docs/)
- [UV](https://astral.sh/uv/) (optional)
Installation from source
Integrating with Claude for Desktop
macOS/Linux
Windows
Using the Installation Command
Features
- **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
Tools Reference
`quick_capture`
- **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**: Camera index (0 is usually the default webcam)
- **name**: Optional name to identify this camera connection
- **Returns**: Connection ID for the opened camera
`capture_frame`
- **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**: ID of the previously opened video connection
- **Returns**: Dictionary of video properties (width, height, fps, etc.)
`set_video_property`
- **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_connection`
- **connection_id**: ID of the connection to close
- **Returns**: True if successful
`list_active_connections`
- **Returns**: List of active connection IDs
Example Usage
- **Take a quick photo**: ``` I'll take a photo using your webcam. ``` (The AI would call `quick_capture()` behind the scenes)
- **Open a persistent connection**: ``` I'll open a connection to your webcam so we can take multiple photos. ``` (The AI would call `open_camera()` and store the connection ID)
- **Adjust camera settings**: ``` Let me increase the brightness of the webcam feed. ``` (The AI would call `set_video_property()` with the appropriate parameters)
Advanced Usage
Resource Management
Multiple Cameras
Troubleshooting
- **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 the [official installation guide](https://docs.opencv.org/master/d5/de5/tutorial_py_setup_in_windows.html)