
Yeelight IoT MCP Server
io.github.Yeelight由 GitHub 帳號 Yeelight 發布v0.1.0更新於 Oct 25, 2026
Yeelight device discovery, state, control, and scene execution.
概覽
Yeelight 官方雲端 MCP 伺服器,讓助理探索 Yeelight Pro 家庭中的區域、房間、裝置、群組與情境,並預覽或執行裝置控制與情境。
- 可以做什麼
- 讀取目前選定的家庭,列出區域、房間、裝置、群組與情境,支援游標分頁,裝置與群組可依房間篩選。預覽或執行裝置節點屬性指令,預設為試執行。預覽或執行情境,預設為試執行。
- 適用情境
- 適用於既有或專用整合需要直接讀取 Yeelight Pro 家庭即時狀態並進行聚焦控制的情況,包括 control_node 與 execute_scene 工具。一般使用者較適合使用合併的 Yeelight MCP 安裝方式,而非單獨安裝此伺服器。
- 執行需求
- 遠端 Streamable HTTP 端點,位於 Yeelight 官方 API 主機;或以 Python 3.10 以上與 uv 進行本機部署。每個請求都必須提供 Yeelight Authorization 權杖;Yeelight-Region 與 House-Id 標頭為選用。本機部署仍會呼叫 Yeelight 雲端 API,並非離線閘道。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Yeelight IoT MCP Server,將其新增到工作區。
- 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.Yeelight%2Fyeelight-iot-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"yeelight-iot": {
"type": "http",
"url": "https://api.yeelight.com/apis/mcp_server/v1/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
Yeelight IoT MCP
Official Repository And Mirrors
GitHub is the canonical source for issues, contributions, CI, and releases. Read-only mirrors are available on Gitee and GitCode for users who cannot reach GitHub reliably, with GitLab.com as an additional global fallback. Clone from any reachable source, but report issues and contribute changes on GitHub.
[!IMPORTANT] New to Yeelight MCP? Use one Yeelight MCP setup instead of installing this repository separately.
The setup configures this live-state/control service and Yeelight Metadata MCP together. This repository remains the developer reference for its specialized server, endpoint, and tools.
Follow the official English Yeelight MCP tutorial for the complete beginner path, or open the Simplified Chinese tutorial.
Yeelight Cloud MCP Suite
This repository is the focused-control part of the official Yeelight cloud MCP suite. Ordinary users receive both independently deployed services as one capability group through the same setup:
Recommended composition: run one Yeelight MCP setup so both services are available without a second install or scan.
Which MCP should I use?
Place In Yeelight AI
yeelight-home provides the recommended installation, QR sign-in, and client-configuration flow. Ordinary users should prefer the complete yeelight-smart-home Skill; MCP-only clients run one cloud setup for the complete Yeelight MCP suite. The cloud services then execute independently of the local Runtime.
In plain language: ordinary users do not install this server separately. It is included by the unified setup and remains independently addressable for existing or specialized integrations. It is not a dependency of Yeelight Home or either Skill.
Existing and specialized IoT MCP integrations
Yeelight IoT MCP is the official focused Model Context Protocol server for Yeelight Pro homes. It lets MCP clients discover homes, areas, rooms, devices, groups, and scenes, read current capabilities, prepare safe device controls, and execute confirmed controls or scenes. The following documentation remains the supported reference for existing and specialized integrations.
For the suite overview and recommended default setup, return to Yeelight Metadata MCP.
Capabilities
- Streamable HTTP MCP transport.
- Official hosted endpoint or self-hosted source deployment.
- Eight tools for topology discovery, device control, and scene execution.
- Cursor pagination for area, room, device, group, and scene lists.
- Dry-run by default for device control and scene execution.
- Redacted control plans and explicit side-effect confirmation.
Requirements
- Python 3.10 or later for local deployment.
uvfor the documented local workflow.- A Yeelight Authorization token. Region and House ID are optional.
Recommended: let Yeelight Home complete sign-in and configuration
The command displays a QR code. In Yeelight Pro app Home, tap the top-right +, choose MCP Authorization, and scan it. One Pro home is selected automatically; multiple homes are presented by name. Cloud mode configures Metadata and IoT MCP together through local credential proxies, without copying Authorization into the AI client's configuration. Manual token configuration remains an advanced compatibility path.
Hosted Service
Use the official Streamable HTTP endpoint:
Required request header:
Optional headers are Yeelight-Region and House-Id. The server accepts a raw
token or a value prefixed with Bearer. When Region is omitted, a JWT Region
claim selects the official endpoint before the complete token is validated.
When House ID is omitted, the server selects the first Pro home in that Region.
Users never configure a Client ID; IoT upstream calls derive it from the
validated JWT when required, falling back to dev in the development Region
and iot-app in cn, sg, us, or eu.
Local Development
The local MCP URL is http://127.0.0.1:9000/mcp. Local deployment still uses Yeelight cloud APIs; it is not an offline gateway. Every request must provide an explicit Authorization header regardless of bind address or runtime environment. The service never reads an operator's CLI Profile; tests may use an explicit isolated credential provider. Nacos registration is disabled by default in the public project and can be enabled explicitly through environment variables.
MCP Client Configuration
Restart the MCP client after changing its configuration, then verify that
tools/list returns the Yeelight tools.
Tools
For request examples and operating rules, read the usage guide. For client and deployment details, read the integration guide.
Safety Model
control_node and execute_scene default to dryRun=true. A live operation
requires both dryRun=false and confirmSideEffect=true. Callers should:
- Resolve names to current IDs using read tools.
- Inspect the target's supported properties and operators.
- Generate and review a dry-run plan.
- Obtain user confirmation in the calling application.
- Execute once and query the resulting state when possible.
The control property rs is blocked by the current safety policy. Do not retry
failed writes or scene executions blindly.
Configuration
Common environment variables for local deployments:
Test
Tests cover JWT claim handling, multi-Region routing, local Profile isolation, Pro home fallback, authorization normalization, pagination, redacted plans, dry-run defaults, confirmation guards, and configuration overrides. They do not call the live Yeelight cloud.
License
來源:README.md,提交 4d441cd
工具
0版本歷史
1- v0.1.0最新Oct 12, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分