OBS MCP Server
Provides tools, resources, and prompts for monitoring and controlling OBS Studio via the OBS WebSocket protocol, including scene and audio management, recording and streaming control, screenshot inspection, atomic batch macros, real-time event capture, and safety guardrails.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OBS MCP Servermute my mic and start recording"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OBS MCP Server
An MCP server for OBS Studio that provides tools, resources, structured prompts, multimodal vision inspection, atomic batch macros, event capturing, and safety guardrails to monitor and control OBS via the OBS WebSocket protocol. Available in both TypeScript and Python.
Features
Connect to OBS WebSocket server with auto-reconnection and SHA-256 authentication
Atomic Batch Macros (
RequestBatchOpCode 8/9): Execute multi-step broadcast macros atomically in a single network round-trip withhaltOnFailureand execution type options (SerialRealtime,SerialFrame,Parallel)Real-Time Event Ring Buffer: Capture incoming OBS WebSocket events (OpCode 5) in a 100-event circular buffer; exposed via
obs-get-recent-eventsandobs://events/recentNative Multimodal ImageContent: Vision model screenshot inspection returning native
{ type: "image", data: base64, mimeType: "image/png" }blocksSafety Guardrails: Production protection with
OBS_READ_ONLY=trueandOBS_PROTECT_DESTRUCTIVE=trueRead-Only MCP Resources: Instant consolidated state snapshots (
obs://state/summary,obs://scenes/current,obs://audio/mixer,obs://events/recent) to eliminate multi-call round tripsStructured MCP Prompts: Pre-flight checklists and workflow templates (
go-live-checklist,recording-setup,emergency-brb,audio-check)Dynamic Tool Filtering: Load only the modules you need to save LLM context window tokens
Consolidated Compound Tools: Optional compound tool mode (
--compound) reducing 156 tools to 12 unified tools with action enumsFull Engine Parity: Both TypeScript (
build/index.js) and Python FastMCP (py_src/) support batch requests, circular event buffering, compound tools, and safety guardrailsComprehensive coverage of the OBS WebSocket v5 Protocol (100% official protocol requests implemented)
Related MCP server: OBS MCP
Atomic Request Batching (OpCode 8 RequestBatch)
Execute multi-step broadcast macros atomically in a single network call using obs-execute-batch or obs_manage_general (action: execute_batch):
{
"name": "obs-execute-batch",
"arguments": {
"executionType": "SerialRealtime",
"haltOnFailure": true,
"requests": [
{
"requestType": "SetCurrentProgramScene",
"requestData": { "sceneName": "Intro" }
},
{
"requestType": "SetInputMute",
"requestData": { "inputName": "Mic/Aux", "inputMuted": false }
},
{
"requestType": "Sleep",
"requestData": { "sleepMillis": 500 }
},
{
"requestType": "StartRecord"
}
]
}
}Execution Types:
SerialRealtime(0): Executes sequentially in real time (respectsSleeppauses).SerialFrame(1): Executes sequentially, advancing one request per frame tick.Parallel(2): Executes requests simultaneously.
Safety Integration: Every subrequest in the batch is pre-validated against active safety policies (
OBS_READ_ONLYandOBS_PROTECT_DESTRUCTIVE) before transmission.
Real-Time Event Subscription & Ring Buffer
OBSWebSocketClient automatically subscribes to all OBS WebSocket events (eventSubscriptions: All). Incoming events (OpCode 5) are stored in an in-memory 100-event circular ring buffer with millisecond-precision timestamps:
Tool:
obs-get-recent-events(withlimitandeventTypefilter)MCP Resource:
obs://events/recent(returns the full real-time snapshot)
Enables LLMs and agents to inspect recent asynchronous OBS activity without polling:
User manually switched scenes or muted audio in OBS GUI
Stream dropped frames or network reconnection alerts
Media source playback completed or loop restarted
Recording file split or output state changed
Native Multimodal Screenshot Inspection
Both obs-get-source-screenshot and obs_manage_sources (action: get_screenshot) return native MCP ImageContent objects alongside a concise text summary block. Vision models (Claude 3.5 Sonnet, Claude 3.7 Sonnet, Gemini 2.0/3.0, GPT-4o) can visually analyze scene layout, camera framing, lower-third overlays, and black screen detection directly.
Data URI Stripping: Automatically extracts pure Base64 and proper MIME types (
image/png,image/jpeg).Context-Friendly Default Resolution: Defaults to
imageWidth: 960(and defaultimageCompressionQuality: 80) to balance visual clarity with context window token limits.Auto Active Scene Target: If no
sourceNameorsourceUuidis provided, it automatically captures the active Program scene.
// Example: Simply call without parameters to inspect current program scene
{
"name": "obs-get-source-screenshot",
"arguments": {}
}Safety Guardrails (Production Protection)
To prevent accidental deletions or unintended live broadcasts, two layers of safety middleware can be enabled:
1. Read-Only Mode (OBS_READ_ONLY=true or --read-only)
Blocks all state-modifying requests (e.g., scene switches, volume changes, creating/removing items, recording, streaming). Only inspection and status requests (Get*) are permitted:
{
"mcpServers": {
"obs": {
"command": "npx",
"args": ["-y", "obs-mcp@latest", "--read-only"],
"env": {
"OBS_WEBSOCKET_PASSWORD": "<password_from_obs>"
}
}
}
}2. Destructive & Live-Broadcast Guardrail (OBS_PROTECT_DESTRUCTIVE=true or --protect-destructive)
Protects critical operations:
StartStreamStopStreamRemoveSceneRemoveInputRemoveProfileSetCurrentSceneCollection
When enabled, these actions will be blocked unless:
The caller explicitly supplies
"confirm": truein the tool arguments, OROBS_ALLOW_LIVE_STREAM=trueis set in the environment (applies to streaming actions).
Example:
{
"mcpServers": {
"obs": {
"command": "npx",
"args": ["-y", "obs-mcp@latest", "--protect-destructive"],
"env": {
"OBS_WEBSOCKET_PASSWORD": "<password_from_obs>"
}
}
}
}MCP Resources (Consolidated Snapshots)
Read-only resources provide immediate, comprehensive context to the AI assistant without requiring multiple tool calls:
Resource URI | Description | Contents |
| Live broadcast & system status | Connection, OBS version, active program & preview scenes, streaming/recording status (timecode, bytes, duration), virtual cam, replay buffer, and CPU/FPS stats |
| Active scenes & visual hierarchy | Program scene, preview scene, available scenes, and complete scene item list with transform matrices, visibility, lock states, and blend modes |
| Complete audio calibration | All inputs, volume levels (dB and multiplier), mute states, sync offsets, audio monitor types, and audio track routing (tracks 1-6) |
| Real-time event activity buffer | Last 100 OBS events captured in real-time with eventType, eventData, and ISO 8601 timestamps |
MCP Prompts (Workflow Templates)
Structured prompts guide the AI assistant through standardized operational procedures:
Prompt | Description | Key Workflow |
| Pre-stream sanity verification | Audits connection, stage readiness, audio levels, and stream output settings, and asks for final confirmation before starting broadcast |
| Local video recording setup | Validates record folder, canvas/output video resolutions, FPS, and multi-track audio isolation (e.g. separating mic vs desktop audio) |
| Privacy lockdown & failsafe | Instantly mutes all microphone/auxiliary inputs, switches to a safe BRB scene, and pauses recording / adds chapter marker |
| Comprehensive audio audit | Analyzes volume levels against broadcast standards (-12dB to -6dB voice, -24dB to -18dB background), audits mute states and lip-sync delays |
Solving "Context Bloat"
Registering 156 separate tools can consume a large amount of an LLM's context window. You can optimize this using either Dynamic Module Filtering or Compound Tools Mode:
Option 1: Dynamic Module Filtering (Selective Loading)
Load only the specific categories you need using the --categories CLI argument or the OBS_MCP_MODULES environment variable:
{
"mcpServers": {
"obs": {
"command": "npx",
"args": ["-y", "obs-mcp@latest", "--categories=scenes,inputs,record"],
"env": {
"OBS_WEBSOCKET_PASSWORD": "<password_from_obs>"
}
}
}
}Option 2: Compound Tools Mode (Maximum Context Efficiency)
In compound mode, operations are grouped into 12 consolidated tools (e.g., obs_manage_recording, obs_manage_scenes, obs_manage_inputs, obs_manage_general) with action enums:
{
"mcpServers": {
"obs": {
"command": "npx",
"args": ["-y", "obs-mcp@latest", "--compound"],
"env": {
"OBS_WEBSOCKET_PASSWORD": "<password_from_obs>"
}
}
}
}Python Engine (py_src/)
A native Python server is included in py_src/ with complete feature parity:
Run with compound mode:
python py_src/obs-mcp.py --compoundRun with safety guardrails:
python py_src/obs-mcp.py --protect-destructiveSupports batch requests (
send_request_batch), event circular ring buffer, and FastMCP resources (obs://events/recent).
Usage
Make sure OBS Studio is running with WebSocket server enabled (Tools > WebSocket Server Settings).
Set your WebSocket password in your MCP client config or environment.
Configure your MCP client (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"obs": {
"command": "npx",
"args": ["-y", "obs-mcp@latest"],
"env": {
"OBS_WEBSOCKET_PASSWORD": "<password_from_obs>"
}
}
}
}Environment Variables & CLI Flags
Setting | Flag / Variable | Description |
WebSocket URL |
| WebSocket URL (default: |
Password |
| Password for OBS WebSocket authentication |
Read-Only |
| Prohibits all state modifications |
Protect Destructive |
| Blocks destructive/stream actions unless |
Allow Live Stream |
| Permits stream start/stop without confirmation |
Module Filter |
| Comma-separated list of categories to load |
Compound Mode |
| Enables consolidated compound tools |
Help |
| Prints command line usage and options |
License & Attribution
This project is licensed under the GNU General Public License v2.0 (GPL-2.0). See the LICENSE file for the complete license terms and notices.
Upstream Attribution & Acknowledgments
This project is an enhanced and architecturally expanded fork of obs-mcp, originally created by Roy Shilkrot. We gratefully acknowledge Roy Shilkrot and contributors for creating the initial Model Context Protocol bridge for OBS Studio.
Copyright Notices
Original Work: Copyright (c) Roy Shilkrot (https://github.com/royshil/obs-mcp), licensed under GPL-2.0.
Modifications and Expansions (2026): Copyright (c) Itznan (https://github.com/itznan/obs-mcp), licensed under GPL-2.0.
Key Enhancements Added in this Version
100% OBS WebSocket v5 Protocol Parity: Closed the protocol gap, expanding granular tools from 127 to 156 requests (including scene item blend modes, group hierarchies, transform matrices, and locking controls).
Dynamic Tool Filtering: Solves LLM context bloat via selective loading (
--categories/OBS_MCP_MODULES).Compound Tools Mode: 12 consolidated tools (
--compound) using action enums to optimize token usage.Native Multimodal ImageContent: Returns native MCP image content blocks for live vision model scene inspection.
Production Safety Guardrails: Prohibits accidental deletions or unintended live streams via
OBS_READ_ONLYandOBS_PROTECT_DESTRUCTIVE.Consolidated MCP Resources & Workflow Prompts: Read-only snapshots (
obs://state/summary,obs://scenes/current,obs://audio/mixer,obs://events/recent) and standardized operational prompts.Atomic Batch Macros: Full support for OBS WebSocket v5 native
RequestBatch(OpCode 8/9) withhaltOnFailureand execution strategies (SerialRealtime,SerialFrame,Parallel).Real-Time Event Ring Buffer: Circular 100-event buffer capturing live OBS events with timestamps.
Complete Python Engine Parity: Both TypeScript (
build/index.js) and Python FastMCP (py_src/) engines share complete feature parity.
This server cannot be deployed
Maintenance
Related MCP Connectors
Multistream relay control: check live status, switch destinations, manage teams, generate overlays.
Control evmux live streaming studios: scenes, layers, participants, media, banners and broadcast.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Manage 24/7 live streams, media, playback queues, schedules, and multistreaming from AI assistants.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI assistants to control and automate OBS Studio via natural language, covering scenes, sources, audio, recording, streaming, transitions, filters, media playback, diagnostics, and multi-step workflows over the OBS WebSocket protocol.89MIT
- AlicenseBqualityBmaintenanceEnables MCP clients to control OBS Studio through an inspectable WebSocket interface. Provides 155 tools for managing scenes, sources, audio, transitions, filters, recording, and streaming through natural language.15591 npm3GPL 2.0
- AlicenseNot gradedqualityAmaintenanceEnables typed, native control of OBS Studio—scene/source discovery and recording start/stop/pause/resume with status readbacks—through a secure loopback WebSocket interface.GPL 2.0
- AlicenseNot gradedqualityCmaintenanceEnables an LLM agent to control a local OBS Studio instance via obs-websocket, launching it, arranging scenes and sources, and starting or stopping recordings so it can capture its own screen as raw footage without manual intervention.1MIT