sony-bravia-mcp
Allows control of Sony Bravia TVs, including power, HDMI input selection, app launching, volume and mute control through the TV's built-in JSON-RPC API.
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., "@sony-bravia-mcp Turn on the TV and switch to the Apple TV input."
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.
sony-bravia-mcp
MCP server for Sony Bravia TVs. Control power, HDMI inputs, apps and volume through the TV's built-in JSON-RPC API. Works with Claude Desktop, Cursor, Vibe, or any MCP client — over stdio or HTTP.
Built with FastMCP, httpx and Pydantic.
Requirements
A Sony Bravia TV on the local network (2019+ models with the Sony BRAVIA Professional API)
A Pre-Shared Key: on the TV, enable Settings > Network & Internet > Home Network > IP Control > Authentication and set a PSK
Related MCP server: Raspberry Pi MCP Audio Control System
Install
pip install -e .
cp .env.example .env # set BRAVIA_HOST and BRAVIA_PSKThe .env file is loaded automatically; no source needed.
MCP configuration
{
"mcpServers": {
"bravia": {
"command": "bravia-mcp",
"env": {
"BRAVIA_HOST": "192.168.1.42",
"BRAVIA_PSK": "your-pre-shared-key"
}
}
}
}The server starts even with the TV off or unplugged: the first tool call
returns a TV_UNREACHABLE error with a hint instead of crashing.
HTTP transport
stdio is the default. To serve over HTTP instead:
bravia-mcp --transport http # 127.0.0.1:8000/mcp
bravia-mcp --transport http --host 0.0.0.0 --port 9000{
"mcpServers": {
"bravia": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}Tools
Tool | Description |
| Consolidated state: power, input, volume, mute. Never fails as a whole |
| HDMI inputs, CEC/HDMI deduplicated by port |
| Installed apps (6 h cache, |
| On/off, Wake-on-LAN fallback on power-on |
| Switch input by exact name (case-insensitive) |
| Launch app by exact title (case-insensitive) |
| Absolute |
| Mute/unmute |
set_input and launch_app take the exact name returned by list_inputs /
list_apps. No fuzzy matching: the caller sees the list and picks. Unknown
names come back with the available list.
Every tool returns either the expected payload or an error object with
error, message and hint — never an exception.
CLI
The client layer is usable on its own, without MCP:
bravia state # consolidated state
bravia inputs # list inputs
bravia input "Apple TV" # switch input
bravia apps # list apps
bravia app "YouTube" # launch app
bravia power on|off
bravia volume --level 20 # or --delta -5
bravia mute on|off
bravia methods # API methods supported by this firmware
bravia -v state # debug tracesDesign notes
CEC/HDMI deduplication — one connector appears twice in the TV's response; merged by port, with CEC names preferred.
Wire hygiene — the TV emits HTML entities and non-breaking spaces in app titles (
Play\xa0Store,Décor d'intérieur); decoded on arrival.Retries — exponential backoff on network errors and 5xx, never on application errors. One JSON-RPC call in flight at a time: the TV's API handles concurrency poorly.
Partial degradation — unreadable fields are listed in
stale_fieldsinstead of failing the whole state.
Known limits
No now-playing information: the TV does not expose it over this API.
Volume is capped client-side (
BRAVIA_MAX_VOLUME, default 40).Selecting an input may wake the device via CEC as a side effect.
The PSK travels in cleartext over HTTP — it is never logged and never accepted as a command-line argument. Environment variable only.
Wake-on-LAN is unreliable over Wi-Fi (randomized MAC).
Tests
pytest63 tests against a fake TV replaying real K-55XR8M2 responses. No network access. ruff, mypy (strict) and basedpyright are part of the checks.
Available Tools
8 toolsget_tv_stateGet Tv StateA
État consolidé de la TV : alimentation, entrée active, application au premier plan, volume, muet.
Retourne un objet avec power ("active" ou "standby"), input (nom et URI de
l'entrée active), foreground_app, volume, muted, reachable et
stale_fields (champs non lus). Ne échoue jamais si la TV répond partiellement.
Inputs: no named parameters. Returns: object
launch_appLaunch AppA
Lance une application par son titre exact.
Le titre doit être celui retourné par list_apps (la casse est ignorée).
Un titre inconnu retourne une erreur APP_NOT_FOUND avec la liste
available. Retourne l'état consolidé après la commande.
Inputs: name (required). Returns: object
list_appsList AppsA
Applications installées sur la TV, indexées par titre.
Chaque application a un title convivial et une uri opaque. Utilisez le
title avec launch_app. La liste est mise en cache 6 heures ; passez
refresh=true pour la forcer.
Inputs: refresh. Returns: result
list_inputsList InputsA
Entrées HDMI de la TV, dédupliquées CEC/HDMI par port.
Chaque entrée a un name convivial, une uri opaque, un port, un kind,
un connected (true si le périphérique est détecté) et un active.
Utilisez le name avec set_input.
Inputs: no named parameters. Returns: result
set_inputSet InputA
Sélectionne une entrée HDMI par son nom exact.
Le nom doit être celui retourné par list_inputs (la casse est ignorée).
Un nom inconnu retourne une erreur INPUT_NOT_FOUND avec la liste
available. Sélectionner une entrée peut réveiller le périphérique via
CEC. Retourne l'état consolidé après la commande.
Inputs: name (required). Returns: object
set_muteSet MuteA
Active ou désactive le mode muet.
on=true coupe le son, on=false le rétablit. Retourne l'état consolidé
après la commande.
Inputs: on (required). Returns: object
set_powerSet PowerA
Allume ou éteint la TV.
on=true allume (avec repli Wake-on-LAN si l'API est injoignable),
on=false met en veille. Retourne l'état consolidé après la commande.
Inputs: on (required). Returns: object
set_volumeSet VolumeA
Règle le volume : level pour une valeur absolue, delta pour un ajustement relatif.
Fournissez exactement un des deux paramètres. Le volume est plafonné côté client (40 par défaut). Retourne l'état consolidé après la commande.
Inputs: delta, level. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct concern: state read, input listing, app listing, power, input selection, app launch, volume, and mute. There is no meaningful overlap between tools, and the descriptions clearly separate current-state queries from available-resource enumerations.
All tool names follow a consistent action_noun pattern using lowercase snake_case: get_, list_, set_, and launch_. The verbs clearly distinguish read operations from control operations, and every noun identifies the resource being acted on.
Eight tools is well within the ideal range for a TV control server. Each tool covers a necessary capability without redundancy or feature bloat.
The set covers the core TV control lifecycle: state, power, inputs, apps, volume, and mute. Advanced operations like remote-key commands or media playback are absent, but they are not essential for the apparent purpose of basic Bravia control.
Maintenance
Related MCP Connectors
Control Android TV from any AI. 38 MCP tools: playback, recap, recommend, smart-home, schedules.
Sonos MCP server: control your Sonos speakers from any MCP client. Play songs, artists and playlists, set volume, group rooms, move music to another room, switch to TV, spoken announcements and reminders. 27 tools, English and Chinese. Works through the official Sonos cloud, so there is no home bridge to install; sign in with OAuth. Requires the free ZoneFoundry iOS app.
Trakt MCP — TV/movie metadata + watch tracking signals
Unlock a world of television with the TV Maze MCP server. Effortlessly search for shows by name or
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables control of Kodi media center through MCP protocol, supporting playback control, library management, navigation, and smart downloads search with automatic file playback.5MIT
- FlicenseNot gradedqualityCmaintenanceEnables remote control of audio playback and system volume on a Raspberry Pi via the Model Context Protocol (MCP).-
- AlicenseNot gradedqualityDmaintenanceEnables control of Sony TVs via IRCC remote commands through Model Context Protocol.MIT
- AlicenseBqualityCmaintenanceEnables controlling LG webOS TVs via MCP, including apps, volume, remote keys, mouse, inputs, channel selection, program guides, screenshots, and Wake-on-LAN power on, without installing additional software on the TV.396 npmMIT