lgtv-mcp
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., "@lgtv-mcpapply the ps5 picture preset to my 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.
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: lg-tv-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.
This server cannot be deployed
Maintenance
Related MCP Connectors
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.
- sleipnirOAuthtv.sleipnir
Multistream to Twitch, YouTube and Kick; generate OBS overlays from a plain-English prompt.
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server for controlling LG webOS TVs via SSAP protocol, enabling AI clients to adjust settings, switch inputs, launch apps, and more.3721 npm1MIT
- 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.1MIT
- 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
- 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.395 npmMIT