# ๐ฎ Roku MCP Server
[ํ๊ตญ์ด](#ํ๊ตญ์ด) | [English](#english)
---
## ํ๊ตญ์ด
Roku ๊ธฐ๊ธฐ ๊ฐ๋ฐ, ํ
์คํธ, ์ธ์ฆ์ ์ํ **MCP (Model Context Protocol) ์๋ฒ**์
๋๋ค.
AI ์์ด์ ํธ(Gemini, Claude, Copilot ๋ฑ)๊ฐ Roku ๊ธฐ๊ธฐ๋ฅผ ์ง์ ์ ์ดํ๊ณ ํ
์คํธํ ์ ์๊ฒ ํฉ๋๋ค.
### โจ ์ฃผ์ ๊ธฐ๋ฅ
- ๐ฆ **์ฑ ๋ฐฐํฌ** โ ์ฌ์ด๋๋ก๋ ๋ฐฐํฌ ๋ฐ ์คํฌ๋ฆฐ์ท ์บก์ฒ
- ๐ฅ๏ธ **ํด์๋ ๊ฒ์ฆ** โ HD/FHD ํธํ์ฑ ์๋ ํ์ธ
- โจ๏ธ **๋ฆฌ๋ชจ์ปจ ์ ์ด** โ ํค ์
๋ ฅ, ์ํ์ค, ํ
์คํธ ์
๋ ฅ
- ๐ฑ **์ฑ ๊ด๋ฆฌ** โ ์ค์น๋ ์ฑ ์กฐํ, ์คํ, ๋ฅ๋งํฌ ํ
์คํธ
- ๐ **๋ก๊ทธ ์์ง** โ BrightScript ์ฝ์ ์ค์๊ฐ ๋ก๊ทธ
- ๐ **SceneGraph ๊ฒ์ฌ** โ ๋
ธ๋ ํธ๋ฆฌ, ๋ฉ๋ชจ๋ฆฌ, ํฌ์ปค์ค ์์
- ๐ฅ **์คํธ๋ฆฌ๋ฐ ๋ชจ๋ํฐ๋ง** โ ์ฌ์ ์ํ, ๋ฒํผ๋ง, ๋์ญํญ
- ๐ก๏ธ **์ธ์ฆ ๊ฒ์ฆ** โ DRM, ์ ๊ทผ์ฑ(Audio Guide/์๋ง), RAF ๊ด๊ณ
- ๐งช **ํตํฉ ํ
์คํธ** โ ์ฌ๋ฌ ๋์์ ์ํ์ค๋ก ์๋ ์คํ
### ๐ ๋๊ตฌ ๋ชฉ๋ก (25๊ฐ)
| ์นดํ
๊ณ ๋ฆฌ | ๋๊ตฌ | ์ค๋ช
|
|---------|------|------|
| ๋ฐฐํฌ | `roku_deploy` | ์ฑ ์ฌ์ด๋๋ก๋ ๋ฐฐํฌ |
| | `roku_screenshot` | ํ๋ฉด ์บก์ฒ (base64 ์ด๋ฏธ์ง) |
| ๋์คํ๋ ์ด | `roku_device_info` | ๊ธฐ๊ธฐ ์ ๋ณด (๋ชจ๋ธ, ํด์๋, ํ์จ์ด) |
| | `roku_check_resolution` | HD/FHD ํด์๋ ํธํ์ฑ ๊ฒ์ฆ |
| ์
๋ ฅ | `roku_keypress` | ๋ฆฌ๋ชจ์ปจ ํค ์
๋ ฅ |
| | `roku_keypress_sequence` | ํค ์ํ์ค ์ ์ก |
| | `roku_input` | ์ปค์คํ
์ด๋ฒคํธ/๋ฅ๋งํฌ ํ๋ผ๋ฏธํฐ |
| ์ฑ ๊ด๋ฆฌ | `roku_apps` | ์ค์น๋ ์ฑ ๋ชฉ๋ก |
| | `roku_active_app` | ํ์ฌ ์คํ ์ค์ธ ์ฑ |
| | `roku_launch` | ์ฑ ์คํ/์ฌ์์ |
| | `roku_deep_link` | ๋ฅ๋งํฌ ์ธ์ฆ ํ
์คํธ |
| | `roku_registry` | ์ฑ ๋ ์ง์คํธ๋ฆฌ ๋ฐ์ดํฐ ์กฐํ |
| | `roku_app_state` | ์ฑ ๋ผ์ดํ์ฌ์ดํด ์ถ์ |
| ๋ก๊ทธ | `roku_log` | BrightScript ์ฝ์ ๋ก๊ทธ |
| SceneGraph | `roku_sg_nodes` | SG ๋
ธ๋ ํธ๋ฆฌ ๊ฒ์ฌ |
| | `roku_perf` | CPU/๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋ |
| | `roku_graphics_fps` | ๊ทธ๋ํฝ FPS |
| | `roku_element` | UI ์์ ๊ฒ์ (WebDriver) |
| | `roku_focused_element` | ํฌ์ปค์ค ์์ ์กฐํ |
| ์คํธ๋ฆฌ๋ฐ | `roku_media_player` | ๋ฏธ๋์ด ์ฌ์ ์ํ |
| | `roku_server_check` | ์๋ฒ ํฌ์ค์ฒดํฌ |
| ์ธ์ฆ | `roku_check_drm` | DRM ์ฝํ
์ธ ๋ณดํธ ์ํ |
| | `roku_check_accessibility` | ์ ๊ทผ์ฑ ์ค์ ๊ฒ์ฌ |
| | `roku_check_raf` | RAF ๊ด๊ณ ํ๋ ์์ํฌ ๊ฒ์ฆ |
| ํ
์คํธ | `roku_run_test` | ํตํฉ ํ
์คํธ ์คํ |
### ๐ ๏ธ ์ค์น
```bash
git clone https://github.com/maskelog/roku-mcp.git
cd roku-mcp
npm install
npm run build
```
### โ๏ธ ์ค์
`.env.example`์ `.env`๋ก ๋ณต์ฌํ ํ ์ค์ :
```env
ROKU_DEV_HOST=192.168.0.100 # Roku ๊ธฐ๊ธฐ IP (์ค์ > ๋คํธ์ํฌ > ์ ๋ณด)
ROKU_DEV_PASSWORD=your_password # Developer Mode ๋น๋ฐ๋ฒํธ
ROKU_PROJECT_ROOT= # ํ๋ก์ ํธ ๋ฃจํธ (๊ธฐ๋ณธ: ์์ ๋๋ ํ ๋ฆฌ)
ROKU_APP_SERVER_URL= # ์ฑ ์๋ฒ URL (์ ํ)
```
> โ ๏ธ Roku Developer Mode๋ฅผ ํ์ฑํํด์ผ ํฉ๋๋ค.
### ๐ MCP ํด๋ผ์ด์ธํธ ์ฐ๊ฒฐ
AI ์์ด์ ํธ์ MCP ์ค์ ์ ์ถ๊ฐ:
```json
{
"mcpServers": {
"roku-dev": {
"command": "node",
"args": ["/path/to/roku-mcp/dist/index.js"],
"env": {
"ROKU_DEV_HOST": "192.168.0.100",
"ROKU_DEV_PASSWORD": "your_password"
}
}
}
}
```
### ๐ก ์ฌ์ฉ ์์
AI ์์ด์ ํธ์๊ฒ ์์ฐ์ด๋ก ์์ฒญ:
- *"Roku ๊ธฐ๊ธฐ ์ ๋ณด ์๋ ค์ค"* โ `roku_device_info`
- *"์ฑ ๋ฐฐํฌํ๊ณ ์คํฌ๋ฆฐ์ท ์ฐ์ด์ค"* โ `roku_deploy` โ `roku_screenshot`
- *"๊ด๊ณ ์ค์ ์ด๋ค์ง ํ์ธํด"* โ `roku_check_raf`
- *"HD/FHD ํด์๋ ํธํ ๋๋์ง ๋ด์ค"* โ `roku_check_resolution`
- *"ํตํฉ ํ
์คํธ ๋๋ ค์ค"* โ `roku_run_test`
---
## English
MCP (Model Context Protocol) server for **Roku device development, testing, and certification**.
Enables AI agents (Gemini, Claude, Copilot, etc.) to directly control and test Roku devices.
### โจ Features
- ๐ฆ **App Deployment** โ Sideload apps and capture screenshots
- ๐ฅ๏ธ **Resolution Verification** โ Auto-check HD/FHD compatibility
- โจ๏ธ **Remote Control** โ Key presses, sequences, text input
- ๐ฑ **App Management** โ List apps, launch, deep link testing
- ๐ **Log Collection** โ Real-time BrightScript console logs
- ๐ **SceneGraph Inspection** โ Node tree, memory, focused elements
- ๐ฅ **Streaming Monitoring** โ Playback state, buffering, bandwidth
- ๐ก๏ธ **Certification Checks** โ DRM, accessibility (Audio Guide/Captions), RAF ads
- ๐งช **Integration Testing** โ Automated multi-step test sequences
### ๐ Tools (25)
| Category | Tool | Description |
|----------|------|-------------|
| Deploy | `roku_deploy` | Sideload app to device |
| | `roku_screenshot` | Capture screen (base64 image) |
| Display | `roku_device_info` | Device info (model, resolution, firmware) |
| | `roku_check_resolution` | Verify HD/FHD resolution support |
| Input | `roku_keypress` | Send remote key press |
| | `roku_keypress_sequence` | Send key sequence |
| | `roku_input` | Custom events / deep link params |
| App | `roku_apps` | List installed apps |
| | `roku_active_app` | Currently running app |
| | `roku_launch` | Launch / restart app |
| | `roku_deep_link` | Test deep linking (certification req.) |
| | `roku_registry` | Read app registry data |
| | `roku_app_state` | Track app lifecycle |
| Logging | `roku_log` | BrightScript console logs |
| SceneGraph | `roku_sg_nodes` | Inspect SG node tree |
| | `roku_perf` | CPU / memory usage |
| | `roku_graphics_fps` | Graphics frame rate |
| | `roku_element` | Find UI element (WebDriver) |
| | `roku_focused_element` | Get focused element |
| Streaming | `roku_media_player` | Media playback state |
| | `roku_server_check` | Server health check |
| Certification | `roku_check_drm` | DRM content protection status |
| | `roku_check_accessibility` | Accessibility compliance |
| | `roku_check_raf` | RAF ad framework verification |
| Testing | `roku_run_test` | Run integration test sequence |
### ๐ ๏ธ Installation
```bash
git clone https://github.com/maskelog/roku-mcp.git
cd roku-mcp
npm install
npm run build
```
### โ๏ธ Configuration
Copy `.env.example` to `.env` and configure:
```env
ROKU_DEV_HOST=192.168.0.100 # Roku device IP (Settings > Network > About)
ROKU_DEV_PASSWORD=your_password # Developer Mode password
ROKU_PROJECT_ROOT= # Project root (default: parent directory)
ROKU_APP_SERVER_URL= # App server URL (optional)
```
> โ ๏ธ Roku Developer Mode must be enabled on the target device.
### ๐ MCP Client Setup
Add to your AI agent's MCP configuration:
```json
{
"mcpServers": {
"roku-dev": {
"command": "node",
"args": ["/path/to/roku-mcp/dist/index.js"],
"env": {
"ROKU_DEV_HOST": "192.168.0.100",
"ROKU_DEV_PASSWORD": "your_password"
}
}
}
}
```
### ๐ก Usage Examples
Ask your AI agent in natural language:
- *"Show me the Roku device info"* โ `roku_device_info`
- *"Deploy the app and take a screenshot"* โ `roku_deploy` โ `roku_screenshot`
- *"Check if the ad framework is set up correctly"* โ `roku_check_raf`
- *"Verify HD/FHD resolution support"* โ `roku_check_resolution`
- *"Run a full integration test"* โ `roku_run_test`
### ๐๏ธ Architecture
```
roku-mcp/
โโโ src/
โ โโโ index.ts # MCP server entry (25 tools + 2 resources)
โ โโโ roku-client.ts # ECP + Dev Web Server client
โ โโโ log-client.ts # BrightScript console (Telnet :8085)
โ โโโ webdriver-client.ts # Roku WebDriver (port 9000)
โ โโโ test-runner.ts # Integration test orchestrator
โโโ dist/ # Compiled output
โโโ package.json
โโโ tsconfig.json
โโโ .env.example
```
### ๐ก Roku APIs Used
| API | Port | Purpose |
|-----|------|---------|
| ECP (External Control Protocol) | 8060 | Device control, queries, key presses |
| Developer Web Server | 80 | App sideloading, screenshots |
| BrightScript Console | 8085 | Runtime logs, debugging |
| SceneGraph Debug | 8080 | SG-specific debugging |
| WebDriver | 9000 | UI element automation |
### ๐ Self-Documenting
Every tool includes inline Roku API documentation in its description โ API endpoints, ports, parameters, expected responses, and links to official docs. AI agents can use the tools without consulting external documentation.
---
## License
MIT