lgtv-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
lgtv-mcp
MCP server (Python 3.12) to control an LG OLED C2 (webOS 22) over LAN.
Streamable HTTP transport (/mcp), required Bearer auth, public healthcheck at /healthz.
Prerequisites
TV and host on the same LAN
TV IP (
LGTV_HOST) and MAC for Wake-on-LAN (LGTV_MAC)Python 3.12+ (local) or Docker
Related MCP server: @mokuichi147/webos-mcp
Tools
get_status- power, input/app, software info, pairedget_settings- readable default keys; optionalpic_mode+tv_input; per-key fallbackset_picture_settings- allowlisted writes, auto backup before writeset_picture_mode/set_input/power_on/power_offapply_preset-ps5/switch2(aliasesps5_hdr,ps5_sdr); variantssdr/hdrbackup_settings/restore_settings/list_backupsnotify- on-screen toast
Presets draw from RTINGS C2, HDTVTest, and nintendolife Switch 2 HDR notes. Game Optimizer / console options stay manual (manual_steps).
Known limits
Live on LG OLED42C26LB (webOS 22, unsigned comp manifest):
Refused picture keys (batch or single):
gameOptimization,gameGenre,inputOptimization,vrr,allm,motionProOLED,localDimming,hdrMode,lowLevelAdjustment,whiteBalanceColorTemperature.truMotionModehas no value in game mode.software_infooften returns 401 with the comp manifest; other status fields may still work.Settings writes work via
set_settings/set_picture_settings(luna alert path) when pairing permissions allow.HDMI /
tv_inputids vary per home (ps5defaults tohdmi3,switch2tohdmi2).
Config
Copy .env.example to .env and set at least MCP_BEARER_TOKEN (long random secret).
Variable | Default | Role |
|
| TV IP |
| (empty) | MAC for WOL |
|
| WOL broadcast |
| (packaged | Override unsigned pairing manifest |
| (empty) | Comma list appended to manifest.permissions at pair (needs |
|
| HTTP bind |
|
| HTTP port |
| (required) | Bearer token |
|
| Pairing key + backups |
Pairing uses the unsigned manifest_comp.json (no signed certificate). Recent LG firmware blacklists the classic signed manifest.
Settings writes use the luna alert trick (createAlert/closeAlert). The comp manifest lacks WRITE_NOTIFICATION_ALERT and WRITE_SETTINGS. Constant EXTRA_PERMISSIONS in code is empty by default; set LGTV_EXTRA_PERMISSIONS=WRITE_NOTIFICATION_ALERT,WRITE_SETTINGS and re-pair with --force if picture/settings writes return insufficient permissions.
Never commit .env or the real token.
Docker deploy
cp .env.example .env # then edit
mkdir -p data
docker compose up -d --buildnetwork_mode: host reaches the TV and sends WOL on the LAN.
Volume ./data:/data keeps the pairing key and backups.
Pairing
Power on the TV; same network as the host.
Run:
export $(grep -v '^#' .env | xargs)
python -m lgtv_mcp.pairAccept the prompt on the TV (up to 90 s). Use
--forceto re-pair (required after changingLGTV_EXTRA_PERMISSIONS).CLI prints redacted TV message summaries and
paired(never the key).Key is stored in
$DATA_DIR/.aiopylgtv.sqlite.
Security notes
Bearer auth is mandatory for
/mcp;/healthzis public and does not touch the TV.Pairing key and token are secrets: keep them in
DATA_DIR/.env, not in git.LAN-only: do not expose this server to the public internet without additional controls.
Local run / tests
python -m venv /tmp/lgtv-venv && source /tmp/lgtv-venv/bin/activate
pip install -e ".[dev]"
export $(grep -v '^#' .env | xargs)
python -m lgtv_mcp
pytestServer: http://$MCP_BIND_HOST:$MCP_PORT/mcp.
Tests mock the TV (no real network).
En bref
Serveur MCP pour piloter un LG OLED C2 en LAN (HTTP streamable, Bearer obligatoire).
Configurer .env (LGTV_HOST=192.168.1.x, LGTV_MAC=AA:BB:CC:DD:EE:FF, MCP_BEARER_TOKEN), appairer avec python -m lgtv_mcp.pair, deployer via docker compose up -d --build.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Multistream relay control: check live status, switch destinations, manage teams, generate overlays.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Query your Twitch streams, events, supporters, raids & rankings from an AI assistant via OAuth.
Remote MCP server for Web3TV creators — manage your account over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceTurns AI assistants like Claude and ChatGPT into a remote control for LG webOS smart TVs, enabling power control, volume, app launching, input switching, and more, all locally without cloud APIs.5MIT
- 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.399 npmMIT
- AlicenseAqualityBmaintenanceLets MCP clients and the command line control LG webOS TVs directly over the local network, discovering and pairing TVs and then launching apps, switching inputs, playing YouTube videos, adjusting volume, pressing remote keys, showing messages, and powering the TV on or off.182MIT
- AlicenseBqualityBmaintenanceEnables agents and operators to control LG webOS TVs over a LAN through MCP, including apps, remote keys, pointer, text, power, discovery, route learning, and visual fallback.171MIT