
Shelly Smart Home
io.github.Buggy1111由 GitHub 帳號 Buggy1111 發布v0.1.3更新於 Oct 25, 2026
Local-first MCP server for Shelly smart-home devices (Gen1-Gen4): control, energy, automation.
概覽
針對 Shelly 智慧家庭裝置(Gen1–Gen4)的本地優先 MCP 伺服器,讓助理在區域網路內探索、讀取、控制與自動化裝置。
- 可以做什麼
- 探索裝置並讀取版本、資訊、狀態、設定、元件與方法,設定輸出中的憑證會被遮蔽,狀態經過正規化。控制開關、燈(RGBW/CCT/白光)與窗簾,所有變更操作都會寫入稽核日誌。讀取即時與歷史能耗資料。提供唯讀的通用 RPC 引擎與帶閘門的寫入引擎,涵蓋完整 API。在 Gen2+ 裝置上管理排程、系統操作、鍵值儲存、Webhook、裝置端腳本與虛擬元件。定義並執行存放在本地場景檔中的具名多裝置場景。
- 適用情境
- 當你希望助理操作自己區域網路內的 Shelly 智慧家庭硬體——開關燈、移動窗簾、查看能耗或設定排程與場景——而不是只依賴雲端整合時使用。適合擁有 Shelly 裝置、想要本地控制並可選雲端備援以在區域網路外存取的使用者。
- 執行需求
- 以 Python 套件形式在本機執行(uvx 或 pip install)。執行機器需與裝置處於同一區域網路;在 WSL 或容器中 mDNS 自動探索通常不可用,因此可在使用者設定目錄下的設定檔中依 IP 設定裝置。裝置密碼可在設定中依裝置設定,或透過 SHELLY_PW_ 環境變數提供;雲端備援需要 SHELLY_CLOUD_AUTH_KEY。設定檔若含密鑰必須 chmod 600。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Shelly Smart Home,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
shelly-mcp
mcp-name: io.github.Buggy1111/shelly-mcp
MCP server for the entire Shelly smart-home ecosystem — read, control, and automate Shelly devices of every generation (Gen1 → Gen4; BLU via its gateway or the generic RPC engine, dedicated BLU tools are on the roadmap) from any MCP client (Claude Desktop, Claude Code, Cursor, …). Local-first (zero rate-limit, ~10 ms, full API), with cloud fallback for off-LAN access.
⚠️ Unofficial community project. Not affiliated with, endorsed by, or sponsored by Allterco Robotics / Shelly. "Shelly" is a trademark of its respective owner.
🚧 Alpha / in development. See
docs/for the full design.
Why
The only existing Shelly MCP servers are cloud-only and minimal. shelly-mcp unifies Gen1 and Gen2+ behind one tool surface, covers energy monitoring and automation (schedules, scripts, webhooks, KVS), and auto-discovers any device's capabilities — including hardware released after this server was written.
Install
Register in your MCP client:
Configure
Auto-discovery (mDNS) finds devices on your local subnet — shelly_discover and you're running. For named devices ("turn off the kitchen"), devices on other subnets, passwords, or the cloud fallback, create ~/.config/shelly-mcp/config.yaml (chmod 600):
Full reference: config.example.yaml and docs/04-CONFIG-AND-DEPLOY.md.
What data leaves your machine
None, beyond the calls to your own Shelly devices (on your LAN) and — only if you enable it — your own Shelly Cloud account. No telemetry, no phone-home.
Capabilities (local vs cloud)
Tools, resources & prompts
Read (safe): shelly_version · shelly_discover · shelly_list_devices · shelly_get_info · shelly_get_status (normalized) · shelly_get_config (credentials masked) · shelly_list_components · shelly_list_methods
Control (audited): shelly_switch_set · shelly_switch_toggle · shelly_light_set (RGBW/CCT/white) · shelly_cover_move
Energy: shelly_energy_live · shelly_energy_history
Generic engine (total coverage): shelly_rpc (read-only) · shelly_rpc_write (mutations, confirm:true + data-loss double-gate)
System / schedules (gated): shelly_system_reboot|update|set_auth · shelly_schedule_list|create|update|delete
Automation (Gen2+ local-only): shelly_kvs_* (key-value store) · shelly_webhook_* (event→HTTP) · shelly_script_* (on-device JS — list/get_code/create/put_code/start/stop/eval/delete, chunked upload) · shelly_virtual_* (virtual components). Deletes + arbitrary-code paths (script_put_code/eval) are confirm:true-gated.
Scenes (deterministic, named): shelly_scene_list|get|run|create|delete — define a multi-device routine once and run it by name (shelly_scene_run "film"), identical every time and schedulable from any client. Stored in ~/.config/shelly-mcp/scenes.yaml (see scenes.example.yaml); scenes and schedules accept only plain control methods (Switch/Light/RGB(W)/CCT/Cover) — never Script.Eval, SetAuth, or anything destructive (ADR-007, docs/06-SCENES.md).
Resources: shelly://devices, shelly://device/{name}/status — Prompts: shelly_evening_scene, shelly_energy_report, shelly_diagnose
Safety: reads are
readOnlyHint; every mutation is audit-logged; the generic write tool and destructive system tools require explicitconfirm:true, and irreversible methods (factory reset, wipe-all) need a secondi_understand_data_lossgate — so even a hijacked LLM can't silently destroy a device.
Troubleshooting
- "Device unreachable" — confirm the IP (
shelly_discover, your router's client list, or the Shelly app → device → Settings → Device information), and that the machine running the server is on the same LAN. In WSL/containers, mDNS discovery usually doesn't work — configure devices byipin the config file instead (that path needs no mDNS). - "Auth required" — the device has a password: add
password:under the device in the config (orSHELLY_PW_<name>env var). - Cloud-only device refuses automation tools — expected: the Shelly Cloud API can't manage schedules/scripts/webhooks/KVS; connect locally for those.
- Config refuses to load — if it contains a secret, it must be
chmod 600(deliberate, fail-closed).
Docs
Full design in docs/ (indexed): overview, architecture (+ADRs), tool surface, security, scenes, config/deploy, build plan, project log, roadmap, the launch runbook, and the complete Shelly API catalog.
License
MIT — see LICENSE.
來源:README.md,提交 48372bd
工具
0版本歷史
2- v0.1.3最新Oct 16, 2026
- v0.1.2Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分