hass-mcp
hass-mcp
Home Assistant를 제어하고 쿼리하기 위한 오픈 소스 MCP 서버입니다.
전송: stdio
인증: Home Assistant 장기 토큰(long-lived token)
API: Home Assistant REST API
기능
제공되는 도구:
ha_get_state— 엔티티의 상태 가져오기ha_list_states— 모든 상태 나열 (데이터가 많을 수 있음)ha_call_service— 서비스 호출
Related MCP server: ha-mcp
설치
pnpm install
pnpm build실행
export HASS_URL="http://homeassistant.local:8123"
export HASS_TOKEN="<your long-lived access token>"
pnpm startMCP 클라이언트 설정
예시 (개념적):
{
"mcpServers": {
"homeassistant": {
"command": "npx",
"args": ["-y", "hass-mcp"],
"env": {
"HASS_URL": "http://homeassistant.local:8123",
"HASS_TOKEN": "..."
}
}
}
}보안
토큰을 비밀로 취급하십시오.
이 서버를 Home Assistant와 동일한 LAN에서 실행하는 것을 권장합니다.
HA가 Cloudflare Access 뒤에 있는 경우, 이 MCP 서버를 LAN 측에서 실행하십시오.
라이선스
MIT
Available Tools
16 toolsha_area_lights_offA
Turn off all lights in an area (by area_id).
Inputs: area_id (required), transition.
ha_area_lights_onA
Turn on all lights in an area (by area_id).
Inputs: area_id (required), brightness_pct, transition.
ha_call_serviceC
Call a Home Assistant service (domain/service) with data payload.
Inputs: domain (required), service (required), data.
ha_get_error_logsB
Fetch the latest Home Assistant error logs.
Inputs: no named parameters.
ha_get_historyC
Fetch history since an ISO time (optionally for an entity).
Inputs: since (required), end, entity_id, minimal_response.
ha_get_logbookA
Fetch logbook entries since an ISO time (optionally for an entity).
Inputs: since (required), end, entity_id.
ha_get_stateB
Get Home Assistant entity state by entity_id.
Inputs: entity_id (required).
ha_light_turn_offB
Turn off a light by entity_id.
Inputs: entity_id (required).
ha_light_turn_onC
Turn on a light by entity_id.
Inputs: entity_id (required).
ha_list_areasA
List Home Assistant areas from the area registry.
Inputs: no named parameters.
ha_list_devicesA
List Home Assistant devices from the device registry.
Inputs: no named parameters.
ha_list_entity_registryA
List Home Assistant entity registry entries.
Inputs: no named parameters.
ha_list_servicesA
List Home Assistant services and their fields.
Inputs: no named parameters.
ha_list_statesA
List Home Assistant entity states (can be large).
Inputs: no named parameters.
ha_render_templateC
Render a Jinja2 template and return the result.
Inputs: template (required).
ha_update_entity_registryC
Update an entity registry entry (e.g., change name, entity_id, or area_id).
Inputs: entity_id (required), new_entity_id, name, area_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a distinct purpose with clear boundaries. Light control by area vs by entity are separate, state retrieval is split between single and list, and generic service call covers remaining operations without overlap.
All tools follow consistent ha_verb_noun pattern using snake_case, e.g., ha_area_lights_off, ha_get_state, ha_list_areas. No mixing of conventions.
16 tools is well-scoped for a Home Assistant server, covering core operations like state management, entity/area/device queries, history/logs, and template rendering without being overwhelming.
Covers all essential Home Assistant interactions: state queries, listings, light control, service calls, logs, history, and templates. Missing specific tools for common entities like switches or covers, but the generic ha_call_service fills gaps.
Maintenance
Related MCP Connectors
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
An MCP server that provides agents access to the KeldynAI platform
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceEnables control and monitoring of Home Assistant smart home devices through MCP, allowing users to list entities, check device states, and call services to control lights, switches, sensors, and other connected devices.4-
- AlicenseAqualityCmaintenanceA self-hosted MCP server for Home Assistant that exposes full control over entity states, service calls, history, templates, and areas via local stdio, enabling AI assistants to manage your smart home.9MIT
- AlicenseAqualityAmaintenanceA comprehensive MCP server that enables AI assistants to interact with Home Assistant, control smart home devices, query states, execute services, and manage automations via natural language.77137,969 PyPI8,231MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that exposes Home Assistant's REST and WebSocket APIs as 182 tools, enabling clients like Claude Code to control lights, climate, media, automations, and more. It also provides a status dashboard and supports running as a Home Assistant app or container.AGPL 3.0