MCP Integration
RAV includes a bundled native MCP (Model Context Protocol) sidecar that lets Claude Code, Claude Desktop, Codex, or any MCP client control the viewer remotely.
How it works
MCP Client <-(stdio)-> rav-mcp sidecar <-(WebSocket)-> RAV AppThe sidecar starts automatically with the app. The runtime strip MCP indicator brightens when a client is actively connected.

1
Connected — bright indigo, client actively communicating
2
Idle — dim indigo, bridge ready but no active client
3
Disabled — red with strikethrough, bridge stopped
Setup

Open the MCP Setup dialog from the toolbar cable icon. It provides:
- Status row — MCP ready or disabled
- Script Access — safety gate for JS execution tools
- MCP Port — editable bridge port with immediate snippet regeneration
- Client detection — checks Claude Code, Claude Desktop, and Codex
- Install actions — ADD, REINSTALL, or REMOVE based on detected state
- Manual snippets — copy-paste configurations for any MCP client
Available Tools (36)
| Tool | Description |
|---|---|
rav_status | App status: file, runtime, playback, canvas sizing, ViewModel summary |
rav_open_file | Open a .riv file by absolute path |
rav_play / rav_pause / rav_reset | Playback controls |
rav_get_artboards | List artboard names |
rav_get_state_machines | List state machine names |
rav_switch_artboard / rav_reset_artboard | Switch artboard/playback or reset to default |
rav_get_vm_tree | Full ViewModel hierarchy with paths, types, and values |
rav_vm_get / rav_vm_set / rav_vm_fire | Read, write, and fire ViewModel properties |
rav_get_event_log | Recent event log entries (filterable by source) |
rav_get_editor_code / rav_set_editor_code | Read and write the script editor |
rav_apply_code | Apply editor code and reload (Script Access required) |
rav_set_runtime | Switch runtime (webgl2 or canvas) |
rav_set_layout | Set layout fit mode |
rav_set_canvas_color | Set background color |
rav_set_canvas_size | Set canvas sizing mode, dimensions, and aspect lock |
rav_export_demo | Export standalone HTML demo (programmatic, no dialog) |
rav_export_demo_visual | Visibly orchestrate the export dialog (selection, package, snippet mode) and save — for screen recordings or non-default selections |
generate_web_instantiation_code | Generate canonical web snippet with helpers and control values |
rav_toggle_instantiation_controls_dialog | Open/close the export controls dialog |
rav_configure_workspace | Set sidebar visibility, live source mode, and VM Explorer state |
rav_get_sm_inputs / rav_set_sm_input | State machine input access |
rav_eval | Evaluate JS in browser context (Script Access required) |
rav_console_open / rav_console_close | Toggle the bottom console panel. open accepts optional mode, level, sources, and search to apply a filter on open |
rav_console_set_mode | Flip between Event Console, JS REPL, or closed without re-opening |
rav_console_set_filter | Drive the on-screen filter toggles: level for JS, sources for Events, plus search on either |
rav_console_clear | Clear the visible transcript of the active mode (or a specified mode); panel stays open |
rav_console_read / rav_console_exec | Read console output or run REPL code (exec requires Script Access) |
Script Access
By default, MCP can read state and drive safe control operations. Enable Script Access in the MCP Setup dialog to unlock rav_eval,rav_console_exec, and rav_apply_code.