Home Assistant MCP
홈 어시스턴트 MCP
AI 어시스턴트를 사용하여 Home Assistant 기기를 제어하기 위한 MCP(모델 컨텍스트 프로토콜) 통합.
개요
이 MCP를 통해 AI 어시스턴트가 Home Assistant 기기를 제어할 수 있습니다. 다음과 같은 도구를 제공합니다.
Home Assistant 인스턴스에서 엔터티 검색
장치 제어(켜기/끄기)
조명 색상 및 밝기 제어
Related MCP server: Hass-MCP
필수 조건
Python 3.11 이상
API를 통해 실행 중이고 접근 가능한 Home Assistant 인스턴스
홈 어시스턴트 장기 액세스 토큰
설치
이 저장소를 복제하세요
Python 환경 설정:
지엑스피1
구성
Home Assistant 장기 액세스 토큰 받기
Home Assistant 인스턴스로 이동하세요
프로필로 이동합니다(사이드바에서 사용자 이름을 클릭합니다)
"장기 액세스 토큰"까지 아래로 스크롤하세요.
"MCP 통합"과 같은 설명적 이름으로 새 토큰을 만듭니다.
토큰을 복사하세요(한 번만 볼 수 있습니다)
Cursor AI에 설정
Cursor의 MCP 구성에 다음 구성을 추가하세요.
{
"mcpServers": {
"home_assistant": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/home-assistant-mcp",
"run",
"main.py"
],
"env": {
"HOME_ASSISTANT_TOKEN": "your_home_assistant_token_here"
},
"inheritEnv": true
}
}
}바꾸다:
/path/to/your/home-assistant이 디렉토리의 실제 경로로 지정합니다.Home Assistant 장기 액세스 토큰과 함께
your_home_assistant_token_here사용하세요.
홈 어시스턴트 URL 구성
기본적으로 MCP는 http://homeassistant.local:8123 에서 Home Assistant에 연결을 시도합니다.
Home Assistant가 다른 URL에 있는 경우 app/config.py 에서 HA_URL 변수를 수정할 수 있습니다.
용법
구성이 완료되면 Cursor AI를 사용하여 Home Assistant 기기를 제어할 수 있습니다.
기기 검색: "내 거실 조명 찾기"
제어 장치: "주방 불 켜줘"
조명 색상 제어: "거실 조명을 빨간색으로 설정"
밝기 조정: "식당 조명을 50% 밝기로 파란색으로 설정해 주세요"
조명 제어 기능
MCP는 이제 고급 조명 제어 기능을 지원합니다.
색상 제어 : 호환되는 조명에 대한 RGB 색상을 설정합니다.
RGB 값(각 구성 요소에 대해 0~255)을 사용하여 색상을 지정합니다.
예: 빨간색의 경우
set_device_color("light.living_room", 255, 0, 0)
밝기 조절 : 조명 밝기를 조절합니다
선택적 밝기 매개변수(0-255)
색상 변경과 결합 가능
예: 중간 밝기의 파란색을 원할 경우
set_device_color("light.dining_room", 0, 0, 255, brightness=128)
문제 해결
인증 오류가 발생하면 토큰이 올바르고 만료되지 않았는지 확인하세요.
구성된 URL에서 Home Assistant 인스턴스에 접속 가능한지 확인하세요.
색상 제어 문제의 경우:
조명 엔티티가 RGB 색상 제어를 지원하는지 확인하세요.
색상 변경을 시도하기 전에 조명이 켜져 있는지 확인하세요.
미래 역량
동적 엔터티 노출
현재 구현에는 장치를 제어하기 위한 2단계 프로세스가 필요합니다.
자연어를 사용하여 엔터티 검색
특정 entity_id를 사용하여 엔터티를 제어합니다.
계획된 개선 사항은 엔터티를 제어 장치 도구에 노출하는 보다 동적인 방식을 만들어 AI가 다음을 수행할 수 있도록 하는 것입니다.
보다 자연스러운 명령(예: "주방 조명 끄기")을 통해 장치를 직접 제어합니다.
더 빠른 액세스를 위해 자주 사용되는 엔터티를 캐시합니다.
밝기, 온도 또는 기타 속성 조정과 같은 보다 복잡한 작업 지원
엔티티 그룹과 장면을 보다 직관적으로 처리합니다.
이를 통해 AI 어시스턴트를 통해 Home Assistant 기기를 제어할 때 작업 시간이 크게 단축되고 더욱 원활한 사용자 경험이 제공될 것입니다.
Available Tools
3 toolscontrol_deviceB
Control a Home Assistant entity by turning it on or off.
Args:
entity_id: The Home Assistant entity ID to control (format: domain.entity)
state: The desired state ('on' or 'off')
Inputs: entity_id (required), state (required).
search_entitiesA
Search for Home Assistant entities matching a natural language description.
Args:
description: Natural language description of the entity (e.g., "office light", "kitchen fan")
Returns:
A list of matching entity IDs with their friendly names, or an error message
Inputs: description (required).
set_device_colorA
Set the color and optionally brightness of a light entity.
Args:
entity_id: The Home Assistant entity ID to control (format: light.entity)
red: Red component (0-255)
green: Green component (0-255)
blue: Blue component (0-255)
brightness: Optional brightness level (0-255)
Inputs: entity_id (required), red (required), green (required), blue (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap. control_device handles basic on/off states, search_entities finds devices by description, and set_device_color manages color/brightness for lights. An agent can easily distinguish when to use each tool based on the specific operation needed.
All three tools follow a consistent verb_noun pattern with snake_case throughout: control_device, search_entities, and set_device_color. The naming is predictable and follows the same grammatical structure, making the tool set easy to understand at a glance.
With only 3 tools, this feels thin for a Home Assistant integration that presumably manages many device types and operations. While the tools cover basic control, search, and color settings, the scope suggests more operations would be needed for comprehensive home automation coverage. The count is borderline minimal for the domain.
There are significant gaps in the tool surface for home automation. Missing operations include getting device status/state, adjusting non-color attributes (like temperature for thermostats or speed for fans), managing scenes/automations, and handling other entity types beyond lights. The current tools provide only partial coverage of the Home Assistant domain.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
An MCP server that integrates with Discord to provide AI-powered features.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.3MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact directly with Home Assistant, allowing them to query device states, control smart home entities, and perform automation tasks.29353MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows large language models to control and query Home Assistant smart home systems through natural language interactions.28 npm5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Home Assistant devices and services through the Model Context Protocol.106MIT