OBSBOT Camera MCP Server

OBSBOT Camera MCP Server

Enables PTZ camera control with gimbal positioning, snapshots, and AI visual analysis for OBSBOT and UVC cameras. Supports autonomous scanning patterns and integrates with vision-language models for real-time camera analysis.

Category
Visit Server

README

OBSBOT Camera MCP Server

MCP (Model Context Protocol) server for PTZ camera control with gimbal positioning, snapshots, and AI visual analysis integration.

Designed for OBSBOT Tiny SE but works with any UVC PTZ camera that supports v4l2 controls.

Features

  • Full Gimbal Control: Pan, tilt, zoom with safety limits
  • Real-time Position Feedback: Human-readable directions
  • Camera Snapshots: High-resolution capture
  • Visual Analysis: LM Studio integration for vision-language models
  • Area Scanning: Horizontal, vertical, grid, and panoramic patterns
  • Autonomous Search: Shell scripts for systematic exploration
  • Python Library: Direct control for custom applications

Requirements

System

  • Linux with v4l2 support
  • Node.js 18+ (for MCP server)
  • Python 3.8+ (for Python library)

Packages

# Ubuntu/Debian
sudo apt install v4l-utils ffmpeg python3-opencv

# Fedora
sudo dnf install v4l-utils ffmpeg python3-opencv

Optional

  • LM Studio for visual analysis
  • Vision-language model (e.g., Qwen2.5-VL, LLaVA)

Installation

MCP Server

cd obsbot-camera-mcp
npm install

Python Library

pip install opencv-python

Configuration

Environment Variables

export OBSBOT_DEVICE="/dev/video0"           # Camera device
export OBSBOT_OUTPUT_DIR="/tmp/obsbot"       # Capture directory
export LM_STUDIO_URL="http://localhost:1234/v1/chat/completions"
export OBSBOT_VL_MODEL="qwen2.5-vl-7b-instruct"

Claude Desktop Configuration

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "obsbot": {
      "command": "node",
      "args": ["/path/to/obsbot-camera-mcp/src/obsbot-mcp-server.mjs"],
      "env": {
        "OBSBOT_DEVICE": "/dev/video0"
      }
    }
  }
}

Usage

MCP Server Tools

get_gimbal_position

Get current pan, tilt, zoom with readable directions.

control_gimbal

Move gimbal to absolute position.

  • Pan: -468000 (right) to 468000 (left)
  • Tilt: -324000 (down) to 324000 (up)
  • Zoom: 0 (wide) to 12 (telephoto)

center_camera

Return to neutral position (0, 0, 0).

take_snapshot

Capture image with optional LM Studio analysis.

{
  "analyzeWithLM": true,
  "customPrompt": "Describe what you see"
}

look_and_analyze

Move camera and take analyzed snapshot in one operation.

scan_area

Systematic multi-position scan.

{
  "pattern": "horizontal",  // or vertical, grid, panoramic
  "steps": 5
}

check_system_status

Verify camera and LM Studio availability.

Python Library

from python.obsbot_control import OBSBOTController

camera = OBSBOTController()
camera.connect()

# Move to position
camera.set_position(pan=200000, tilt=100000, zoom=2)

# Use presets
camera.preset_position("left")
camera.preset_position("center")

# Capture
camera.save_frame("snapshot.jpg")

# Scan
results = camera.scan_horizontal(steps=5, capture=True)

camera.disconnect()

Shell Script

# Basic search
./scripts/autonomous_scan.sh "find the window"

# Grid pattern with verbose output
./scripts/autonomous_scan.sh --pattern grid --verbose "locate books"

# Quick scan
./scripts/autonomous_scan.sh --pattern quick "identify objects"

Camera Compatibility

Tested with:

  • OBSBOT Tiny SE
  • OBSBOT Meet

Should work with any UVC PTZ camera supporting:

  • pan_absolute control
  • tilt_absolute control
  • zoom_absolute control

Check your camera's controls:

v4l2-ctl -d /dev/video0 --list-ctrls

Gimbal Directions

The v4l2 control values map to directions:

  • Pan: Positive = LEFT, Negative = RIGHT
  • Tilt: Positive = UP, Negative = DOWN
  • Zoom: Higher = telephoto (zoomed in)

Troubleshooting

Camera not found

v4l2-ctl --list-devices
ls -la /dev/video*

Permission denied

sudo usermod -a -G video $USER
# Logout and login again

Controls not working

# Check available controls
v4l2-ctl -d /dev/video0 --list-ctrls

# Test manual control
v4l2-ctl -d /dev/video0 --set-ctrl=pan_absolute=100000

License

MIT License - See LICENSE file

Related Projects

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured