技能详情(站内镜像,无评论)
作者:Alone @al-one
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.1
统计:⭐ 7 · 2.7k · 14 current installs · 14 all-time installs
⭐ 7
安装量(当前) 14
🛡 VirusTotal :良性 · OpenClaw :良性
Package:al-one/mcp-hass
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
The skill's requests and instructions match its stated purpose (controlling Home Assistant via MCP); required env vars and the mcporter tool are proportionate and expected.
目的
Name/description (Home Assistant via MCP) align with requirements: mcporter (or npx) is the MCP CLI and HASS_ACCESS_TOKEN/HASS_BASE_URL are exactly what a Home Assistant MCP client needs.
说明范围
SKILL.md only instructs using mcporter (or npx mcporter) to call MCP methods and to configure mcporter with HASS_BASE_URL/HASS_ACCESS_TOKEN; it does not request unrelated files, credentials, or system-wide data.
安装机制
Install spec uses the 'mcporter' npm package (node). This is an expected way to obtain the MCP CLI but is a moderate-risk install vector (public registry package will be installed/placed on disk). Verify the mcporter package/source before installing.
证书
Only HASS_ACCESS_TOKEN (primary) and HASS_BASE_URL are required. Both are necessary and proportionate for connecting to a Home Assistant MCP endpoint.
持久
The skill does not request always:true and is not asking to modify other skills or system configs; it runs on-demand or autonomously per platform defaults (normal for skills).
综合结论
This skill appears to be what it says: it uses the mcporter CLI to talk to a Home Assistant MCP endpoint and needs your HASS_BASE_URL and HASS_ACCESS_TOKEN. Before installing: 1) Verify you trust the mcporter npm package (review its GitHub repo/source and recent releases) instead of blindly installing from npm. 2) Use a Home Assistant token with minimal necessary scope and treat it like a secret; don't paste it into public places. 3) Prefer us…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「🏠 Home Assistant via MCP protocol」。简介:The skill for control Home Assistant smart home devices and query states using …。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/al-one/mcp-hass/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: mcp-hass
description: The skill for control Home Assistant smart home devices and query states using MCP protocol.
homepage: https://home-assistant.io/integrations/mcp
metadata:
{
"openclaw":
{
"emoji": "🏠",
"requires": { "anyBins": ["mcporter", "npx"], "env": ["HASS_ACCESS_TOKEN", "HASS_BASE_URL"] },
"primaryEnv": "HASS_ACCESS_TOKEN",
"install":
[
{
"id": "node",
"kind": "node",
"package": "mcporter",
"bins": ["mcporter"],
"label": "Install mcporter (node)",
},
],
},
}
---
# Home Assistant
Control Home Assistant smart home and query states using MCP protocol.
## Prerequisites
Enable MCP server in Home Assistant:
- Browse to your Home Assistant instance.
- Go to Settings > Devices & services.
- In the bottom right corner, select the [+ Add Integration](https://my.home-assistant.io/redirect/config_flow_start?domain=mcp) button.
- From the list, select Model Context Protocol.
- Follow the instructions on screen to complete the setup.
## Usage
```shell
# Get states
mcporter call home-assistant.GetLiveContext
# Turn on the device
mcporter call home-assistant.HassTurnOn(name: "Bedroom Light")
mcporter call home-assistant.HassTurnOn(name: "Light", area: "Bedroom")
# Turn off the device
mcporter call home-assistant.HassTurnOff(name: "Bedroom Light")
mcporter call home-assistant.HassTurnOff(area: "Bedroom", domain: ["light"])
# Control light
# brightness: The percentage of the light, where 0 is off and 100 is fully lit.
# color: Name of color
mcporter call home-assistant.HassLightSet(name: "Bedroom Light", brightness: 50)
# Control fan
# percentage: The percentage of the fan, where 0 is off and 100 is full speed.
mcporter call home-assistant.HassFanSetSpeed(name: "Fan", area: "Bedroom", percentage: 80)
```
Execute the following command to learn about specific usage methods:
- `mcporter list home-assistant --schema --all-parameters`
## Config
When prompted that the MCP server does not exist, remind the user to configure the `HASS_BASE_URL` and `HASS_ACCESS_TOKEN` environment variables by executing the following command to add the configuration:
```shell
mcporter config add home-assistant
--transport http
--url "${HASS_BASE_URL:-http://homeassistant.local:8123}/api/mcp"
--header "Authorization=Bearer ${HASS_ACCESS_TOKEN}"
```
## About `mcporter`
- When command `mcporter` does not exist, use `npx -y mcporter` instead.
- https://github.com/steipete/mcporter/raw/refs/heads/main/docs/call-syntax.md
- https://github.com/steipete/mcporter/raw/refs/heads/main/docs/cli-reference.md