---
title: "obs-studio-rust MCP server reference (generated)"
source: https://obs-rust.com/mcp/
commit: 524486a44c81ef30b039f10ab955bc778f39e225
tier: core
tokens_est: 4811
---
# obs-studio-rust MCP server reference (generated)

MCP server `obs-mcp` 0.1.0, protocol 2025-06-18. Platform: Linux only for now. Local only: stdio (`./mcp --mcp`) or a unix socket (`--mcp-listen` / `--mcp-attach`). Built from source with `./mcp --build` in an obs-studio checkout. Machine-readable: https://obs-rust.com/mcp/schema.json.

Client config (Claude Code, Cursor, Claude Desktop):
```json
{"mcpServers": {"obs": {"command": "/path/to/obs-studio/mcp", "args": ["--mcp"]}}}
```

## See tools
Read the state of OBS without changing anything.

### scenes_list
List the names of all scenes, in order.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `scenes` array<string> (required): Scene names in display order.

### scene_get_current
Get the name of the current program scene, or null if none.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `name` string | null: Null when there is no program scene.

### sources_list
List all sources with their names and kind ids.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `sources` array<object> (required): Sources in stable order.

### scene_items_list
List the items of a scene (bottom to top) with their id, source name, visibility, position, scale and rotation.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Arguments:
- `scene` string (required): Scene name.
Returns:
- `items` array<object> (required): Items bottom to top.
- `scene` string (required): Scene name.

### screenshot
Capture a PNG screenshot of a source, or of the program output when no source is named. Returns the image plus a text item {width, height, source} (source is null for the program output). The PNG has an alpha channel (RGBA): pixels nothing was drawn on, such as an empty scene, are fully transparent, which a viewer may show as white. A source only appears in the program output once it is an item of the program scene.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Arguments:
- `height` integer | null: Height in pixels.
- `source` string | null: Source to capture; omit for program output.
- `width` integer | null: Width in pixels.
Returns:
- `data` string (required): PNG bytes encoded in base64.
- `height` integer (required): Height in pixels.
- `source` string | null: Source name, or null for program output.
- `width` integer (required): Width in pixels.

### pipeline_dump
pipeline dump: control and inspect OBS directly.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `program` string | null: Program source name.
- `sources` array<string> (required): Source names in stable order.
- `stats` object (required): Current pipeline measurements.
- `vcam` object (required): Virtual output state.

## Compose tools
Build and change scenes, sources and their layout.

### scene_create
Create a new empty scene with the given name. When there is no program scene yet, the new scene becomes the current program scene.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `name` string (required): Scene name.
Returns:
- `name` string | null: Null when there is no program scene.

### scene_remove
Remove the scene with the given name.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `name` string (required): Scene name.
Returns:
- `name` string | null: Null when there is no program scene.

### scene_set_current
Make the named scene the current program scene.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `name` string (required): Scene name.
Returns:
- `name` string | null: Null when there is no program scene.

### source_create
Create a source of the given kind with a name and settings. Give `scene` (and optionally `position`) to also add it to that scene as an item.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `kind` string (required): Source kind id.
- `name` string (required): Unique name.
- `position` object | null: Initial position (requires scene).
- `scene` string | null: Scene receiving the source.
- `settings` object (required): Kind-specific settings.
Returns:
- `item` integer | null: Created item id.
- `kind` string (required): Source kind.
- `name` string (required): Source name.
- `scene` string | null: Scene receiving the new item.

### source_remove
Remove a source and its references from scenes.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `name` string (required): 
Returns:
- `name` string (required): Source name.

### source_set_settings
Merge settings into an existing source's settings.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `name` string (required): Source name.
- `settings` object (required): Kind-specific settings to merge.
Returns:
- `name` string (required): Source name.

### scene_item_add
Add an existing source to a scene as a scene item, optionally at a position. A source only shows in the program output once it is an item of the program scene.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `position` object | null: Initial position.
- `scene` string (required): Scene name.
- `source` string (required): Source name.
Returns:
- `item` integer (required): Item id.
- `position` object (required): Canvas position.
- `rotation` number (required): Rotation in degrees.
- `scale` object (required): Scale factors.
- `scene` string | null: Present when an item was added.
- `source` string (required): Source name.
- `visible` boolean (required): Visibility.

### scene_item_set_transform
Set the position, scale and/or rotation of a scene item, named by `item` (id from scene_items_list) or `source`.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `item` integer | null: Item id.
- `position` object | null: New position.
- `rotation` number | null: New rotation in degrees.
- `scale` object | null: New scale.
- `scene` string (required): Scene name.
- `source` string | null: Source name instead of item id.
Returns:
- `item` integer | null: Item id when selected by id.
- `scene` string (required): Scene name.
- `source` string | null: Source name when selected by name.
- `visible` boolean | null: Present for visibility changes.

