MCP tools

Devices

ToolDescription
list_devicesList Roku devices from the SDK device store, LAN and Roku Cloud Emulator (kind).
get_device_ipReturn IP address of the active Roku device.
get_device_dev_idReturn the keyed developer ID registered on a Roku device.
device_startStart a stopped Roku Cloud Emulator (RCE) device so other tools can deploy to and drive it.
device_stopStop a Roku Cloud Emulator (RCE) device that device_start started on this rk server, and wait until it has stopped.
add_deviceAdd a new Roku device to the device store.
update_deviceUpdate properties of an existing Roku device.
remove_deviceRemove a Roku device from the device store.
activate_deviceSet a specific Roku device as the active device.
clear_active_deviceClear the active flag from all Roku devices.
update_default_authUpdate default authentication credentials for all devices.
device_rebootReboot a Roku device using POST /plugin_swup with mysubmit=Reboot.
device_check_updateTrigger software update check via POST /plugin_swup with mysubmit=CheckUpdate.

Build and deploy

ToolDescription
build_appBuild a Roku app at a given project root.
deploy_appDeploy a Roku application (non-watch) to a device.
sideload_appSideload a pre-built Roku app to a device without rebuilding.
get_roku_configReturn current Roku configuration from roku-config.ts.
stop_dev_sessionStop an active rk dev watch session on the rk server (equivalent to DELETE /api/dev/:sessionId).

Packaging and DCL

ToolDescription
packageManage Roku package operations (sign, rekey, delete, squashfs, ls).
dclManage Downloadable Component Libraries (DCL) on a Roku device.

ECP and screen

ToolDescription
ecpExecute External Control Protocol (ECP) commands against a Roku device.
capture_screenTake a screenshot of the Roku device screen.

Logs

ToolDescription
logsManage Roku log sessions and fetch buffered logs.
decode_stack_traceDecode a Roku TypeScript stack trace from Hermes bytecode (index.hbc) or JS bundle (index.js) to original TypeScript source locations.

Perfetto

ToolDescription
perfetto_enableEnable Perfetto tracing on a Roku device for a channel.
perfetto_startStart a Perfetto trace session on the target device.
perfetto_stopStop a previously started Perfetto trace session.

Debugging

