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
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选