
videocapture-mcp
by 13rac1·★ 17·综合分 37
一个通过 OpenCV 访问和控制摄像头拍摄图像和调整设置的 Python MCP 服务器。
概述
Video Still Capture MCP 是一个 Python 实现的 MCP 服务器,它通过 OpenCV 提供 AI 助手访问和控制摄像头及视频源的能力。它暴露了捕获图像、管理摄像头连接以及调整亮度和分辨率等视频属性的工具。该服务器支持快速一次性捕获和持久的摄像头连接,以进行多次操作。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要 AI 代理从摄像头捕获静态图像进行视觉分析或文档处理时,选择此服务器。
什么时候不要选它
如果您需要实时视频流功能或超出基本捕获功能的先进图像处理,请避免使用此服务器。
此 server 暴露的工具
从 README 抽取出 7 个工具quick_capturequick_capture(device_index: int = 0, flip: bool = False) -> ImageCapture a single frame from a webcam without managing connections
open_cameraopen_camera(device_index: int = 0, name: Optional[str] = None) -> strOpen a connection to a camera device and return a connection ID
capture_framecapture_frame(connection_id: str, flip: bool = False) -> ImageCapture a single frame from an opened video connection
get_video_propertiesget_video_properties(connection_id: str) -> dictGet properties of the video source (width, height, fps, etc.)
set_video_propertyset_video_property(connection_id: str, property_name: str, value: float) -> boolSet a property of the video source like brightness or resolution
close_connectionclose_connection(connection_id: str) -> boolClose a video connection and release resources
list_active_connectionslist_active_connections() -> listList all active video connections
可对比工具
安装
安装步骤
先决条件:
- Python 3.10+
- OpenCV (
opencv-python) - [MCP Python SDK](https://modelcontextprotocol.io/docs/)
- [UV](https://astral.sh/uv/) (可选)
git clone https://github.com/13rac1/videocapture-mcp.git
cd videocapture-mcp
pip install -e .运行 MCP 服务器:
mcp dev videocapture_mcp.pyClaude Desktop 配置示例:
{
"mcpServers": {
"VideoCapture": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"numpy",
"--with",
"opencv-python",
"mcp",
"run",
"/绝对路径/videocapture_mcp.py"
]
}
}
}FAQ
- 这个服务器能访问多个摄像头吗?
- 是的,您可以在打开连接时指定不同的设备索引,例如使用 open_camera(device_index=1) 访问第二个摄像头。
- 这个服务器支持视频流吗?
- 不支持,这个服务器只提供从视频源捕获静止图像的工具,不支持连续视频流。
videocapture-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。