
RokuMCP
io.github.jack1590由 GitHub 账号 jack1590 发布v1.3.2更新于 Oct 24, 2026
MCP server for Roku device automation — deploy, ECP control, screenshots, and debug console
概览
让助手控制局域网内的 Roku 设备:部署频道、发送遥控按键、截图、检查 SceneGraph 节点并读取调试控制台。
- 可以做什么
- RokuMCP 通过局域网提供 Roku 设备自动化工具。它可以侧载和删除开发者频道,发送 ECP 按键与文本、启动频道,查询设备、应用和媒体播放器状态,截取屏幕,并读取应用 UI 树或 SceneGraph 节点。它还能连接 BrightScript 调试控制台,通过 RTA 协议编辑正在运行的开发频道界面,分析 .bsprof 性能文件与 Perfetto 跟踪,并诊断播放失败的 HLS/DASH 流。
- 适用场景
- 适合在开发或测试 Roku 频道时,让助手操作设备、用截图核对界面状态、检查节点,或获取调试与性能分析输出。也适用于排查某个流为何在 Roku 硬件上播放失败。
- 运行要求
- 需要 Node.js 18+,以及同一网络内已开启开发者模式的 Roku 设备。通过 npx roku-mcp 以 stdio 在本地运行。ROKU_DEVICE_HOST 与 ROKU_DEVICE_PASSWORD 均为可选:未设置主机时使用 SSDP 自动发现,也可在每次工具调用时传入或从 .env 文件读取。截图和部署需要已侧载的开发频道;运行时界面编辑需要频道内置 RTA 组件;Perfetto 跟踪需要 Roku OS 15.1+。
安装
在 SourceWeft 中
- 打开 控制台中的 RokuMCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
roku-mcp
A Model Context Protocol (MCP) server for Roku device automation. Exposes tools for app deployment, ECP remote control, screenshot capture, SceneGraph node inspection, and BrightScript debug console access.
Install
The server ships as a single npx command. Install once globally if you prefer, or let your MCP client launch it on demand via npx -y roku-mcp — both work.
Plugin mode (Claude Code and Cursor)
Unofficial community tool. Not affiliated with or endorsed by Roku, Inc.
The repo also ships as a plugin: the MCP server, workflow skills (skills/), and Cursor rules, registered together.
- Claude Code:
/plugin marketplace add jack1590/RokuMCPthen/plugin install roku-mcp@roku-mcp-marketplace. Manifests:.claude-plugin/,.mcp.json. - Cursor: manifests in
.cursor-plugin/andmcp.json. Skills inskills/, rules inrules/cursor/.
Claude Code asks for the device host and developer password when the plugin is enabled (the password is stored as sensitive). Both clients use the entry point bootstrap.mjs. Both run npm ci and npm run build on first start (Node 18+). Outside plugin mode, ROKU_DEVICE_HOST / ROKU_DEVICE_PASSWORD or a project .env still work.
Configure your AI client below. Every platform uses the same launch line; only the config file and reload step change.
Cursor — agent-mode tools, auto-discovers MCP servers
Prerequisites: Cursor 0.45+ with Agent mode.
Install: create .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global):
Then reload the window (Cmd+Shift+P / Ctrl+Shift+P → Developer: Reload Window).
Verify: open Cursor Settings → MCP and confirm the roku row shows a green dot. If it appears disabled, click the toggle. In a new agent chat, type list roku tools — you should see roku_deploy, roku_screenshot, etc.
Routing rule (recommended): the repo also ships an AGENTS.md. Cursor picks it up automatically, so the agent knows the canonical observe → act → wait → verify loop and the RTA uiElementId gotcha without you having to re-explain it every session.
Troubleshoot: if the server stays grey/disabled, check View → Output → MCP Logs — the most common cause is ROKU_DEVICE_HOST unreachable on the LAN. Omit the env block entirely to fall back to SSDP auto-discovery.
VS Code (GitHub Copilot) — agent mode, MCP via .vscode/mcp.json
Prerequisites: VS Code 1.99+ with the GitHub Copilot extension and an active Copilot subscription that includes Agent mode.
Install: create .vscode/mcp.json in your project root:
Reload the window (Cmd+Shift+P / Ctrl+Shift+P → Developer: Reload Window).
Verify: open Copilot Chat, switch the chat-mode dropdown to Agent, and ask "what roku tools do you have?". You should see the full roku_* list. The MCP panel (Cmd+Shift+P → MCP: List Servers) should show roku as Running.
Troubleshoot: if the server fails to start, run npx -y roku-mcp --help in a regular terminal first — that confirms Node 18+ and npx are working before VS Code launches it.
Claude Desktop — official Anthropic desktop app
Prerequisites: Claude Desktop (latest from claude.ai/download), Node.js 18+ on PATH.
Install: edit your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Fully quit and restart Claude Desktop (the menu-bar icon must close — Cmd+Q on macOS).
Verify: open a new chat. The 🛠️ icon in the input bar should list roku-mcp with all its tools. Ask "take a Roku screenshot" — Claude will request approval for roku_screenshot and run it.
Troubleshoot: if no tool icon appears, check ~/Library/Logs/Claude/mcp-server-roku.log (macOS) — command not found: npx means Node isn't on the GUI app's PATH. Either install Node via the official .pkg, or hard-code the absolute paths: "command": "/usr/local/bin/node", "args": ["/usr/local/bin/npx", "-y", "roku-mcp"].
Windsurf — Codeium's agentic IDE
Prerequisites: Windsurf with Cascade enabled.
Install: create .windsurf/mcp.json in your project root (or ~/.codeium/windsurf/mcp_config.json globally):
Reload the window. In Cascade settings, refresh the MCP server list.
Verify: ask Cascade "list available MCP tools" — roku_* entries should appear.
Troubleshoot: Windsurf occasionally caches a stale server. If reloads don't pick up edits, fully quit Windsurf and reopen.
Any MCP-compatible client (Continue, Cline, Zed, Codex, Claude Code, OpenCode, …)
The server speaks the standard MCP stdio transport. Anywhere you can declare:
…the server runs. Both env vars are optional: omit ROKU_DEVICE_HOST to use SSDP auto-discovery on the LAN, and pass host / password on each tool call to override.
The repo-root AGENTS.md is picked up automatically by Claude Code, OpenCode, Codex CLI, and any other tool that follows the AGENTS.md convention, so those agents inherit the same usage guidance without extra setup.
Agent rules
For better agent behavior (the observe → act → wait → verify loop, the RTA uiElementId gotcha that silently breaks roku_edit_node, when to use which tool), the repo ships drop-in rules pre-formatted for each major agent. The body is identical — only the wrapper differs to match what each agent auto-loads.
See rules/README.md for one-line copy commands per agent.
Quickstart
Once your client is wired up, these three prompts work out of the box and exercise the main capability groups.
1. Confirm the device is reachable
The agent should call roku_query_device_info (and possibly roku_discover if no host is configured) and reply in one turn.
2. Drive the UI with screenshots
This exercises roku_keypress, roku_sleep, and roku_screenshot — the standard observe → act → wait → verify loop.
3. Live-edit a running channel (requires RTA — see Runtime UI Editing)
The agent will roku_query_app_ui to locate the node, grab the uiElementId, call roku_edit_node + roku_get_value, and roll back — proving end-to-end RTA wiring.
Environment Variables
Both can also be passed as parameters on each tool call, which override the environment variables.
Auto-discovery
If ROKU_DEVICE_HOST is not set and no host parameter is provided, the server automatically discovers Roku devices on the local network using SSDP and uses the first one found. You can also use the roku_discover tool to list all available devices. Note that the password cannot be discovered and must still be configured.
.env file support
The server automatically loads a .env file from the current working directory using dotenv. If your project's .env already uses ROKU_DEVICE_HOST and ROKU_DEVICE_PASSWORD, the server picks them up with no extra configuration — just omit the env block from your MCP config:
If your project uses different variable names (e.g. ROKU_IP, ROKU_DEV_PASSWORD), you can map them in the env block:
Or simply add the two expected variables to your .env alongside your existing ones.
Available Tools
Deploy
Discovery
ECP (External Control Protocol)
Screenshot
Debug Console
Runtime UI Editing
Edit the SceneGraph UI of a running sideloaded dev channel without redeploying — the same backend the SceneGraph Inspector in the vscode-brightscript-language extension uses. These tools speak the roku-test-automation (RTA) protocol against the channel's On-Device Component on TCP port 9000, so changes apply instantly with no debugger pause.
How it works. Each tool opens a short-lived TCP connection to the RTA On-Device Component (port 9000) in the running channel, sends a length-prefixed JSON request (setValue / getValue / focusNode / ...) and parses the framed JSON response. Mutations apply on the SceneGraph thread without breaking into the debugger.
Node addressing. nodeId accepts either:
- A
uiElementIdlikeRTA_1773(visible in theroku_query_sg_nodes/roku_query_app_uioutput for every node when RTA is running). This is the most robust target. - A real BrightScript
idattribute defined on the node in the channel source.
Anything matching /^RTA_\d+$/ is sent with RTA base: "elementId"; otherwise it's sent with base: "scene".
Required: install the RTA On-Device Component in your channel
These tools only work when the channel under test bundles RTA. You have two options:
Option A — let roku-debug inject RTA on every sideload (recommended for VS Code users).
-
In your
launch.json, enable: -
In
source/main.brs, add the marker comment immediately afterscreen.show():
Option B — bundle the RTA component yourself. Copy the device/components folder from roku-test-automation into your channel and instantiate RTA_OnDeviceComponent once from your scene.
Either way, on a successful install you will see this in the device log at channel launch:
If a runtime UI tool returns a connection-refused error, RTA is not present in the running channel — apply one of the two install options above and redeploy.
BrightScript Profiler
Analyze .bsprof files generated by Roku devices. These tools use bsprof-cli to parse the binary profiler format and return structured JSON reports.
To generate a .bsprof file, enable the profiler in your Roku app's manifest (bs_prof_enabled=true), run the app, and download the profile from http://<device-ip>:8080.
Perfetto Tracing
Record, analyze, and compare Perfetto traces from Roku devices. Requires Roku OS 15.1+. These tools use roku-perfetto for ECP control, WebSocket recording, and PerfettoSQL analysis.
Workflow: enable tracing → start recording → interact with app → stop recording → analyze. The .trace files can also be opened at ui.perfetto.dev.
Stream Diagnosis
Figure out why an HLS/DASH stream that plays everywhere else fails on Roku.
It detects Roku-specific gotchas such as muxed audio+video in fMP4/CMAF HLS (plays video but silent), video codecs/levels beyond the hardware decoder (e.g. 4K H.264 or 8K HEVC), token/403-gated CDNs, and DRM license rejections. The static manifest checks are treated as hints; when you supply the real device errorInfo the diagnosis is corroborated to high confidence.
Requirements
- Node.js 18+
- A Roku device with Developer Mode enabled on the same network
- For screenshots and deploy: a sideloaded dev channel must be running
License
MIT
来源:README.md,提交 f3b5cba
工具
0版本历史
1- v1.3.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。