MCP Web Cam Server

by kmizu

260 downloads
Not rated
GitHub

About

MCP Web Cam Server is a Model Context Protocol (MCP) server that enables LLMs to control webcams—capturing photos, recording videos, and managing camera settings—through the MCP protocol. It is designed for use with MCP‑compatible clients like Claude Desktop.

Details

Author
kmizu
Downloads
260
Categories
Other

- Capture photos with adjustable width, height, quality, and format
- Record video with configurable duration, fps, format, and codec
- List available cameras and display a live Web UI for selection
- Adjust camera settings like brightness, contrast, saturation, and focus
- Cross‑platform support for Linux, Windows, and macOS
- Resources provide access to captured photos and recordings

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 MCP Web Cam Server
    Command (node, npx, python, etc.)

    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

From the repository

Install the server as an MCP server using npx -y @kmizu/mcp-web-cam or by cloning the repo and building manually. For Claude Desktop, add the corresponding configuration to claude_desktop_config.json and restart the app. Other MCP clients can run the server via node /path/to/dist/index.js using stdio transport. Tools such as select_camera, capture_photo, start_recording, and list_cameras are invoked by the client.

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mcp web cam server": {
            "webcam": {
                "command": "npx",
                "args": [
                    "-y",
                    "@kmizu/mcp-web-cam"
                ]
            }
        }
    }
}

McpServers

{
    "webcam": {
        "command": "npx",
        "args": [
            "-y",
            "@kmizu/mcp-web-cam"
        ]
    }
}

MCP Web Cam Server

A Model Context Protocol (MCP) server for controlling webcams. This server enables LLMs to capture photos, record videos, and manage camera settings through the MCP protocol.

Installation as MCP Server

For Claude Desktop App

Option 1: Using npx (Recommended)

Add to your Claude Desktop configuration:

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "webcam": {
      "command": "npx",
      "args": [
        "-y",
        "@kmizu/mcp-web-cam"
      ]
    }
  }
}

Then restart Claude Desktop.

Option 2: Manual Installation

1. Install the dependencies and build:

git clone https://github.com/mizushima/mcp-web-cam.git
cd mcp-web-cam
npm install
npm run build

2. Add to your Claude Desktop configuration:

On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "webcam": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-web-cam/dist/index.js"]
    }
  }
}

3. Restart Claude Desktop

For Other MCP Clients

The server communicates via stdio, so you can run:

node /path/to/mcp-web-cam/dist/index.js

Features

- Photo Capture: Take high-quality photos with customizable settings
- Video Recording: Record videos with various formats and codecs
- Camera Management: List available cameras and adjust settings
- Image Processing: Basic image manipulation capabilities
- Cross-platform: Supports Linux, Windows, and macOS

Installation

Global Installation (for use outside MCP)

npm install -g @kmizu/mcp-web-cam

Local Development

npm install
npm run build

Usage

As an MCP Server

The server can be used with any MCP-compatible client:

npm start

Development

npm run dev    # Watch mode for development
npm run build  # Build TypeScript
npm run typecheck  # Type checking only

Available Tools

select_camera

Open a modern web UI to select from available cameras with live preview.

Features:
- Live preview of all connected cameras
- WebRTC-based preview when available
- Fallback to snapshot mode for compatibility
- Persistent camera selection

get_current_camera

Get the currently selected camera device.

capture_photo

Take a photo using the webcam.

Parameters:
- width (optional): Image width in pixels (320-3840)
- height (optional): Image height in pixels (240-2160)
- quality (optional): Image quality (1-100)
- format (optional): Image format ('jpeg', 'png', 'bmp')
- return_type (optional): How to return data ('location', 'buffer', 'base64')
- device (optional): Camera device ID

start_recording

Start recording video from the webcam.

Parameters:
- duration (optional): Recording duration in seconds (1-3600)
- fps (optional): Frames per second (1-60)
- format (optional): Video format ('mp4', 'avi', 'mkv')
- codec (optional): Video codec (e.g., 'libx264', 'libx265')

stop_recording

Stop the current video recording.

list_cameras

List all available camera devices.

get_camera_settings

Get current camera settings.

Parameters:
- device (optional): Camera device ID

set_camera_settings

Adjust camera settings like brightness, contrast, etc.

Parameters:
- device (optional): Camera device ID
- brightness (optional): Brightness level (0-100)
- contrast (optional): Contrast level (0-100)
- saturation (optional): Saturation level (0-100)
- hue (optional): Hue adjustment (-180 to 180)
- gamma (optional): Gamma correction (1-500)
- sharpness (optional): Sharpness level (0-100)
- whiteBalance (optional): White balance in Kelvin (2000-10000)
- exposure (optional): Exposure compensation (-10 to 10)
- gain (optional): Gain level (0-100)
- focus (optional): Focus level (0-100, 0=auto)

Resources

The server provides the following resources:

- webcam://cameras: List of available camera devices
- webcam://captures: List of captured photos
- webcam://recordings: List of video recordings

Dependencies

Required System Dependencies

Linux

```bash
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.