f579ac37bfacaa4a12b9a70fb67ddab8740f74a6
Core Architecture & Invariant CI / validate (pull_request) Successful in 21s
- Replace recursive _wait_backoff() tail call with iterative loop (CR-01) - Clear _wake_requested in _run_wake() try/finally and on PAIRING_REQUIRED in _connection_loop() so failed wakes cannot busy-spin (CR-02) - Add _reload_requested flag and clear event before flag checks in _wait_backoff() (CR-05) - Replace private _ui_lock access in timeout test with concurrent screenshot() contention (CR-03) - Add regression and contract tests for wake PAIRING_REQUIRED backoff, type_text, list_inputs, switch_input, and raw_ssap (CR-02, CR-04)
lg-smtv-mcp
Model Context Protocol (MCP) server for local network control of LG Smart TVs (webOS) over SSAP WebSockets, Wake-on-LAN, and optional Developer Mode SSH screenshot capture.
Setup
nix develop
Provisions Python 3.14, websockets, mcp, pydantic, asyncssh, uvicorn, httpx, pytest, ruff, and pyright via flake.nix, and configures .githooks/ (ruff check, ruff format --check, pyright, pytest).
Historical PoC & Empirical Notes
Initial feasibility probes and verified device findings (65UR8750PSA / WebOS/4.1.0) are archived in docs/poc/:
- docs/poc/capabilities.md — Verified SSAP/DIAL endpoints, deep-link formats,
401boundaries, and Developer Mode SSH screenshot pipeline. - docs/poc/crunchyroll-e2e-experiment.md — Timed end-to-end vision-loop experiment (Crunchyroll → Attack on Titan Ep 1) and latency findings.
- docs/poc/discover.py — SSDP multicast probe (
--allto list DIAL/DLNA/SSAP services and MAC address). - docs/poc/tv_test.py — One-shot SSAP pairing + command runner.
Design & RFC
- docs/designs/lg-smtv-mcp.md — Architecture RFC for the
lg-smtv-mcpserver.
Description
In-development Python MCP server for persistent, local-network control of LG webOS Smart TVs through SSAP, with Wake-on-LAN, remote input, state tracking, and optional Developer Mode screenshots.
Readme
Unlicense
832 KiB
0 Stars
1 Watchers
0 Forks
Languages
Python
99.1%
Nix
0.7%
Shell
0.2%