### scene_item_set_visible
Show or hide a scene item, named by `item` (id from scene_items_list) or `source`.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `item` integer | null: Item id.
- `scene` string (required): Scene name.
- `source` string | null: Source name instead of item id.
- `visible` boolean (required): New visibility.
Returns:
- `item` integer | null: Item id when selected by id.
- `scene` string (required): Scene name.
- `source` string | null: Source name when selected by name.
- `visible` boolean | null: Present for visibility changes.

## Go live tools
Recording, streaming, the virtual camera and the virtual mic.

### record_start
Start recording.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `timeout_ms` integer default 5000: Bounded wait deadline.
- `wait` boolean default false: Wait for the output to report active.
Returns:
- `active` boolean (required): Whether the output is running.

### record_stop
Stop recording.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Returns:
- `active` boolean (required): Whether the output is running.

### record_status
Report whether recording is active, with duration_ms and bytes where known.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `active` boolean (required): Whether the output is running.
- `bytes` integer | null: Bytes written or sent so far, where known.
- `duration_ms` integer | null: Milliseconds since the output started, where known.

### stream_start
Start streaming.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `timeout_ms` integer default 5000: Bounded wait deadline.
- `wait` boolean default false: Wait for the output to report active.
Returns:
- `active` boolean (required): Whether the output is running.

### stream_stop
Stop streaming.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Returns:
- `active` boolean (required): Whether the output is running.

### stream_status
Report whether streaming is active, with duration_ms and bytes where known.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `active` boolean (required): Whether the output is running.
- `bytes` integer | null: Bytes written or sent so far, where known.
- `duration_ms` integer | null: Milliseconds since the output started, where known.

### vcam_start
vcam start: control and inspect OBS directly.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `audio_enabled` boolean default true: Enable the paired microphone before a stopped output starts.
- `audio_track` integer default 1: One-based OBS audio mix (1 through 6).
- `timeout_ms` integer default 5000: Auto-wait deadline in milliseconds.
- `wait` boolean default false: Wait until the output reports active.
Returns:
- `active` boolean (required): Video output is active.
- `configured` boolean (required): Whether the registered output exists.
- `vmic_active` boolean | null: Paired virtual microphone is active, when the plugin supports the query.

