RAVDocsMCP Integration
RAV

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 App

The sidecar starts automatically with the app. The runtime strip MCP indicator brightens when a client is actively connected.

MCP indicator in three states
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

MCP Setup dialog showing status, client detection, and copy snippets

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)

ToolDescription
rav_statusApp status: file, runtime, playback, canvas sizing, ViewModel summary
rav_open_fileOpen a .riv file by absolute path
rav_play / rav_pause / rav_resetPlayback controls
rav_get_artboardsList artboard names
rav_get_state_machinesList state machine names
rav_switch_artboard / rav_reset_artboardSwitch artboard/playback or reset to default
rav_get_vm_treeFull ViewModel hierarchy with paths, types, and values
rav_vm_get / rav_vm_set / rav_vm_fireRead, write, and fire ViewModel properties
rav_get_event_logRecent event log entries (filterable by source)
rav_get_editor_code / rav_set_editor_codeRead and write the script editor
rav_apply_codeApply editor code and reload (Script Access required)
rav_set_runtimeSwitch runtime (webgl2 or canvas)
rav_set_layoutSet layout fit mode
rav_set_canvas_colorSet background color
rav_set_canvas_sizeSet canvas sizing mode, dimensions, and aspect lock
rav_export_demoExport standalone HTML demo (programmatic, no dialog)
rav_export_demo_visualVisibly orchestrate the export dialog (selection, package, snippet mode) and save — for screen recordings or non-default selections
generate_web_instantiation_codeGenerate canonical web snippet with helpers and control values
rav_toggle_instantiation_controls_dialogOpen/close the export controls dialog
rav_configure_workspaceSet sidebar visibility, live source mode, and VM Explorer state
rav_get_sm_inputs / rav_set_sm_inputState machine input access
rav_evalEvaluate JS in browser context (Script Access required)
rav_console_open / rav_console_closeToggle the bottom console panel. open accepts optional mode, level, sources, and search to apply a filter on open
rav_console_set_modeFlip between Event Console, JS REPL, or closed without re-opening
rav_console_set_filterDrive the on-screen filter toggles: level for JS, sources for Events, plus search on either
rav_console_clearClear the visible transcript of the active mode (or a specified mode); panel stays open
rav_console_read / rav_console_execRead 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.