mcp-hass — скилл для Claude Code: управление Home Assistant через MCP
Скилл подключает агента к Home Assistant по MCP: включает свет, вентилятор, читает состояния устройств. Нужен, когда умный дом хочется дёргать прямо из чата.
npx skills add aahl/skills --skill mcp-hass -a claude-codeЧто делает mcp-hass
Скилл даёт агенту доступ к вашему Home Assistant через MCP-сервер. Он умеет читать текущие состояния и переключать устройства: свет, вентилятор, целые области по имени. Команды уходят через mcporter — утилиту для вызова MCP-инструментов из терминала.
Перед первым запуском включите MCP-сервер в самом Home Assistant: Settings > Devices & services, кнопка добавления интеграции, в списке — Model Context Protocol. Дальше нужны переменные окружения HASS_BASE_URL и HASS_ACCESS_TOKEN. Если агент скажет, что MCP-сервер не найден, значит конфигурация не добавлена — вот тут скилл и напомнит про эти две переменные.
Конфигурация ставится одной командой npx -y mcporter config add home-assistant с транспортом http и заголовком авторизации. Без токена доступа ничего не заработает, потому что Home Assistant отклонит запрос. Полный список параметров каждого инструмента смотрите через npx -y mcporter list home-assistant --schema --all-parameters.
Какие задачи решает
- включить свет в комнате, не открывая приложение Home Assistant
- узнать текущее состояние датчиков и устройств
- выключить все лампы в области одной командой
- задать яркость лампы в процентах
- выставить скорость вентилятора по имени или зоне
Примеры запросов агенту
- включи свет в спальне
- какая сейчас температура в гостиной?
- выключи все лампы в комнате Bedroom
Как установить mcp-hass
1Через Skills CLI (Vercel)
npx skills add aahl/skills --skill mcp-hass -a claude-code2Вручную: положить файлы
~/.claude/skills/mcp-hass/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/mcp-hass/
1Через Skills CLI (Vercel)
npx skills add aahl/skills --skill mcp-hass -a codex2Вручную: положить файлы
.agents/skills/mcp-hass/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add aahl/skills --skill mcp-hass -a cursor2Вручную: положить файлы
.cursor/skills/mcp-hass/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install aahl/skills mcp-hass2Вручную: положить файлы
.github/skills/mcp-hass/SKILL.md1Через Skills CLI (Vercel)
npx skills add aahl/skills --skill mcp-hass -a gemini-cli2Командой платформы
gemini skills install https://github.com/aahl/skills --path skills/mcp-hassВручную: положить файлы
.devin/skills/mcp-hass/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add aahl/skills --skill mcp-hass -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о mcp-hass
Как установить mcp-hass в Claude?
Выполните npx skills add aahl/skills --skill mcp-hass -a claude-code. Скилл появится в ~/.claude/skills/mcp-hass/SKILL.md.
Что делает mcp-hass?
Подключает агента к Home Assistant по MCP и позволяет читать состояния устройств, включать и выключать свет, менять яркость и скорость вентилятора.
Что нужно настроить до работы со скиллом?
Включить интеграцию Model Context Protocol в Home Assistant и задать переменные HASS_BASE_URL и HASS_ACCESS_TOKEN, затем добавить конфигурацию через npx -y mcporter config add home-assistant.
Исходный текст
SKILL.md · MIT
---
name: mcp-hass
description: The skill for control Home Assistant smart home devices and query states using MCP protocol.
---
# 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.
## 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
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}"
```
## Usage
```shell
# 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-parameters`
## About `mcporter`
- To improve compatibility, use `npx -y mcporter` instead of `mcporter` when executing commands.
- 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
© aahl · MIT · aahl/skills