MCP logs

Description

Manage Roku log sessions and fetch buffered logs.

Actions:

  • start: begin collection and create a session
  • list: list active sessions
  • stop: stop one or more sessions
  • get: read the last N lines from the buffer
  • search: return lines matching a regex filter, uses for searching within logs without fetching the entire buffer

Note: MCP does NOT support tail/streaming. Use the CLI 'rk logs tail' for live streaming. When available, prefer the in-memory logs/search endpoint for analysis instead of reading .roku/logs files directly.

Parameters:

  • action (string, required): start | list | stop | get | search
  • host (string, optional): direct target host/IP (bypasses device store selection for target resolution)
  • password (string, optional): device password override (applies to host mode and can override stored device password)
  • device (string, optional): device id, name, or IP (defaults to active device)
  • port (number, optional): log port (default: 8085)
  • bufferSize (number, optional): circular buffer size in lines (default: 10000, start only)
  • lines (number, optional): number of lines/matches to return
    • get default: 50
    • search default: 100
  • filter (string): regex filter (required for search action; other actions should ignore this parameter)
  • caseSensitive (boolean, optional): case-sensitive regex matching (default: false)
  • all (boolean, optional): stop all sessions (stop only; default: false)

Response examples: start: { "command": "logs", "action": "start", "sessionId": "192.0.2.10:8085", "device": "Living Room", "port": 8085, "status": "active", "bufferSize": 10000, "logDir": "/abs/path/to/project/.roku/logs", "success": true }

list: { "command": "logs", "action": "list", "sessions": [ { "sessionId": "192.0.2.10:8085", "status": "active", "lines": 523, "bufferSize": 10000 } ] }

get: { "command": "logs", "action": "get", "sessionId": "192.0.2.10:8085", "lines": ["line 1", "line 2"], "totalLines": 523, "wrapped": false }

search: { "command": "logs", "action": "search", "sessionId": "192.0.2.10:8085", "matches": ["ERROR: ..."], "totalMatches": 3, "searched": 1000 }

See also

Parameters

additionalProperties: false

NameTypeRequiredValues
action"start" | "list" | "stop" | "get" | "search"Yesenum: "start", "list", "stop", "get", "search"
hoststringNo
passwordstringNo
devicestringNo
portnumberNodefault: 8085
bufferSizenumberNodefault: 10000
linesnumberNo
filterstringNo
caseSensitivebooleanNodefault: false
allbooleanNodefault: false

action

Action to perform. Use get to read logs, search to filter logs, start to begin collection, list to view sessions, stop to end sessions.

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)

device

Device ID, name, IP, or rce:<name> (defaults to active device if omitted)

port

Log port for Roku device (defaults to 8085)

bufferSize

Maximum lines to keep in the circular buffer (start only)

lines

Number of log lines to return (get/search only)

filter

Regex filter to match log lines (search only)

caseSensitive

Enable case-sensitive matching (search only)

all

Stop all sessions (stop only)


Did this page help you?