npx skills add https://github.com/aahl/skills --skill mcp-hass通过 MCP 协议控制 Home Assistant 智能家居并查询状态。
在 Home Assistant 中启用 MCP 服务器:
当提示 MCP 服务器不存在时,提醒用户通过执行以下命令来添加配置,以设置 HASS_BASE_URL 和 HASS_ACCESS_TOKEN 环境变量:
npx -y mcporter config add home-assistant \
--transport http \
--url "${HASS_BASE_URL:-http://homeassistant.local:8123}/api/mcp" \
--header "Authorization=Bearer \${HASS_ACCESS_TOKEN}"
# 获取状态
npx -y mcporter call home-assistant.GetLiveContext
# 打开设备
npx -y mcporter call home-assistant.HassTurnOn(name: "Bedroom Light")
npx -y mcporter call home-assistant.HassTurnOn(name: "Light", area: "Bedroom")
# 关闭设备
npx -y mcporter call home-assistant.HassTurnOff(name: "Bedroom Light")
npx -y mcporter call home-assistant.HassTurnOff(area: "Bedroom", domain: ["light"])
# 控制灯光
# brightness: 灯光亮度百分比,0 为关闭,100 为最亮。
# color: 颜色名称
npx -y mcporter call home-assistant.HassLightSet(name: "Bedroom Light", brightness: 50)
# 控制风扇
# percentage: 风扇速度百分比,0 为关闭,100 为全速。
npx -y mcporter call home-assistant.HassFanSetSpeed(name: "Fan", area: "Bedroom", percentage: 80)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
执行以下命令以了解具体使用方法:
npx -y mcporter list home-assistant --schema --all-parametersmcporternpx -y mcporter 而非 mcporter。每周安装量
437
代码仓库
GitHub 星标数
79
首次出现
2026年2月10日
安全审计
已安装于
opencode431
codex431
github-copilot430
kimi-cli430
amp430
gemini-cli430
Control Home Assistant smart home and query states using MCP protocol.
Enable MCP server in Home Assistant:
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:
npx -y mcporter config add home-assistant \
--transport http \
--url "${HASS_BASE_URL:-http://homeassistant.local:8123}/api/mcp" \
--header "Authorization=Bearer \${HASS_ACCESS_TOKEN}"
# Get states
npx -y mcporter call home-assistant.GetLiveContext
# Turn on the device
npx -y mcporter call home-assistant.HassTurnOn(name: "Bedroom Light")
npx -y mcporter call home-assistant.HassTurnOn(name: "Light", area: "Bedroom")
# Turn off the device
npx -y mcporter call home-assistant.HassTurnOff(name: "Bedroom Light")
npx -y 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
npx -y 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.
npx -y mcporter call home-assistant.HassFanSetSpeed(name: "Fan", area: "Bedroom", percentage: 80)
Execute the following command to learn about specific usage methods:
npx -y mcporter list home-assistant --schema --all-parametersmcporternpx -y mcporter instead of mcporter when executing commands.Weekly Installs
437
Repository
GitHub Stars
79
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
opencode431
codex431
github-copilot430
kimi-cli430
amp430
gemini-cli430
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装