samsung-tv-mcp
Allows AI agents to control a Samsung Tizen smart TV on the local network, including power state, volume, remote key presses, text input, app listing/launching, and pairing.
Provides a tool to open YouTube on the TV and play a specified video from a YouTube URL (watch, youtu.be, shorts, embed) or video ID.
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., "@samsung-tv-mcpturn on the living room TV and play lo-fi beats on YouTube at volume 15"
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.
samsung-tv-mcp
An MCP server that lets AI agents control a Samsung Tizen smart TV on your local network: power, volume, remote keys, text input, apps and YouTube videos.
You: put lo-fi beats on the living room TV, not too loud
Claude: tv_status → standby
tv_power {on: true}
tv_play_youtube {video: "jfKfPfyJRdk"}
tv_set_volume {level: 15}It talks to the TV directly over its local APIs. No cloud account, no SmartThings, no hub.
Tools
Tool | What it does |
| Power ( |
| On (Wake-on-LAN, then the power key if it stays in standby) or off. Idempotent. |
| Remote keys in order, using aliases ( |
| Absolute volume over DLNA, refused above a configurable cap. |
| Fills the text field open on screen (search boxes). |
| Installed apps with their Tizen IDs. |
| Opens an app by name ( |
| Opens YouTube on a video, from a URL ( |
| Shows the "Allow" pop-up on the TV and waits for it to be accepted. |
Errors are returned as tool results (isError) with a stable code (not_paired, tv_off, bad_request) and a
message the model can act on, rather than thrown, so the agent can recover by itself: pair, turn the TV on, or pick
another app. The server also sends MCP instructions describing that flow.
Guardrails
An agent holding a TV remote should not be able to blast the volume at 3 a.m.
tv_set_volumerefuses levels aboveSAMSUNG_TV_MAX_VOLUME(default 50).tv_press_keysallows at most 5volume_upper call, so the cap cannot be bypassed with keys, and at most 30 keys.KEY_POWERis not accepted as a key; power goes throughtv_power, which checks the current state first, so "turn it on" never turns an already-on TV off.tv_statusandtv_list_appsare annotatedreadOnlyHint, so clients can auto-approve them and ask before the rest.
Related MCP server: Samsung TV MCP Server
Setup
Requires Node.js 20+ and a Samsung TV from 2016 or later on the same network.
git clone https://github.com/<you>/samsung-tv-mcp && cd samsung-tv-mcp
npm install
npx samsung-tv-mcp discover # scans your /24 and remembers the TV
npx samsung-tv-mcp pair # accept the pop-up on the TV with the physical remote
npx samsung-tv-mcp statusThe IP, MAC and pairing token are stored in ~/.samsung-tv-mcp/.
Claude Code
claude mcp add samsung-tv -- node /path/to/samsung-tv-mcp/src/cli.mjsClaude Desktop and other MCP clients
{
"mcpServers": {
"samsung-tv": {
"command": "node",
"args": ["/path/to/samsung-tv-mcp/src/cli.mjs"],
"env": { "SAMSUNG_TV_MAX_VOLUME": "40" }
}
}
}Configuration
Variable | Default | |
| discovered | Fixed TV address; disables rescanning. |
| from local interfaces |
|
|
| Volume cap for |
| App IDs to probe besides the built-in catalog. | |
|
| Where the config and token live. |
How it talks to the TV
What | How |
Keys and text | WebSocket |
State, apps | REST on |
Volume and mute | UPnP/DLNA RenderingControl on port 9197, no token needed |
YouTube video | DIAL |
Power on | Wake-on-LAN to the TV's MAC, then the power key if it is still in standby |
Things learned on a 2025 TV (UN43U8600F) that the older libraries and docs do not cover:
The app list request is ignored. Newer TVs never answer
ed.installedApp.getored.apps.launchover the WebSocket. They still answerGET /api/v2/applications/<id>one ID at a time, so the server probes a catalog of known IDs (src/apps.mjs) in parallel and keeps the ones the TV recognizes.DIAL needs a YouTube
Origin.POST /ws/apps/YouTubeanswers 403 unless the request carriesOrigin: https://www.youtube.com.Volume over DLNA is absolute and token-free, which beats sending
KEY_VOLUPtwenty times.A TV that turns off does not close the WebSocket. The server drops the channel whenever the REST API stops answering, otherwise it would keep reporting "connected".
Standby swallows Wake-on-LAN while the network stack is still up, so
tv_powerfalls back to the power key.There is no API to install apps. None of the store IDs respond.
Tests
npm testThe suite runs a fake TV (test/fake-tv.mjs) that serves the same REST, DLNA, DIAL and WebSocket endpoints on one
local port, including pairing approval, timeouts and revoked tokens. The MCP tests connect a real MCP client to the
server over an in-memory transport, so they cover the protocol layer, not just the TV client.
Library use
import { SamsungTV } from 'samsung-tv-mcp';
const tv = new SamsungTV({ dataDir: './data', host: '192.168.1.50' });
await tv.pair();
await tv.launchApp('3201907018807'); // NetflixLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Give your AI agent the power to cast to your home TV and control an interactive canvas. By ArdaBot.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
- mytesla.ioOAuthio.mytesla
Control your Tesla from your AI assistant - climate, charging, access, and security.
Related MCP Servers
- AlicenseBqualityAmaintenanceControl 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.2343 PyPI51MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that lets AI assistants control Samsung Smart TVs (Tizen OS, 2016+) over the local network. No cloud, no SmartThings account required.1MIT
- AlicenseBqualityAmaintenanceBuild, deploy, and debug Smart TV web apps on Samsung Tizen and LG webOS TVs from any AI agent.313 npm4MIT
- FlicenseBqualityCmaintenanceEnables 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-