/install mcp-hass
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 button.
- From the list, select Model Context Protocol.
- Follow the instructions on screen to complete the setup.
Usage
# 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:
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
mcporterdoes not exist, usenpx -y mcporterinstead. - 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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install mcp-hass - 安装完成后,直接呼叫该 Skill 的名称或使用
/mcp-hass触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
🏠 Home Assistant via MCP protocol 是什么?
The skill for control Home Assistant smart home devices and query states using MCP protocol. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 5072 次。
如何安装 🏠 Home Assistant via MCP protocol?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install mcp-hass」即可一键安装,无需额外配置。
🏠 Home Assistant via MCP protocol 是免费的吗?
是的,🏠 Home Assistant via MCP protocol 完全免费(开源免费),可自由下载、安装和使用。
🏠 Home Assistant via MCP protocol 支持哪些平台?
🏠 Home Assistant via MCP protocol 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 🏠 Home Assistant via MCP protocol?
由 Alone(@al-one)开发并维护,当前版本 v1.0.1。