MCP cdp_session_create
Description
Create a CDP (Chrome DevTools Protocol) debug session for a Roku app running on Hermes.
Builds and sideloads the app in debug mode (equivalent to rk dev -d), loads its source map, and connects to the device's Hermes CDP server (port 9999). Only one session is allowed per device -- call cdp_session_end first to replace an existing session for the same device.
Delegates internally to debug_session_create (mode: "cdp_only"). The resulting session works with every cdp_* tool, including the aliased ones (cdp_eval, cdp_status, cdpdebugger, etc). This is distinct from calling the native POST /api/cdp/session/create REST endpoint directly (bypassing this tool, e.g. via rk cdp session create) -- that path is invisible to the aliased tools, which will fail with a clear error naming the cause; only the still-native cdpsource/cdp_heap_usage family can see a session created that way. One exception: cdp_status specifically still reports a generic { active: false } (no hint) rather than that clear error when the session it can't see is a native-CDP-only one -- its underlying route (session/status) always returns 200 with no-session-found folded into a normal response, unlike the error-based routes every other cdp_* tool goes through.
Required parameters:
- root (string): ABSOLUTE filesystem path to the Roku app root directory.
Optional parameters:
- device (string): Target device ID, IP, or exact name. Uses active device when omitted.
- host (string): Direct target host/IP (bypasses device store selection for target resolution).
- password (string): Device password override (applies to host mode and can override stored device password).
- mode (string): "watch" (default, auto-reconnects if the connection drops) or "manual". Note: unlike
before aliasing, a non-string value here (or for device/host/password) is now silently coerced to
the default/omitted rather than rejected with an invalid-params error.
Aliases
Alias of debug_session_create; mode="cdp_only"; mode → connectionMode.
See also
- Alias of MCP debug_session_create
- HTTP debugCreateSession (
POST /api/debug/session/create) - rk cdp session create
Parameters
additionalProperties: false
| Name | Type | Required | Values |
|---|---|---|---|
| root | string | Yes | |
| device | string | No | |
| host | string | No | |
| password | string | No | |
| mode | "watch" | "manual" | No | enum: "watch", "manual"; default: "watch" |
root
Absolute path to the Roku app root
device
Target device ID, IP, exact name, or rce:<name>. Uses active device when omitted.
host
Direct target host/IP (bypasses device store selection for target resolution)
password
Device password override (applies to host mode and can override stored device password)
mode
Connection mode: watch (default, auto-reconnect) or manual
Updated about 7 hours ago