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-mcp turn 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
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
Available Tools
9 toolstv_launch_appOpen an appA
Opens an installed app by name ("netflix", "prime video") or by its Tizen ID from tv_list_apps.
Inputs: app (required).
tv_list_appsList installed appsBRead-only
Apps from the built-in catalog that are installed on this TV, with their IDs and whether they are running.
Inputs: refresh.
tv_pairPair with the TVA
Shows an "Allow" pop-up on the TV and waits up to 30 s for someone to accept it with the physical remote. Tell the user to look at the TV before calling. force=true discards the current token and pairs again.
Inputs: force.
tv_play_youtubePlay a YouTube videoA
Opens the TV YouTube app directly on a video (DIAL), given a YouTube URL or an 11-character video ID.
Inputs: video (required).
tv_powerTurn TV on or offAIdempotent
Turns the TV on (Wake-on-LAN, then the power key if it stays in standby) or off. No-op if already in that state.
Inputs: on (required).
tv_press_keysPress remote keysB
Presses remote-control keys in order. Use aliases (up, down, left, right, ok, back, home, menu, source, play, pause, stop, fast_forward, rewind, volume_up, volume_down, mute, channel_up, channel_down, 0-9) or raw Samsung codes like KEY_RED. Up to 30 keys per call.
Inputs: keys (required).
tv_set_volumeSet volumeAIdempotent
Sets the absolute volume (0-100) over DLNA. Levels above 50 are refused as a safety cap.
Inputs: level (required).
tv_statusTV statusARead-only
Power state (on | standby | off), name, model, IP, whether this server is paired, current volume and mute. Rediscovers the TV on the LAN if its address changed.
Inputs: no named parameters.
tv_type_textType textA
Replaces the content of the text field that is open on the TV (search boxes, keyboards). Open the field first; this does nothing if no keyboard is on screen.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool maps to a distinct action on the TV, and descriptions clarify boundary cases well (tv_play_youtube vs tv_launch_app, status vs pair). The main overlap is volume control: tv_press_keys accepts volume_up/volume_down/mute aliases that duplicate the purpose of tv_set_volume, which could cause misselection.
All tools share a consistent tv_ snake_case prefix with predictable verb_noun naming (tv_press_keys, tv_set_volume, tv_list_apps, tv_launch_app). Minor deviations: tv_status and tv_power are noun-only, and tv_pair is a bare verb, but the pattern remains readable.
Nine tools is well-scoped for a TV remote server, with one tool per core capability (status, power, keys, volume, text, apps, YouTube, pairing). No redundant or filler tools.
The surface covers power lifecycle, input, volume, text entry, app discovery/launch, YouTube deep-linking, and pairing, which is most of a TV remote's domain. Gaps exist: no absolute channel selection (only channel_up/down keys) and no input/source enumeration or app install, though many of these can be worked around via tv_press_keys.
Related MCP Connectors
Give your AI agent the power to cast to your home TV and control an interactive canvas. By ArdaBot.
Control Android TV from any AI. 38 MCP tools: playback, recap, recommend, smart-home, schedules.
YouTube for AI agents: transcripts, comments, video stats, channel monitor, Shorts captions.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Related MCP Servers
- AlicenseBqualityCmaintenanceBuild, deploy, and debug Smart TV web apps on Samsung Tizen and LG webOS TVs from any AI agent.319 npm6MIT
- AlicenseNot gradedqualityCmaintenanceEnables discovering, pairing with, and controlling Samsung Tizen TVs on a local network.2 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI agent to control an LG webOS TV by reading playback status, listing and launching apps, adjusting volume or mute, and powering it off.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to control a Samsung Tizen smart TV over the local network without cloud services, covering power on/off, launching and closing apps, casting YouTube videos, sending remote keys, adjusting volume, and checking TV status and health.1MIT