RH

robbrad/homeassistant-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

106 stars 6 forks 품질 74 트렌드 0MIT

robbrad/homeassistant-mcp는 [[T0]에서 임포트 온 MCP 서버 후보입니다.

개요

robbrad/homeassistant-mcp는 [[T0]에서 임포트 온 MCP 서버 후보입니다.

개요(AI 번역)

AI 비서가 Home Assistant를 제어할 수 있게 하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 파이썬과 FastMCP로 구축되었습니다.

Claude, GPT-4, Cursor, Kiro 및 모든 MCP 호환 클라이언트와 호환됩니다.

그것이 하는 일들

  • 조명, 기후, 커버, 자물쇠, 미디어 플레이어, 청소기, 선풍기, 카메라, 경보 등 40개의 도구**
  • BM25 도구 검색 — LLM은 40개의 스키마를 모두 미리 받는 대신 주문형 툴을 발견합니다
  • 읽기 전용 엔터티, 영역, 장치 및 서비스 데이터를 위한 MCP 리소스
  • **MCP 프롬프트: 자동화 생성, 문제 해결, 에너지 최적화 등 안내된 워크플로우 안내
  • 도구 주석 — readOnlyHint는 클라이언트가 안전한 작업을 위해 확인 프롬프트를 건너뛸 수 있게 해줍니다
  • 스마트 오류 로그 구문 분석 — 원시 텍스트를 덤프하는 대신 HA 오류 로그를 중복 제거하고 요약합니다
  • 문맥 인식 응답 — 압축된 목록 응답, 도메인 필터링 쿼리, 진행 상황 보고
  • **API 부하를 줄이기 위한 TTL 기반 캐싱을 통한 비동기 전반

설치

UVX (추천)

설치는 필요 없습니다. MCP 클라이언트만 설정하세요:

피프

출처에서

구성

서버는 두 가지 환경 변수가 필요합니다:

변수 설명

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Home Assistant MCP Server

A Model Context Protocol (MCP) server that lets AI assistants control Home Assistant. Built with Python and FastMCP.

Works with Claude, GPT-4, Cursor, Kiro, and any MCP-compatible client.

What it does

  • 40 tools covering lights, climate, covers, locks, media players, vacuums, fans, cameras, alarms, and more
  • BM25 tool search — LLMs discover tools on demand instead of receiving all 40 schemas upfront
  • MCP Resources for read-only entity, area, device, and service data
  • MCP Prompts for guided workflows (automation creation, troubleshooting, energy optimization)
  • Tool annotations — readOnlyHint lets clients skip confirmation prompts for safe operations
  • Smart error log parsing — deduplicates and summarises HA error logs instead of dumping raw text
  • Context-aware responses — compact list responses, domain-filtered queries, progress reporting
  • Async throughout with TTL-based caching to reduce API load

Installation

No install needed. Just configure your MCP client:

{
  "mcpServers": {
    "homeassistant": {
      "command": "uvx",
      "args": ["homeassistant-mcp"],
      "env": {
        "HASS_HOST": "http://homeassistant.local:8123",
        "HASS_TOKEN": "your_long_lived_access_token_here"
      }
    }
  }
}

pip

pip install homeassistant-mcp
homeassistant-mcp

From source

git clone https://github.com/robbrad/homeassistant-mcp.git
cd homeassistant-mcp
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -e ".[dev]"
homeassistant-mcp

Configuration

The server needs two environment variables:

Variable Description
HASS_HOST Home Assistant URL, e.g. http://homeassistant.local:8123
HASS_TOKEN Long-lived access token (how to create one)

Optional:

Variable Default Description
CACHE_TTL_STATES 30 Cache TTL for bulk state queries (seconds)
CACHE_TTL_ENTITY 10 Cache TTL for individual entity queries (seconds)
LOG_LEVEL INFO Logging level

These can be set via environment variables (as shown in the MCP client configs above) or in a .env file. See .env.example.

MCP Client Setup

Claude Desktop

Add to your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "homeassistant": {
      "command": "uvx",
      "args": ["homeassistant-mcp"],
      "env": {
        "HASS_HOST": "http://homeassistant.local:8123",
        "HASS_TOKEN": "your_token_here"
      }
    }
  }
}

Cursor / Kiro / Other MCP Clients

GitHub에서 전체 README 보기

설치

uvx homeassistant-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "homeassistant": { "command": "uvx", "args": ["homeassistant-mcp"], "env": { "HASS_HOST": "http://homeassistant.local:8123", "HASS_TOKEN": "your_long_lived_access_token_here" } } } }