MCP Roku Control
Enables control of Roku TVs via the External Control Protocol (ECP), including remote button presses, app launching, device discovery, and querying device information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Roku Control launch Netflix on the TV"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Roku Control

A Model Context Protocol (MCP) server that enables AI assistants and agentic systems to control TVs on your local network.
Currently supports: Roku TVs via the External Control Protocol (ECP).
Based on mcp-remote-control by Aaron Goldsmith. This fork adds auto-discovery of Roku TVs via SSDP (with HTTP subnet scan fallback), fixes a connection pool exhaustion bug in the subnet scanner, and includes WSL2 networking guidance.
What is MCP?
The Model Context Protocol is an open standard that allows AI models to securely interact with external tools and data sources. This server exposes TV controls as MCP tools, enabling LLMs like Claude to control your TV through natural language commands.
Related MCP server: Smartest-TV
Architecture
This project is designed with future extensibility in mind. The Roku-specific implementation is isolated in roku_bridge.py, separating the ECP protocol details from the MCP server layer. While the current implementation is Roku-specific, the structure provides a foundation for supporting additional TV brands and control protocols in the future.
Why Use This?
Natural Language Control: Tell your AI assistant "turn on Netflix" or "increase the volume" without touching a remote
Smart Home Integration: Integrate TV control into agentic workflows and automation systems
Accessibility: Control your TV through conversational interfaces
Development: Build custom applications that leverage AI-powered TV control
Prerequisites
TV Setup
Before using this server, you need to enable external control on your Roku TV:
Enable Network Control:
Go to Settings > System > Advanced system settings
Select Control by mobile apps
Choose Network access and set to Default or Permissive
Find Your TV's IP Address (optional — auto-discovery is supported):
Go to Settings > Network > About
Note the IP address (e.g.,
192.168.1.100)
Set Environment Variable (optional):
export HOST_IP=192.168.1.100 # Replace with your TV's IPIf
HOST_IPis not set, the server will automatically scan the local network for Roku TVs on startup using SSDP. You can also trigger discovery at any time with thediscover_tv()tool.
System Requirements
Python: 3.12 or higher
Network: TV and computer must be on the same local network
MCP Client: An MCP-compatible client like Claude Desktop, Claude Code, Goose or custom implementations
Features
Remote Control: Simulate button presses (navigation, playback, volume, power)
App Launching: Launch apps by name (e.g., "Netflix", "YouTube")
App Discovery: List all available apps and their IDs
Device Info: Query device information
Auto-Discovery: Automatically find Roku TVs on the local network via SSDP — no static IP required
Getting Started
Installation
The package is available on PyPI.
The easiest way to use this server is via uvx, which runs the package directly from PyPI without requiring a separate install step:
uvx mcp-roku-controlAlternatively, install globally with pip:
pip install mcp-roku-controlUsing with Claude Desktop
Add this server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tv-control": {
"command": "uvx",
"args": ["mcp-roku-control"],
"env": {
"HOST_IP": "192.168.1.100"
}
}
}
}Replace 192.168.1.100 with your TV's IP address.
After updating the config, restart Claude Desktop. You can then ask Claude to control your TV:
"Turn on my TV and launch Netflix"
"Increase the volume"
"What apps are available on my Roku?"
Using with Claude Code
Install the server using the MCP server manager in Claude Code. See the Claude Code documentation for details.
Using with Other MCP Clients
This server uses the standard MCP protocol over stdio. See the MCP documentation for connecting local servers to your MCP client.
Local Development
If you want to modify the server or contribute to development, clone the repository and install in editable mode:
git clone https://github.com/AaronGoldsmith/mcp-remote-control.git
cd mcp-remote-control
pip install -e .
# or with uv:
uv pip install -e .To use your local development version with Claude Desktop, point to the cloned directory:
{
"mcpServers": {
"tv-control": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/mcp-remote-control", "run", "mcp-roku-control"],
"env": {
"HOST_IP": "192.168.1.100"
}
}
}
}Replace /absolute/path/to/mcp-remote-control with the actual path to your cloned repository.
Available Tools
press_key(key_name)
Simulates a button press on the TV remote.
Navigation: Home, Up, Down, Left, Right, Select, Back
Playback: Play, Pause, Rev (Rewind), Fwd (FastForward)
Volume: VolumeUp, VolumeDown, VolumeMute
Power: PowerOff, PowerOn
Other: Info, InstantReplay, Search
launch_app(app_name)
Launches an app by name (case-insensitive). Examples:
launch_app("Netflix")launch_app("youtube")launch_app("Disney+")
list_apps()
Lists all available apps with their names and Roku channel IDs.
get_device_info()
Retrieves device information as XML.
power_on()
Powers on the TV.
discover_tv()
Scans the local network for Roku TVs via SSDP and updates the active TV to the first device found. Useful when HOST_IP is not set or when the TV's IP address has changed.
Supported Apps
The following apps are supported and can be launched by name using launch_app(). App names are case-insensitive and some apps have multiple accepted names (e.g., "Prime Video" or "Amazon Prime Video").
App Name | Channel ID | Alternative Names |
Netflix | 12 | - |
YouTube | 837 | - |
Amazon Prime Video | 13 | Prime Video |
Hulu | 2285 | - |
Disney+ | 291097 | Disney Plus |
HBO Max | 61322 | - |
Apple TV+ | 551012 | Apple TV |
Peacock | 593099 | - |
Paramount Plus | 31440 | Paramount+ |
ESPN | 34376 | - |
Tubi | 41468 | - |
Sling TV | 46041 | - |
STARZ | 65067 | - |
CBS | 619667 | - |
CNN | 65978 | - |
Pluto TV | 74519 | - |
SHOWTIME | 8838 | - |
Use list_apps() to see the complete list programmatically.
Example Usage
Once connected to an MCP client, you can use natural language to control your TV:
User: "Turn on my TV and launch Netflix"
Assistant: *uses power_on() and launch_app("Netflix")*
User: "Show me what apps are available"
Assistant: *uses list_apps() to display all installed apps*
User: "Navigate down 3 times and select"
Assistant: *uses press_key("Down") three times, then press_key("Select")*
User: "Pause what's playing"
Assistant: *uses press_key("Pause")*Learn More
MCP Resources
Model Context Protocol Documentation - Official MCP docs and specification
MCP GitHub Repository - Source code and examples
MCP Servers Registry - Collection of community MCP servers
Building MCP Servers Guide - Learn to build your own MCP servers
Roku Resources
Roku ECP Documentation - Official External Control Protocol documentation
Roku Developer Portal - Additional Roku development resources
Troubleshooting
Connection Failed: Ensure your TV and computer are on the same network and the TV's IP address is correct
Control Not Working: Verify that "Control by mobile apps" is enabled in your TV settings
App Not Launching: Check that the app is installed on your TV using
list_apps()Environment Variable:
HOST_IPis optional — if omitted, auto-discovery runs at startup. Set it explicitly if discovery is slow or unreliable on your network.
WSL2 Users
SSDP discovery requires an inbound Windows Firewall rule to allow UDP responses from your local network to reach the WSL2 process. Run the following in an elevated PowerShell (replace the subnet if your home network differs):
New-NetFirewallRule -DisplayName "Roku SSDP WSL2" -Direction Inbound -Protocol UDP -RemoteAddress 192.168.1.0/24 -Action AllowWithout this rule, SSDP M-SEARCH responses are silently blocked by Windows Firewall. The server will fall back to an HTTP subnet scan, which works but is slower (~5–10 s vs. < 1 s for SSDP).
License
MIT
Available Tools
6 toolsdiscover_tvA
Scans the local network for Roku TVs via SSDP and returns the discovered devices.
Also updates the active TV to the first device found. Useful when HOST_IP is not configured or when the TV's IP address may have changed.
Inputs: no named parameters. Returns: result
get_device_infoA
Retrieves basic device information (model, software version, etc.) as XML.
Inputs: no named parameters. Returns: result
launch_appA
Launches an application on the TV using its name.
Args: app_name: The name of the app to launch (e.g., Netflix, YouTube, Hulu). Case-insensitive. Use list_apps() to see available apps.
Inputs: app_name (required). Returns: result
list_appsA
Lists all available apps and their corresponding Roku channel IDs.
Returns a formatted list of app names and their IDs that can be used with launch_app().
Inputs: no named parameters. Returns: result
power_onA
Powers on the TV.
Inputs: no named parameters. Returns: result
press_keyA
Simulates a single button press on the TV remote.
Args: key_name: The name of the key to press (e.g., Home, Select, VolumeUp). Common keys are Home, Back, Select, Up, Down, Left, Right. Special keys are: PowerOn, PowerOff, VolumeUp, VolumeDown, VolumeMute
Inputs: key_name (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clear and distinct purpose: discovering TVs, getting device info, launching apps, listing apps, powering on, and simulating key presses. No overlap in functionality.
All tool names follow a consistent snake_case verb_noun pattern (e.g., discover_tv, list_apps, press_key), making them predictable and easy to distinguish.
Six tools is an appropriate scope for a remote control server, covering discovery, information retrieval, app management, power control, and key input without being excessive.
The tool set covers most core remote control actions, including power on, key presses (volume, navigation, etc.), and app launching. A minor gap is the lack of an explicit power off tool, though press_key can send PowerOff.
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Control your Tesla from your AI assistant - climate, charging, access, and security.
Turns a phone into a camera+Bluetooth remote so AI assistants can see and control any PC.
Manage digital signage screens, playlists and media from your AI assistant.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to control TVs on a local network through natural language commands. It currently supports Roku devices, allowing users to launch apps, manage playback, and navigate menus.51-
- AlicenseBqualityBmaintenanceControl any smart TV with natural language — play Netflix/YouTube/Spotify by name, cast URLs, scene presets, multi-room audio, and multi-TV sync. Supports LG, Samsung, Android TV, Roku.2348 PyPI57MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to discover and control IoT devices on local networks and via Bluetooth LE.71MIT
- FlicenseBqualityDmaintenanceEnables discovery and control of smart appliances (TVs, media devices) on the local network through natural language, supporting providers like Roku, Google TV, and Home Assistant.18-