Skip to main content
Glama
hass-mcp

hass-mcp

by TheWhykiki

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 start

MCP 클라이언트 설정

예시 (개념적):

{
  "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 tools
ha_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

    A3.5/5.0

    Scored across 16 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      Not graded
      maintenance
      Enables 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
      -
    • A
      license
      A
      quality
      C
      maintenance
      A 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.
      9
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      A 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.
      77
      137,969 PyPI
      8,231
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      An 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