obs-mcp
Provides tools for controlling OBS Studio, including scene management, input control, recording, streaming, filters, transitions, and more via obs-websocket.
Click on "Install 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-mcpWhat is the current scene?"
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
@firfi/obs-mcp is a Model Context Protocol server for OBS Studio. Stdio is the default transport; stateless Streamable HTTP is available as an opt-in transport.
This first slice implements read-only OBS status plus the scenes exemplar vertical. It proves the repo pattern for future OBS areas with strict schemas, a small MCP registry, a scoped obs-websocket protocol client, and deterministic OBS protocol tests.
Install
pnpm install
pnpm buildThe package binary is obs-mcp.
Related MCP server: MCP Server Example
Configuration
Environment variables:
OBS_WEBSOCKET_URL: OBS websocket URL. Defaults tows://localhost:4455. Barehost:portvalues are normalized tows://host:port.OBS_WEBSOCKET_PASSWORD: optional OBS websocket password.OBS_WEBSOCKET_CONNECTION_TIMEOUT: connection and request timeout in milliseconds. Defaults to30000.MCP_TRANSPORT:stdioorhttp. Defaults tostdio.MCP_HTTP_HOST: HTTP bind host whenMCP_TRANSPORT=http. Defaults to127.0.0.1.MCP_HTTP_PORT: HTTP bind port whenMCP_TRANSPORT=http. Defaults to3000.MCP_HTTP_AUTH_TOKEN: optional bearer token required by the HTTP/mcpendpoint.TOOLSETS: optional comma-separated category filter. Available categories areadmin_raw,batch,canvases,config,events,filters,general,inputs,outputs,record,scenes,screenshots,stream,transitions,ui, andvendor; the default enablesgeneral,record,scenes, andinputs.OBS_EVENT_BUFFER_CAPACITY: optional maximum number of recent safe OBS events retained forget_recent_obs_events. Defaults to the built-in bounded buffer size.OBS_MCP_SCREENSHOT_OUTPUT_DIR: optional existing directory allowlist forsave_source_screenshot. Screenshot save tools are disabled unless thescreenshotstoolset is enabled, and saves require a simple filename, not a path. Directories are never created implicitly.OBS_INTEGRATION_TESTS: set to1to run real OBS websocket integration tests.OBS_INTEGRATION_MUTATION_TESTS: set to1to enable integration tests that send state-changing OBS requests.
The server logs diagnostics to stderr. Stdout is reserved for MCP JSON-RPC.
For HTTP transport, run with MCP_TRANSPORT=http. The endpoint is http://<MCP_HTTP_HOST>:<MCP_HTTP_PORT>/mcp; if MCP_HTTP_AUTH_TOKEN is set, clients must send Authorization: Bearer <token>.
Set TOOLSETS=events to expose get_recent_obs_events, a bounded recent-event snapshot. It returns typed payloads for safe low-volume OBS events, while vendor/custom and high-volume events remain excluded from the default safe event policy.
Set TOOLSETS=admin_raw to expose OBS websocket persistent data tools. This is disabled by default; set_persistent_data accepts only JSON-safe slot values and does not echo the value in its response.
Set TOOLSETS=vendor to expose OBS websocket vendor/custom event tools. This is disabled by default; plugin-defined vendor requests and custom event broadcasts carry security and provenance risk, accept only JSON-safe object payloads, and remain excluded from get_recent_obs_events.
Set TOOLSETS=batch to expose run_obs_request_batch, a schema-limited OBS request batch tool. Sleep is supported only as a batch item with official serial execution semantics; there is no standalone sleep tool or arbitrary raw batch tool.
By default, raw/vendor/custom, persistent-data, high-volume event, and batch surfaces are not exposed. Diagnostics are written to stderr; stdout is reserved for MCP JSON-RPC.
Payload and Settings Policy
Input settings, filter settings, and screenshots use explicit MCP boundary schemas instead of raw OBS Object passthroughs. Read-only settings tools return stable setting metadata and mark raw settings as deferred. Mutation tools accept only allowlisted setting fields that have a narrow schema. Screenshot reads return bounded base64 data with MIME and byte metadata, while screenshot saves require the screenshots toolset plus an existing OBS_MCP_SCREENSHOT_OUTPUT_DIR allowlist.
Tools
Tools in the config toolset can read or change global OBS configuration such as profiles, scene collections, video settings, record directories, and stream service settings. They are opt-in via TOOLSETS=config.
Tools in the ui toolset that enable/disable studio mode or open dialogs/projectors are local OBS UI side effects. They are opt-in via TOOLSETS=ui and do not capture screenshots, manage OS windows, or perform filesystem actions.
run_obs_request_batchget_obs_contextget_versionget_obs_statslist_hotkeystrigger_hotkey_by_nametrigger_hotkey_by_key_sequenceget_recent_obs_eventsconfirm_obs_output_lifecycleconfirm_obs_scene_graph_changeconfirm_obs_source_filter_changeconfirm_obs_media_input_workflowconfirm_obs_transition_workflowconfirm_obs_input_audio_changeconfirm_obs_input_identity_changeconfirm_obs_canvas_inventory_changeconfirm_obs_studio_mode_state_changeconfirm_obs_config_workflowlist_canvaseslist_profileslist_scene_collectionsget_profile_parameterget_record_directoryset_record_directoryget_video_settingsset_video_settingsget_stream_service_settingsset_stream_service_settingsset_current_profilecreate_profileremove_profileset_current_scene_collectioncreate_scene_collectionset_profile_parameterlist_sceneslist_groupsget_current_sceneget_current_preview_sceneset_current_sceneset_current_preview_scenecreate_sceneremove_sceneset_scene_nameget_scene_transition_overrideset_scene_transition_overridelist_scene_itemslist_group_scene_itemscreate_scene_itemremove_scene_itemduplicate_scene_itemget_scene_item_idget_scene_item_sourceget_scene_item_transformset_scene_item_transformget_scene_item_enabledset_scene_item_enabledget_scene_item_lockedset_scene_item_lockedget_scene_item_indexget_scene_item_blend_modeset_scene_item_indexset_scene_item_blend_modeget_source_activeget_source_screenshotsave_source_screenshotlist_source_filter_kindslist_source_filtersget_source_filter_default_settingsget_source_filtercreate_source_filterremove_source_filterset_source_filter_settingsset_source_filter_enabledset_source_filter_indexset_source_filter_namelist_inputslist_input_kindsget_special_inputsget_input_muteset_input_mutetoggle_input_muteget_input_volumeset_input_volumeget_input_audio_balanceset_input_audio_balanceget_input_audio_monitor_typeset_input_audio_monitor_typeget_input_audio_sync_offsetset_input_audio_sync_offsetget_input_audio_tracksset_input_audio_tracksget_input_deinterlace_modeset_input_deinterlace_modeget_input_deinterlace_field_orderset_input_deinterlace_field_orderget_input_default_settingsget_input_settingsget_input_properties_list_property_itemsset_input_settingspress_input_properties_buttoncreate_inputremove_inputset_input_nameget_media_input_statusset_media_input_cursoroffset_media_input_cursortrigger_media_input_actionlist_outputsget_output_statusget_output_settingsset_output_settingsstart_outputstop_outputtoggle_outputget_virtual_cam_statusstart_virtual_camstop_virtual_camtoggle_virtual_camget_replay_buffer_statusstart_replay_bufferstop_replay_buffertoggle_replay_buffersave_replay_bufferget_last_replay_buffer_replayget_record_statusstart_recordstop_recordtoggle_recordsplit_record_filecreate_record_chapterpause_recordresume_recordtoggle_record_pauseget_stream_statusstart_streamstop_streamtoggle_streamsend_stream_captionlist_transition_kindslist_scene_transitionsget_current_scene_transitionget_current_scene_transition_cursorset_current_scene_transitionset_current_scene_transition_durationset_current_scene_transition_settingstrigger_studio_mode_transitionset_tbar_positionget_studio_mode_enabledset_studio_mode_enabledopen_input_properties_dialogopen_input_filters_dialogopen_input_interact_dialoglist_monitorsopen_video_mix_projectoropen_source_projectorget_persistent_dataset_persistent_datacall_vendor_requestbroadcast_custom_event
Tool results use MCP structured content rather than textified JSON.
Manual Stdio Smoke Test
Start OBS Studio with obs-websocket enabled, then run:
OBS_WEBSOCKET_URL=ws://localhost:4455 pnpm startSend MCP JSON-RPC on stdin from an MCP client. For local development without real OBS, the automated test harness starts a deterministic OBS protocol endpoint.
Verify
pnpm check-allpnpm verify-readme checks the generated tool list, and pnpm verify-protocol-parity compares local OBS request/event coverage with the official obs-websocket protocol JSON. The pre-commit hook runs pnpm update-readme and stages the generated README tool list.
Real OBS Integration
Local .env is supported for integration tests and is ignored by git. The checked-in development template uses host.docker.internal, which resolves from this workspace.
Use .env.example as the non-secret template; keep real passwords only in local .env.
See INTEGRATION_TESTING.md for the full harness policy, current pass/skip baseline, and optional modes.
Read-only smoke integration tests:
pnpm test:integrationThe Huly-style full live integration harness drives the built MCP server over stdio, enables every toolset, and reports each public tool as passed, skipped by OBS capability/environment, or skipped by safety policy. It is the broad local confidence gate for real OBS parity:
pnpm test:integration:fullMutation checks are separate because they send state-changing OBS requests. They require both
OBS_INTEGRATION_TESTS=1 and OBS_INTEGRATION_MUTATION_TESTS=1; pnpm test:integration sets
OBS_INTEGRATION_TESTS=1 for you. Lifecycle mutation smoke checks do not start recording or streaming.
OBS_INTEGRATION_MUTATION_TESTS=1 pnpm test:integration
OBS_INTEGRATION_MUTATION_TESTS=1 pnpm test:integration:fullBounded screenshot payload checks run in the full harness when the current scene has a source.
File-writing screenshot checks are skipped unless OBS_MCP_SCREENSHOT_OUTPUT_DIR points to a
directory visible to the OBS process.
Default pnpm test remains deterministic-harness only and does not require OBS.
This server cannot be installed
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dearlordylord/obs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server