roku-debug-mcp
roku-debug-mcp
Servidor MCP que ofrece a los agentes de IA la experiencia completa de depuración de Roku en VS Code.
Expone las capacidades de depuración de BrightScript de Roku como herramientas MCP para que los agentes de IA puedan leer registros, inspeccionar el grafo de escena, recorrer el código, leer variables y establecer puntos de interrupción: la misma información que ve un desarrollador en la extensión de Roku para VS Code.
Arquitectura
graph TB
subgraph "AI Agent (Hermes, VS Code, etc.)"
MCP[<b>MCP Client</b><br/>stdio JSON-RPC]
end
subgraph "roku-debug-mcp (MCP Server)"
Server[<b>MCP Server</b><br/>21 tools]
Config[<b>Config</b><br/>ROKU_* env vars]
Server --> Config
end
subgraph "Roku Device"
direction LR
subgraph "Port 80 — HTTP"
Installer[<b>Sideloader</b><br/>Digest auth<br/>Expect: 100-continue]
end
subgraph "Port 8060 — ECP"
ECP[<b>ECP Client</b><br/>Device info<br/>Scene graph<br/>Postback/keys]
end
subgraph "Port 8081 — Binary Debug"
Debug[<b>Debug Client</b><br/>Binary protocol<br/>BSDBG magic]
end
subgraph "Port 8085 — Telnet"
Console[<b>Text Console</b><br/>Fallback logs]
end
end
MCP --> Server
Server --> Installer
Server --> ECP
Server --> Debug
Server --> ConsoleCapas de protocolo
Puerto | Protocolo | Autenticación | Propósito |
80 | HTTP | Digest + Expect: 100-continue | Carga lateral de canales |
8060 | ECP HTTP | Ninguno | Información del dispositivo, grafo de escena, capturas de pantalla |
8081 | Binario | Ninguno | Protocolo de depuración principal (VS Code usa este) |
8085 | Telnet | Ninguno | Consola de texto (respaldo) |
Protocolo de depuración binario (puerto 8081)
sequenceDiagram
participant C as Client (roku-debug-mcp)
participant R as Roku Device (port 8081)
C->>R: Handshake<br/>[magic(8)][protocol_version(4)]
R-->>C: [magic(8)][protocol_version(4)][packet_len(4)][revision]
Note over C,R: Request/Response Format:<br/>[packet_length(4)][request_id(4)][cmd_code(4)][payload]
C->>R: GET_THREADS (cmd=3)
R-->>C: THREADS response
C->>R: STACKTRACE (cmd=4, thread_index)
R-->>C: Stack frames
C->>R: ADD_BREAKPOINTS (cmd=7)
R-->>C: Confirmation
Note over C,R: Update notifications (request_id=0):<br/>CONNECT_IO_PORT, ALL_THREADS_STOPPED, etc.Magia de handshake: 0x0067756265647362 (b"bsdebug\0" little-endian)
Flujo de carga lateral (puerto 80)
sequenceDiagram
participant C as Client
participant R as Roku (port 80)
C->>R: POST /plugin_package (Expect: 100-continue)
R-->>C: 401 Unauthorized (WWW-Authenticate: Digest)
C->>C: Compute digest hash
C->>R: POST /plugin_package (Authorization: Digest)
R-->>C: 100 Continue
C->>R: [ZIP payload]
R-->>C: 200 OK [chunked response with Dev Kit HTML]Related MCP server: Node.js Debugger MCP
Lo que la IA puede hacer con esto
Leer información del dispositivo — modelo, versión, aplicación en ejecución
Inspeccionar el grafo de escena — la jerarquía completa de nodos de la aplicación en ejecución
Leer registros de consola — salida estándar del canal BrightScript en ejecución
Listar hilos — ver todos los hilos de ejecución y sus estados de detención
Leer trazas de pila — pila de llamadas marco a marco para cualquier hilo detenido
Inspeccionar variables — locales, globales y estado de componentes del grafo de escena
Ejecutar código — ejecutar BrightScript arbitrario en un marco detenido
Gestionar puntos de interrupción — añadir, listar, eliminar puntos de interrupción por archivo/línea
Ejecución paso a paso — pasar por encima, entrar, salir o continuar
Cargar canales lateralmente — subir e instalar canales de prueba con depuración remota
Inicio rápido
1. Instalación
cd /home/dom/src/roku-debug-mcp
pip install -e .2. Configurar el entorno
export ROKU_DEVICE_IP=192.168.1.10 # Roku device IP
export ROKU_DEV_USER=rokudev # Dev channel username
export ROKU_DEV_PASSWORD=your-password # Dev channel password3. Registrar en Hermes
Añade a ~/.hermes/mcp-servers.json:
{
"roku-debug-mcp": {
"command": "roku-debug-mcp",
"args": []
}
}4. Usar en una sesión de Hermes
El agente de IA ahora tendrá acceso a 21 nuevas herramientas:
roku_device_info()
roku_scene_graph()
roku_debug_threads()
roku_debug_stacktrace(thread_index=0)
roku_debug_variables(thread_index=0, frame_index=0)
roku_debug_execute(thread_index=0, frame_index=0, code="x = 42")
roku_debug_breakpoints_add(breakpoints=[{...}])
roku_debug_console_output()Herramientas disponibles
Herramientas de dispositivo / interfaz (ECP — puerto 8060)
Herramienta | Descripción |
| Modelo del dispositivo, versión, etc. |
| Aplicación en ejecución |
| Jerarquía completa de nodos del grafo de escena |
| Enviar postback al canal |
| Lanzar una URI |
| Enviar tecla de control remoto |
| Capturar imagen de pantalla |
Herramientas de depuración (protocolo binario — puerto 8081)
Herramienta | Descripción |
| Listar todos los hilos |
| Obtener marcos de pila |
| Leer variables en un marco |
| Ejecutar código BrightScript |
| Añadir puntos de interrupción |
| Listar puntos de interrupción activos |
| Eliminar puntos de interrupción específicos |
| Borrar todos los puntos de interrupción |
| Reanudar la ejecución |
| Ejecución paso a paso |
| Pausar la ejecución |
| Obtener líneas de salida estándar |
| Versión del protocolo de depuración |
Herramientas de instalación (HTTP — puerto 80)
Herramienta | Descripción |
| Cargar lateralmente un ZIP de canal |
| Lanzar con depuración remota habilitada |
Pruebas
Pruebas unitarias (servidor Roku simulado)
# Run all tests (uses mock server on ephemeral ports)
pytest tests/ -v
# Mock server runs automatically via conftest fixtures
# No manual setup requiredPruebas de integración (dispositivo Roku real)
# Requires env vars set
ROKU_DEV_IP=10.71.71.151 \
ROKU_DEV_PASSWORD=your-password \
pytest tests/test_integration_real_device.py -vCI/CD
Pruebas unitarias se ejecutan en runners de Ubuntu de GitHub Actions
Pruebas de integración se ejecutan en un runner autoalojado (10.71.71.90) con acceso LAN a un Roku real
Estructura del proyecto
src/rokumcp/
config.py # Environment-based configuration
protocol.py # Binary protocol constants and Stream I/O
debug_client.py # Synchronous binary debug client (port 8081)
text_console.py # Telnet text console client (port 8085)
ecp.py # ECP HTTP client (port 8060)
installer.py # HTTP Digest-auth sideloader (port 80)
server.py # MCP server entrypoint — 21 tools
tests/
conftest.py # Pytest fixtures (mock server setup)
mock_roku_server.py # Mock Roku device simulator
test_protocol.py # Stream round-trips, ProtocolVersion
test_config.py # Config defaults, from_env
test_ecp.py # ECP HTTP client
test_text_console.py # Telnet console client
test_installer.py # Digest auth + multipart
test_debug_client.py # Full E2E vs mock binary server
test_integration_real_device.py # Real device (gated on env vars)
fixtures/ # Test channel ZIP fixturesReferencia del protocolo
Implementación derivada de la referencia oficial de Roku:
Consulta AGENTS.md para la especificación completa del protocolo y los formatos de transmisión.
Desarrollo
Depuración del protocolo
# Run mock server manually
python tests/mock_roku_server.py
# Test specific protocol interaction
ROKU_DEVICE_IP=127.0.0.1 ROKU_DEBUG_PORT=8081 python -m rokumcp.serverCompilación
pip install -e .
roku-debug-mcp # runs MCP server over stdioLicencia
Apache-2.0
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides Node.js debugging capabilities with process management for AI agents, allowing them to start/stop Node.js processes, set breakpoints, step through code, and evaluate expressions.816MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to debug Node.js applications using Chrome DevTools Protocol. Provides comprehensive debugging capabilities including breakpoints, stepping, variable inspection, expression evaluation, and console monitoring.180348MIT
- AlicenseCqualityAmaintenanceEnables AI agents to perform step-through debugging of Python, JavaScript/Node.js, and Rust programs using the Debug Adapter Protocol, with support for breakpoints, variable inspection, and stack traces.21159MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to develop, test, and certify Roku applications by providing direct control over device functions like app deployment, remote input, and SceneGraph inspection. It supports automated workflows including real-time log collection, media monitoring, and certification verification.1
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Agent Replay Debugger MCP — record every agent step + deterministic replay. Step-debugger for
Shared debugging memory for AI coding agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dominick253/roku-debug-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server