LG Washer MCP Server
LG 洗衣机 MCP 服务器
一个 MCP 服务器,让 AI 助手能够通过 LG 官方的 ThinQ Connect API 监控和控制 LG ThinQ 洗衣机。
它直接通过 HTTP 与 REST API 通信(不使用 LG SDK)。您的**个人访问令牌(PAT)**用作 Bearer 令牌。
API 的工作原理(简版)
认证:
Authorization: Bearer <PAT>。无需 OAuth 流程。区域:您的国家代码决定服务器。印度(
IN)→https://api-kic.lgthinq.com。每个请求还会发送
x-country、x-client-id(您选择的 UUID4)、x-api-key(公钥)、x-message-id(每次请求新生成)、x-service-phase: OP。端点:
GET /devices、GET /devices/{id}/profile、GET /devices/{id}/state、POST /devices/{id}/control。
Related MCP server: SmartThings MCP Server
暴露的工具
工具 | 功能 |
| 找到您洗衣机的 |
| 查看您的型号的可控属性/值。 |
| 实时状态:是否在运行?、周期、剩余时间。 |
|
|
| 发送任意控制 JSON,用于特定型号的属性。 |
⚠️ 大多数 LG 洗衣机只有在机器物理上设置为“远程启动”且已加载周期时,才接受远程 START。API 会恢复/启动预先选定的周期;它通常无法从头开始选择洗涤程序。
设置
uv sync
cp .env.example .env # then edit .env with your PAT运行
配置从环境变量(THINQ_PAT、THINQ_COUNTRY、THINQ_CLIENT_ID)读取。服务器通过 stdio 使用 MCP 协议通信。
THINQ_PAT=xxx THINQ_COUNTRY=IN uv run washer-mcp接入 Claude Desktop / Claude Code
添加到您的 MCP 配置中(例如 claude_desktop_config.json):
{
"mcpServers": {
"lg-washer": {
"command": "uv",
"args": ["--directory", "/Users/sushmanagaraj/c_drive/Coding/LG", "run", "washer-mcp"],
"env": {
"THINQ_PAT": "your-pat-here",
"THINQ_COUNTRY": "IN",
"THINQ_CLIENT_ID": "your-uuid4-here"
}
}
}
}对于 Claude Code 特别说明:
claude mcp add lg-washer --env THINQ_PAT=xxx --env THINQ_COUNTRY=IN -- uv --directory /Users/sushmanagaraj/c_drive/Coding/LG run washer-mcp快速手动测试(无需 MCP 客户端)
uv run python -c "import asyncio, os; from washer_mcp.thinq_client import ThinQClient; \
print(asyncio.run(ThinQClient(os.environ['THINQ_PAT'],'IN',os.environ.get('THINQ_CLIENT_ID','test-id')).list_devices()))"Available Tools
5 toolscontrol_washerA
Start, stop, power off, or wake the washer.
operation must be one of: START, STOP, POWER_OFF, WAKE_UP.
location is the device zone from the profile (default "MAIN"). Location-
scoped washers reject commands that omit it (API error code 2207).
Note: most LG washers only accept a remote START when the machine has been physically set to "Remote Start" and a cycle is already selected/loaded. The API pauses/resumes or starts a pre-selected cycle; it generally cannot pick a wash program from scratch. Call get_washer_profile first to confirm the model supports the operation and to see the exact accepted values.
Inputs: device_id (required), operation (required), location. Returns: result
control_washer_rawA
Escape hatch: send an arbitrary control payload to the washer.
control_json is a JSON object matching the shape shown in the device
profile, e.g. {"operation": {"washerOperationMode": "START"}}. Use this for
model-specific properties (timers, remote-control toggles, etc.) that the
higher-level tools do not cover.
Inputs: device_id (required), control_json (required). Returns: result
get_washer_profileA
Get a washer's capability profile: the exact controllable properties and their allowed values for THIS specific model. Consult this before controlling, because property names/values vary by model.
Inputs: device_id (required). Returns: result
get_washer_statusA
Get the washer's current live state: whether it is running, the current cycle/run state, and remaining time.
Inputs: device_id (required). Returns: result
list_devicesA
List all LG ThinQ devices on the account. Use this to find the washer's deviceId, which every other tool needs.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools are clearly distinct: listing devices, fetching profile, fetching status, and sending commands all serve different purposes. The only mild overlap is between control_washer and control_washer_raw, but the descriptions make the intended boundary clear.
All tools follow a clean snake_case verb_noun pattern: list_devices, get_washer_profile, get_washer_status, control_washer, control_washer_raw. The naming is consistent and predictable.
Five tools is well-scoped for an LG washer MCP server: discovery, model introspection, status, high-level control, and a raw escape hatch. Each tool earns its place without adding redundancy.
The server covers the core washer workflow: find the device, inspect its capability profile, read live status, and issue commands. The raw control tool helps fill model-specific gaps, though common operations like pause/resume are not explicitly exposed beyond the raw payload path.
Maintenance
Related MCP Connectors
Control your Tesla from your AI assistant - climate, charging, access, and security.
AI for your car: check charge, start climate, lock/unlock, open trunk via Tesla Fleet API. OAuth.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides integrated control capabilities for LG ThinQ devices including status monitoring, device control, and profile information through a Model Context Protocol server.440 PyPI36Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables control and monitoring of SmartThings smart home devices through natural language, supporting switches, sensors, refrigerators, and other IoT devices with real-time status queries and command execution.-
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to control DeLonghi ECAM espresso machines over a local network, including brewing beverages, monitoring status, and managing machine settings.16 PyPI1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to monitor a Hyundai, Kia, or Genesis vehicle's charge, fuel, range, locks, and location, and optionally pre-heat the cabin, lock or unlock doors, and start or stop charging. Reads come from cached Bluelink data with rate-limited refreshes, and all write commands are disabled by default.232MIT