OBS Studio MCP Server
<p align="center"><img src="assets/icon.png" width="96" alt="OBS Studio logo"></p>
# OBS Studio MCP Server
A [Model Context Protocol](https://modelcontextprotocol.io) server that lets Claude and
other MCP clients operate [OBS Studio](https://obsproject.com): record, save replay
clips, switch scenes, manage sources, audio and filters, take screenshots, and change
output settings.
It talks to the WebSocket server built into OBS Studio 28 and later (obs-websocket v5).
Nothing else needs to be installed in OBS.
> Independent community project. Not affiliated with or endorsed by the OBS Project.
> See [NOTICE.md](NOTICE.md).
## Why this one
- **Results are confirmed.** Starting and stopping an output waits for OBS's own state
event. `obs_stop_recording` returns the finished file's path only after the file has
stopped growing, so the next step can read it safely.
- **Bad recordings are stopped before they start.** A preflight check looks at free
disk space, whether the container format survives a crash, whether the scene shows
anything, and whether any audio input is unmuted.
- **Repeating a call is safe.** Start while already recording, or stop while stopped,
returns the current state instead of an error.
- **Errors say what to do.** OBS not running, WebSocket server switched off, wrong
password, a name that does not exist, OBS still starting: each has its own message
and next step.
- **It waits for OBS.** OBS accepts connections a few seconds before it can serve them;
requests are retried until it is ready. A dropped connection reconnects on the next
call, and a request that was in flight is reported as unknown, never as done.
- **Zero configuration on the same machine.** The port and password are read from OBS's
own settings file. The password is never logged or returned.
- **Going live is opt-in.** Streaming tools do not exist unless you enable them.
## Requirements
- OBS Studio 28 or later, with **Tools → WebSocket Server Settings → Enable WebSocket
server** ticked
- Node.js 20.3 or later
## Install
### Claude Code (plugin)
```
/plugin marketplace add FalcotrixHQ/obs-studio-mcp
/plugin install obs-studio@obs-studio-mcp
```
### Claude Code (without the plugin)
```bash
git clone https://github.com/FalcotrixHQ/obs-studio-mcp.git
claude mcp add obs-studio -- node /absolute/path/to/obs-studio-mcp/dist/index.js
```
### Claude Desktop and other MCP clients
Clone the repository, then add this to the client's MCP configuration
(`claude_desktop_config.json` for Claude Desktop):
```json
{
"mcpServers": {
"obs-studio": {
"command": "node",
"args": ["/absolute/path/to/obs-studio-mcp/dist/index.js"]
}
}
}
```
`dist/index.js` is a single self-contained file committed to the repository, so no
`npm install` is needed to run the server.
## Configuration
All settings are optional when OBS runs on the same machine with default settings.
| Variable | Default | Purpose |
|---|---|---|
| `OBS_WEBSOCKET_URL` | `ws://127.0.0.1:4455` | Full WebSocket URL. Overrides host and port |
| `OBS_WEBSOCKET_HOST` | `127.0.0.1` | Host running OBS |
| `OBS_WEBSOCKET_PORT` | from OBS, else `4455` | WebSocket server port |
| `OBS_WEBSOCKET_PASSWORD` | from OBS | WebSocket server password |
| `OBS_MCP_READ_OBS_CONFIG` | `true` | Read port and password from OBS's own settings file |
| `OBS_MCP_ENABLE_STREAMING` | `false` | Add the tools that start and stop a live stream |
| `OBS_MCP_REQUEST_TIMEOUT_MS` | `10000` | Timeout for each request to OBS |
| `OBS_MCP_CONNECT_TIMEOUT_MS` | `5000` | Timeout for connecting to OBS |
| `OBS_MCP_READY_WAIT_MS` | `20000` | How long to keep retrying while OBS reports it is not ready |
| `OBS_STUDIO_PATH` | auto-detected | Path to the OBS executable, for `obs_launch` |
To control OBS on another machine, set `OBS_WEBSOCKET_HOST` (or `OBS_WEBSOCKET_URL`) and
`OBS_WEBSOCKET_PASSWORD`. File checks such as "has the recording finished writing" only
work when the recording folder is visible from the machine running the server.
## Tools
60 tools, or 62 with streaming enabled. All are prefixed `obs_`.
| Area | Tools |
|---|---|
| Status and startup | `obs_get_status`, `obs_launch`, `obs_get_stats`, `obs_preflight_check` |
| Recording | `obs_start_recording`, `obs_stop_recording`, `obs_pause_recording`, `obs_resume_recording`, `obs_get_record_status`, `obs_split_record_file`, `obs_create_record_chapter`, `obs_get_record_directory`, `obs_set_record_directory` |
| Replay buffer | `obs_start_replay_buffer`, `obs_stop_replay_buffer`, `obs_save_replay`, `obs_get_replay_buffer_status` |
| Scenes | `obs_list_scenes`, `obs_set_current_scene`, `obs_create_scene`, `obs_rename_scene`, `obs_remove_scene` |
| Sources in a scene | `obs_list_scene_items`, `obs_set_scene_item_enabled`, `obs_set_scene_item_transform`, `obs_remove_scene_item` |
| Inputs | `obs_list_inputs`, `obs_list_input_kinds`, `obs_create_input`, `obs_remove_input`, `obs_get_input_settings`, `obs_set_input_settings` |
| Audio | `obs_list_audio_inputs`, `obs_set_input_mute`, `obs_set_input_volume` |
| Filters | `obs_list_source_filters`, `obs_create_source_filter`, `obs_remove_source_filter`, `obs_set_source_filter_enabled`, `obs_set_source_filter_settings` |
| Transitions and studio mode | `obs_list_transitions`, `obs_set_current_transition`, `obs_set_studio_mode`, `obs_trigger_studio_transition` |
| Media sources | `obs_get_media_status`, `obs_control_media` |
| Screenshots | `obs_take_screenshot` |
| Profiles and settings | `obs_list_profiles`, `obs_set_current_profile`, `obs_list_scene_collections`, `obs_set_current_scene_collection`, `obs_get_video_settings`, `obs_set_video_settings`, `obs_get_profile_parameter`, `obs_set_profile_parameter` |
| Virtual camera | `obs_set_virtual_camera` |
| Hotkeys | `obs_list_hotkeys`, `obs_trigger_hotkey` |
| Streaming | `obs_get_stream_status`; with `OBS_MCP_ENABLE_STREAMING=true` also `obs_start_stream`, `obs_stop_stream` |
| Anything else | `obs_call_request` sends any obs-websocket v5 request by name |
### Things to ask for
- "Is OBS ready to record? Check everything." → `obs_get_status`, `obs_preflight_check`, `obs_take_screenshot`
- "Record until I say stop, then tell me where the file is." → `obs_start_recording`, `obs_stop_recording`
- "Clip the last thirty seconds." → `obs_save_replay` (with the replay buffer running)
- "Mute my mic and switch to the Starting Soon scene." → `obs_set_input_mute`, `obs_set_current_scene`
- "Put the webcam in the bottom-right corner at a quarter size." → `obs_set_scene_item_transform`
- "Make recordings crash-safe." → `obs_set_profile_parameter` (`RecFormat2` = `mkv` or `hybrid_mp4`)
## Safety
- **Streaming is off by default.** Without `OBS_MCP_ENABLE_STREAMING=true` there is no
tool that goes live, and `obs_call_request` and `obs_trigger_hotkey` refuse stream
requests and stream-key settings. With it on, `obs_start_stream` still requires an
explicit `confirm_go_live: true`.
- **Deleting is marked destructive.** `obs_remove_scene`, `obs_remove_input`,
`obs_remove_scene_item` and `obs_remove_source_filter` carry the destructive hint so
clients can ask for confirmation. The current program scene cannot be deleted.
- **Settings that would break a recording are refused mid-recording.** Profile, scene
collection, video settings and profile parameters only change while OBS is idle.
- **Screenshots do not overwrite files** unless `overwrite` is set.
- **The WebSocket password stays local.** It is read at connection time, kept in memory,
and removed from any text before it leaves the server.
The OBS WebSocket server gives full control of OBS to anything that can reach it and
knows the password. Keep authentication on, and do not expose the port to a network you
do not trust.
## Troubleshooting
| Message | Fix |
|---|---|
| `obs_not_running` | Ask for `obs_launch`, or open OBS Studio |
| `websocket_disabled` | In OBS: Tools → WebSocket Server Settings → Enable WebSocket server → Apply |
| `auth_failed` | Set `OBS_WEBSOCKET_PASSWORD` to the password under Show Connect Info in the same dialog |
| `status 207` not ready | OBS is still starting or switching profile. The server retries for 20 seconds by default |
| `status 600` not found | A scene, input or filter name is wrong. Names are case-sensitive; list them first |
| Replay buffer `status 604` | Enable it in OBS: Settings → Output → Replay Buffer |
| Preflight fails on `scene` | The current scene has no visible source. Add a capture source or switch scene |
## Development
```bash
npm install
npm run check # type-check, bundle, 32 tests, self-check against a fake OBS
npm run smoke -- --live # read-only self-check against your real OBS
npm run smoke -- --live --record # also launches OBS and makes a 5-second recording
npm run fake-obs # a fake OBS on ws://127.0.0.1:4466, for trying the server without OBS
```
Tests run the built server over stdio against `test/fake-obs.ts`, an in-memory
implementation of the obs-websocket v5 handshake, requests and events. One test checks
every request and event name in the source against the protocol's own type definitions.
`evaluation.xml` holds ten read-only questions with fixed answers for evaluating how
well a model uses the tools.
Source is TypeScript on the MCP TypeScript SDK v2. `npm run build` bundles it into
`dist/index.js`, which is committed so the plugin runs straight from a clone.
## Licence
MIT, see [LICENSE](LICENSE). The OBS logo is not covered by that licence; see
[NOTICE.md](NOTICE.md).
TDQS
Scored across 60 tools
Despite the large surface, most tools target distinct resource+action pairs (recording, replay buffer, scenes, scene items, inputs, filters, profiles, collections, transitions), and descriptions explicitly cross-reference the right alternative (e.g. remove_input vs remove_scene_item vs set_scene_item_enabled). A few clusters are close enough to misselect: obs_get_status / obs_get_stats / obs_get_record_status / obs_get_stream_status, obs_preflight_check vs the internal preflight in obs_start_recording, and 'source' vs 'input' terminology used for the same objects.
Nearly everything follows obs_verb_noun (obs_list_scenes, obs_create_input, obs_set_scene_item_enabled) with a uniform obs_ prefix. Minor deviations: the generic obs_call_request, bare obs_launch, and mixed vocabulary between 'source' (obs_*_source_filter) and 'input' (obs_*_input) for the same underlying objects.
60 tools is far past the point where an agent can hold the surface in mind, and several are near-duplicates in intent (status/stats/preflight/record-status). The presence of obs_call_request as a catch-all escape hatch shows that many narrow wrappers could have been folded into fewer, parameterised tools.
Coverage is broad for the domain: scene/source lifecycle, scene item transforms and visibility, filters, audio, recording with pause/split/chapters, replay buffer, profiles, collections, video settings, transitions and studio mode. Notable gaps are stream start/stop control (only obs_get_stream_status exists; the rest is blocked or punted to obs_call_request) and source duplication / scene item z-order, which require the raw request tool.