ToolDescription
debug_session_createCreate a unified debug session for a Roku app, optionally spanning both the TypeScript/Hermes runtime (CDP, port 9999) and the BrightScript runtime (DAP, port 8081).
debug_session_endEnd an active unified debug session, tearing down both the CDP and DAP backends (whichever are active).
debug_session_statusReport the status of a unified debug session: overall state, and per-backend connection state, negotiated protocol version (DAP), and thread count.
debug_session_updateToggle flags on an active debug session, or trigger a full rebuild.
debug_stacktraceGet the current BrightScript call stack for a stopped thread, wrapping the device's STACKTRACE command over Roku's socket-based BrightScript debug protocol (TCP 8081) -- NOT the Microsoft Debug Adapter Protocol.
debug_stateUnified replacement for cdp_debugger_state -- returns a top-level paused flag plus, per active runtime, the current call stack (and for TypeScript, scope summaries).
debug_evalEvaluate an expression on the debugged Roku app, routing to CDP (Hermes/TypeScript) or DAP (BrightScript) depending on the session's active backend(s) and the optional runtime parameter.
debug_breakpoint_setSets a breakpoint, routed by the file's extension: .ts/.tsx/.js/.jsx go to the TypeScript/CDP debugger, .brs/.xml go to the BrightScript/DAP debugger (Roku's own socket-based debug protocol on port 8081 -- NOT Microsoft DAP).
debug_breakpoint_removeRemoves a breakpoint previously set by debug_breakpoint_set, routed automatically to whichever backend (CDP or DAP) it was originally set on.
debug_breakpoints_listLists every breakpoint tracked for the session -- both TypeScript/CDP line breakpoints and BrightScript/DAP line and exception breakpoints, in one unified list.
debug_exception_breakpoints_setSets which BrightScript exception categories should stop the app (SET_EXCEPTION_BREAKPOINTS, DAP-only, requires BrightScript debug protocol >= 3.3.0 -- check debug_session_status's capabilities.exceptionBreakpoints first, or this call fails with a clear 400 instead of attempting anything on the device).
debug_continueResumes execution on the debugged Roku app.
debug_stepSteps execution on the debugged Roku app: over, into, or out.
debug_stopHalts execution on the debugged Roku app.
debug_console_readReads captured console output across all three sources in a debug session (CDP/TypeScript, DAP/BrightScript app output, and the device's own port-8085 log stream), merged into one chronologically-ordered stream and tagged by source.
debug_errors_readReads captured errors across BOTH runtimes in a debug session, merged into one chronologically-ordered stream and tagged by source.
debug_console_clearClears captured console and/or error entries for a debug session.

CDP

ToolDescription
cdp_session_createCreate a CDP (Chrome DevTools Protocol) debug session for a Roku app running on Hermes.
cdp_session_updateRebuild and redeploy the app into an existing CDP debug session (for iterative development: change code, call this, then re-check state).
cdp_session_endEnd an active CDP debug session: disconnects from the device and clears its source map from memory.
cdp_evalEvaluate a JavaScript expression in the global scope of the debugged Roku app via CDP Runtime.evaluate.
cdp_statusReport the state of a CDP debug session: connection state, pause state, source map load state, and captured console/error counts.
cdp_heap_usageReturn lightweight JS heap usage (total/used bytes) for the debugged Roku app via CDP Runtime.getHeapUsage.
cdp_profile_startStart a CPU profiling capture on the debugged Roku app via CDP Profiler.start.
cdp_profile_stopStop an active CPU profiling capture started by cdp_profile_start and write the .cpuprofile to disk.
cdp_heap_snapshotCapture a heap snapshot of the debugged Roku app via CDP HeapProfiler.takeHeapSnapshot.
cdp_heap_sampling_startStart a lightweight heap allocation sampling capture on the debugged Roku app via CDP HeapProfiler.startSampling.
cdp_heap_sampling_stopStop an active heap sampling capture started by cdp_heap_sampling_start and write the .heapprofile to disk.
cdp_source_listLists every source file available in the currently loaded source map, as local disk paths.
cdp_source_getReturns lines of source content from one file in the loaded source map, optionally restricted to a line range.
cdp_source_grepSearches the loaded source map's file contents for a regular expression pattern, across all files or one specific file.
cdp_source_resolveResolves a path between its source-map representation and its local disk path.
cdp_console_readReads captured console output (from CDP Runtime.consoleAPICalled), optionally filtered, with decoded stack traces (mapped back to original source via the loaded source map) attached when available.
cdp_errors_readReads captured runtime exceptions (from CDP Runtime.exceptionThrown), with decoded stack traces attached when available.
cdp_console_clearClears both the console and error buffers for a session.
cdp_console_clear_consoleClears only the console buffer for a session, leaving the error buffer intact.
cdp_console_clear_errorsClears only the error buffer for a session, leaving the console buffer intact.
cdp_debugger_pausePauses JS execution on the debugged Roku app via CDP Debugger.pause, and waits for the resulting Debugger.paused event before returning so the caller sees the new paused state.
cdp_debugger_resumeResumes JS execution on the debugged Roku app via CDP Debugger.resume, and waits for the resulting Debugger.resumed event before returning.
cdp_debugger_step_overSteps over the current line via CDP Debugger.stepOver, and waits for the resulting Debugger.paused event before returning so the caller sees the new call frames.
cdp_debugger_step_intoSteps into the function call on the current line via CDP Debugger.stepInto, and waits for the resulting Debugger.paused event before returning so the caller sees the new call frames.
cdp_debugger_step_outSteps out of the current function via CDP Debugger.stepOut, and waits for the resulting Debugger.paused event before returning so the caller sees the new call frames.
cdp_breakpoint_setSets a breakpoint at a TypeScript/source line via CDP Debugger.setBreakpoint.
cdp_breakpoint_removeRemoves a previously-set breakpoint via CDP Debugger.removeBreakpoint.
cdp_breakpoint_listLists all breakpoints currently tracked for a session.
cdp_debugger_stateReturns the current debugger pause state.
cdp_debugger_eval_frameEvaluates a JS expression scoped to a specific paused call frame via CDP Debugger.evaluateOnCallFrame -- sees that frame's locals and closures, not just globals.

DAP

ToolDescription
dap_reconnectRecover a BrightScript (DAP) debug backend after its connection has dropped.
dap_threadsList all BrightScript debug threads and their current stop state.
dap_thread_selectSet the session's default BrightScript debug thread.
dap_thread_stop_reasonRead a BrightScript thread's cached stop reason and code snippet.
dap_variablesInspect a BrightScript variable or container hierarchically, wrapping the device's VARIABLES command over Roku's socket-based BrightScript debug protocol (TCP 8081) -- NOT the Microsoft Debug Adapter Protocol.

Diagnostics

ToolDescription
get_server_healthReturn rk server health and runtime status (equivalent to GET /api/health).

Did this page help you?