### vcam_stop
vcam stop: control and inspect OBS directly.
Annotations: {"destructiveHint": true, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": false}
Returns:
- `active` boolean (required): Video output is active.
- `configured` boolean (required): Whether the registered output exists.
- `vmic_active` boolean | null: Paired virtual microphone is active, when the plugin supports the query.

### vcam_status
vcam status: control and inspect OBS directly.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `active` boolean (required): Video output is active.
- `configured` boolean (required): Whether the registered output exists.
- `vmic_active` boolean | null: Paired virtual microphone is active, when the plugin supports the query.

### vmic_status
vmic status: control and inspect OBS directly.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `active` boolean | null: Active according to virtualcam_audio; null means unsupported.
- `source_name` string | null: Runtime source name, when known.

## Media tools
Media sources.

### media_status
media status: control and inspect OBS directly.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Arguments:
- `name` string (required): Name of an existing media source.
Returns:
- `duration_ms` integer | null: Total duration, if known.
- `name` string (required): Source name.
- `position_ms` integer | null: Playback position, if known.
- `state` "none" | "playing" | "opening" | "buffering" | "paused" | "stopped" | "ended" | "error" (required): Current media state.

### media_restart
media restart: control and inspect OBS directly.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Arguments:
- `name` string (required): Name of an existing media source.
Returns:
- `duration_ms` integer | null: Total duration, if known.
- `name` string (required): Source name.
- `position_ms` integer | null: Playback position, if known.
- `state` "none" | "playing" | "opening" | "buffering" | "paused" | "stopped" | "ended" | "error" (required): Current media state.

## Measure tools
Performance counters.

### stats_get
stats get: control and inspect OBS directly.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Returns:
- `end_to_end` object (required): End-to-end sync, with explicit provenance.
- `render` object (required): Render counters.
- `stages` object (required): Per-stage measured counters and bounds.

### stats_reset
stats reset: control and inspect OBS directly.
Annotations: {"destructiveHint": true, "idempotentHint": false, "openWorldHint": true, "readOnlyHint": false}
Returns:
- `end_to_end` object (required): End-to-end sync, with explicit provenance.
- `render` object (required): Render counters.
- `stages` object (required): Per-stage measured counters and bounds.

## Wait tools
Block until a typed condition holds, without sleeping.

### wait_for
Observe a typed condition immediately, then wait within timeout_ms. Returns the final typed value on timeout; unavailable metrics never satisfy a threshold.
Annotations: {"destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true}
Arguments:
- `condition` output_state | source_active | media_state | stat_at_most (required): Condition to observe before waiting.
- `timeout_ms` integer default 5000: Deadline in milliseconds; zero still observes once.
Returns:
- `elapsed_ms` integer (required): Monotonic elapsed time.
- `last_value` object | object | object | object (required): Last observed value, including on timeout.
- `satisfied` boolean (required): Condition met before the deadline.

## Resources
- `obs://scenes` (application/json): The scene graph: the current program scene, every scene and every source.
- `obs://stats` (application/json): OBS performance: fps, cpu_usage (percent) and dropped_frames.

## Errors
Failed tool calls return `isError: true` with structuredContent `{code, category, message, retryable}` (ToolError); codes follow obs-websocket v5 status ranges.

## Example sessions
### Start recording when the scene is ready
Switch scenes, wait for the camera to go live, then record. Writes only after it has looked.
```
# Handshake. The server speaks MCP 2025-06-18.
> {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"agent","version":"1"}}}
< {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-06-18","serverInfo":{"name":"obs-mcp","version":"0.1.0"},"capabilities":{"tools":{},"resources":{}}}}
> {"jsonrpc":"2.0","method":"notifications/initialized"}
# Put the interview scene on program.
> {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"scene_set_current","arguments":{"name":"Interview"}}}
< {"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"{\"name\":\"Interview\"}"}],"structuredContent":{"name":"Interview"},"isError":false}}
# Don't guess with a sleep: block until the camera source is actually active, for up to 10 s.
> {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"wait_for","arguments":{"condition":{"type":"source_active","name":"Camera"},"timeout_ms":10000}}}
< {"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"{\"satisfied\":true,\"elapsed_ms\":180,\"last_value\":{\"kind\":\"source\",\"present\":true,\"active\":true}}"}],"structuredContent":{"satisfied":true,"elapsed_ms":180,"last_value":{"kind":"source","present":true,"active":true}},"isError":false}}
# The camera is live. Start recording and wait until the output is really active.
> {"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"record_start","arguments":{"wait":true,"timeout_ms":5000}}}
< {"jsonrpc":"2.0","id":4,"result":{"content":[{"type":"text","text":"{\"active\":true}"}],"structuredContent":{"active":true},"isError":false}}
```

### Is the stream healthy?
Three read-only calls, all allowed by the read-only allowlist. The agent also says what the server cannot tell it.
```
# Is the stream output running, and is it moving bytes?
> {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"stream_status","arguments":{}}}
< {"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"{\"active\":true,\"duration_ms\":1804000,\"bytes\":1352000000}"}],"structuredContent":{"active":true,"duration_ms":1804000,"bytes":1352000000},"isError":false}}
# Has the renderer dropped frames? A zero timeout makes wait_for a one-shot check.
> {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"wait_for","arguments":{"condition":{"type":"stat_at_most","metric":"render_frames_dropped","value":10},"timeout_ms":0}}}
< {"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"{\"satisfied\":true,\"elapsed_ms\":0,\"last_value\":{\"kind\":\"stat\",\"metric\":\"render_frames_dropped\",\"value\":3}}"}],"structuredContent":{"satisfied":true,"elapsed_ms":0,"last_value":{"kind":"stat","metric":"render_frames_dropped","value":3}},"isError":false}}
```
This shows the output is active, bytes are moving (compare bytes across two calls) and the renderer keeps up. It does not show network drops, bitrate or reconnects: the server has no such field today, so an agent should not claim them.

### When it says no
The unhappy branches. A typed ToolError gives the agent a code, a category and whether retrying makes sense.
```
# Wait for the camera, but it never comes up.
> {"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"wait_for","arguments":{"condition":{"type":"source_active","name":"Camera"},"timeout_ms":3000}}}
< {"jsonrpc":"2.0","id":5,"result":{"content":[{"type":"text","text":"{\"satisfied\":false,\"elapsed_ms\":3000,\"last_value\":{\"kind\":\"source\",\"present\":true,\"active\":false}}"}],"structuredContent":{"satisfied":false,"elapsed_ms":3000,"last_value":{"kind":"source","present":true,"active":false}},"isError":false}}
# Not satisfied, so don't record. Report what was observed instead. Next, try the start anyway with a short timeout:
> {"jsonrpc":"2.0","id":6,"method":"tools/call","params":{"name":"record_start","arguments":{"wait":true,"timeout_ms":1000}}}
< {"jsonrpc":"2.0","id":6,"result":{"content":[{"type":"text","text":"{\"code\":207,\"category\":\"not_ready\",\"message\":\"output start timed out\",\"retryable\":true}"}],"structuredContent":{"code":207,"category":"not_ready","message":"output start timed out","retryable":true},"isError":true}}
```
The error object is ToolError from control-api.schema.json. Codes use the obs-websocket v5 status ranges.
