Yeelight Metadata MCP Server
OfficialClick on "Install 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., "@Yeelight Metadata MCP ServerList all rooms and devices in my home"
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.
Yeelight Metadata MCP Server
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.
This repository contains the home-understanding and management service inside Yeelight MCP. Ordinary users connect the complete Yeelight MCP suite once; they do not choose or install this server separately. Its guarded task interface covers homes, rooms, devices, groups, panels, scenes, automations, favorites, maintenance, and account operations.
New to Yeelight MCP? Follow theofficial English Yeelight MCP tutorial to prepare Yeelight Home, connect the complete Metadata and IoT capability suite, and verify the first real response. A Simplified Chinese tutorial is also available.
Related MCP server: xiaomi-device-control
Yeelight Cloud MCP Suite
Yeelight Metadata MCP and Yeelight IoT MCP form the official Yeelight MCP cloud suite. They are independently deployed services configured together by the ordinary-user setup:
Server | Role in the suite | Core capabilities |
Home understanding and guarded management. | Broad discovery and guarded workflows for homes, rooms, devices, groups, panels, scenes, automations, favorites, maintenance, accounts, multi-region authorization, and request-scoped home selection. | |
Live state and focused control. | Direct topology and live-state access, device control through |
Recommended composition: run one Yeelight MCP setup. It configures both services in the same AI client so the model receives home understanding, management, live state, and control without a second install or scan.
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. When a client cannot install Skills, one cloud setup connects the complete Yeelight MCP suite; the cloud services then execute independently of the local Runtime.
In plain language: this server gives an MCP-only AI a structured view of your
home and guarded ways to manage it. It is not another CLI and it is not
required by yeelight-home or the Smart Home Skill.
Choose this when | Choose something else when |
Your AI client supports MCP but cannot install Agent Skills. | Your client can install Skills: use |
The AI needs rooms, devices, groups, scenes, automations, panels, or home management. | You are scripting or troubleshooting in a terminal: use |
You need to develop or troubleshoot the home-understanding service inside Yeelight MCP. | You only need an existing specialized |
Highlights
Six namespaced tools instead of a large set of low-level HTTP operations.
7 task groups, 23 tasks, and a runtime action catalog.
Safe-by-default execution:
dryRundefaults totrue.Explicit confirmation for S2/S3 side effects.
Candidate actions are blocked from live execution by default.
MCP resources and prompts for task discovery and change planning.
Compatible
METADATA_MCP_*and legacyAPP_MCP_*environment variables.
Hosted Service
The official Streamable HTTP endpoint is:
https://api.yeelight.com/apis/metadata_mcp_server/v1/mcpRequired request header:
Authorization
Recommended optional headers:
Yeelight-Region:cn,sg,us, oreu; defaults to the deployment Region (cnby default)House-Id
Authorization is the only required user credential. When Yeelight-Region is
absent, the server can use the JWT Region claim to select an official endpoint,
then validates the complete token there. Yeelight services derive client identity
from that verified authorization context; users never enter a Client ID. For
actions that need a home, precedence is context.houseId -> House-Id -> first
Pro home in the same Region. The fallback is request-scoped, not a global
current-home state.
MCP Capabilities
Tools:
yeelight_metadata.list_groupsyeelight_metadata.list_housesyeelight_metadata.list_tasksyeelight_metadata.list_actionsyeelight_metadata.get_action_schemayeelight_metadata.execute_task
Resources:
yeelight-metadata://tasksyeelight-metadata://actionsyeelight-metadata://schema/{task}/{action}
Prompts:
yeelight_metadata.inspect_home_metadatayeelight_metadata.plan_metadata_changeyeelight_metadata.troubleshoot_automation_metadata
Treat the live MCP tools/list response as the source of truth for tool schemas.
Quick Start
Recommended: let Yeelight Home complete sign-in and configuration
npm install --global yeelight-home
yeelight-home setup --lang en-US --mode mcp --agent cursor --mcp-source cloud --yesThe command displays the QR code. In Yeelight Pro app, tap Home's top-right +, choose MCP Authorization, and scan it. A single Pro home is selected automatically; only multiple homes require a choice by name. Replace cursor with your client or use --agent auto for detection. The generated client configuration starts a local credential proxy and contains no Authorization value. Manual token configuration remains an advanced compatibility path; never paste a token into an AI chat.
Connect to the hosted server
{
"mcpServers": {
"yeelight-metadata": {
"url": "https://api.yeelight.com/apis/metadata_mcp_server/v1/mcp",
"headers": {
"Authorization": "<YOUR_AUTHORIZATION>",
"Yeelight-Region": "cn",
"House-Id": "<YOUR_HOUSE_ID>"
}
}
}
}Both optional headers may be omitted. A JWT token supplies its Region claim;
opaque tokens use the deployment default. Match an explicitly selected endpoint host to the Region
(api.yeelight.com, api-sg.yeelight.com, api-us.yeelight.com, or
api-de.yeelight.com). To switch homes, call yeelight_metadata.list_houses,
then pass the chosen ID as request.context.houseId on subsequent calls.
See the integration guide for Cursor, Claude Desktop, local source, and combined IoT/Metadata configurations.
Run from source
Requirements: Python 3.10 or newer. Python 3.12 is recommended for local development.
uv venv .venv
source .venv/bin/activate
uv pip install -e '.[test]'
METADATA_MCP_RUNTIME_ENV=local ./service.sh start
./service.sh statusThe local endpoint is http://127.0.0.1:9010/mcp. A request without an
Authorization header returns 401 by design.
Direct startup is also supported:
METADATA_MCP_RUNTIME_ENV=local \
METADATA_MCP_BIND_HOST=127.0.0.1 \
PYTHONPATH=src \
.venv/bin/uvicorn main:streamable_http_app --host 127.0.0.1 --port 9010Safety Model
Every action has an execution mode, side-effect level, status, and parameter schema.
Level | Meaning | Examples |
S0 | Read-only | list, get, search |
S1 | Diagnostic or external activity | diagnose, download, poll |
S2 | Create or update | create, update, configure |
S3 | Destructive or identity-sensitive | delete, unbind, transfer, login |
execute_task defaults to a plan-only request:
{
"request": {
"task": "family_space.manage_room",
"action": "create",
"payload": {"name": "Sample Room"},
"options": {"dryRun": true}
}
}Live S2/S3 execution requires confirmSideEffect=true. Candidate actions also
require allowCandidate=true and are restricted by runtime policy. Start with a
dry run, review plan.httpRequest, then execute only with testable or recoverable
data.
Configuration
Variable | Default | Purpose |
|
|
|
| local/test: | Listen address |
|
| Listen port |
|
| MCP route |
|
| Default Region when |
|
| Yeelight API host |
| host prefix | Explicit API base URL |
|
| Upstream timeout in seconds |
|
| Runtime catalog override |
| environment-dependent | Nacos registration switch |
| environment-dependent | Nacos servers |
|
| Candidate execution gate |
Legacy APP_MCP_* names remain supported for deployment compatibility.
Standard Yeelight cloud origins support per-request Region routing. A custom
API base is fixed to METADATA_MCP_DEFAULT_REGION; requests naming another
Region are rejected instead of being silently misrouted.
Documentation
Development
PYTHONPATH=src python -m pytest -q
python -m compileall -q main.py src tests scriptsThe repository also includes protocol and acceptance utilities under scripts/.
Live acceptance commands can change cloud data; use explicit credentials, a
non-production home, and recoverable fixtures.
License
Licensed under the Apache License 2.0.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceAn MCP server based on the Mastra framework for controlling Xiaomi Mi Home smart devices. It enables device discovery, property management, action execution, and scene control through the Mi Home cloud service.Last updated
- Flicense-qualityFmaintenanceMCP server for controlling Xiaomi/Mi Home smart devices via natural language, supporting device listing, property read/write, action calls, and camera snapshots.Last updated10
- Alicense-qualityBmaintenanceMCP server for managing AdGuard Home instances and AdGuardHome Sync with 33 tools across read, safe-write, and destructive operations, featuring three-tier write gating.Last updated192MIT
- Alicense-qualityCmaintenanceMCP server that enables AI agents to control Xiaomi Mi Home smart devices through natural language, with support for listing devices, controlling properties, and running scenes.Last updatedMIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yeelight/yeelight-metadata-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server