PH

paulomac1000/ha-mcp-readonly

API development

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

45 stars 2 forks 품질 85 트렌드 20MIT

paulomac1000/ha-mcp-readonly는 MCP 서버 후보자는 https://github.com/paulomac1000/ha-mcp-readonly.에서 수입했습니다

개요

paulomac1000/ha-mcp-readonly는 MCP 서버 후보자는 https://github.com/paulomac1000/ha-mcp-readonly.에서 수입했습니다

개요(AI 번역)

Read-only MCP (모델 Context Protocol) 서버 for Home Assistant. AI Assistants (Claude Desktop, LibreChat, Cline)을 스마트 홈으로 전체 관찰 가능 - 엔터프라이즈 상태, 자동화, 스크립트, 장치, 로그, 진단 - 모든 쓰기 액세스없이. 또한 RAG 시스템, ChatGPT 프로젝트, Qwen 및 기타 도구에 대한 정적 AI 컨텍스트 스냅 샷을 생성합니다. Python 내장, 로컬에서 실행, Docker, 또는 MCP 통합으로.

요구 사항

  • Python 3.11+ (현지용) 또는 Docker
  • 긴 실시간 액세스 토큰을 가진 홈 어시스턴트 인스턴스
  • HA 프로파일에서 하나를 작성하십시오. ** 설정 → 보안 → 장거리 액세스 토큰 **
  • 홈 어시스턴트 구성 디렉토리에 액세스 (filesystem 도구 용)

빠른 시작

##1. 환경 구성

편집 .env 당신의 자격으로:

IMPORTANT: .env 파일에는 액세스 토큰이 포함되어 있습니다. 그것은 gitignored이고 결코 투입되어야 합니다.

##2. 도커와 함께 실행

먼저, 자격 증명을 구성합니다. .env] file (recommended) 또는 직접 변수를 전달합니다.

** 옵션 A - .env 파일 및 도커 작곡 :**

포함 된 `docker-compose.

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

README

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

HA-MCP-Readonly

Read-only MCP (Model Context Protocol) server for Home Assistant. Gives AI assistants (Claude Desktop, LibreChat, Cline) full observability into your smart home — entity states, automations, scripts, devices, logs, diagnostics — without any write access. Also generates static AI context snapshots for RAG systems, ChatGPT Projects, Qwen, and other tools that accept custom knowledge files. Built in Python, runs anywhere — locally, in Docker, or as an MCP integration.

Requirements

  • Python 3.11+ (for local use) or Docker
  • A Home Assistant instance with a long-lived access token
    • Create one in your HA profile: Settings → Security → Long-Lived Access Tokens
  • Access to your Home Assistant config directory (for filesystem tools)

Quick Start

1. Configure environment

cp .env.example .env

Edit .env with your credentials:

HA_URL=http://your-ha-ip:8123
HA_TOKEN=your_long_lived_access_token_here
# HA_CONFIG_PATH=/config                # optional, default shown
# MCP_DEV_TOOLS_ENABLED=1               # optional, default shown
# HEALTH_CHECK_PORT=9091             # optional, default shown
# MCP_PORT=9092                       # Streamable HTTP port when enabled
# REST_API_PORT=9093                 # optional, default shown
# RUN_TESTS_ON_STARTUP=0             # optional, default shown
# OUTPUT_PATH=/app/output/ha-ai-context.md  # optional, default shown

IMPORTANT: The .env file contains your access token. It is gitignored and must never be committed.

2. Run with Docker

First, configure your credentials. Either use a .env file (recommended) or pass variables directly.

Option A — with .env file and docker compose:

cp .env.example .env
# edit .env with your HA_URL and HA_TOKEN
docker compose up -d

The included docker-compose.yml pulls the image from GitHub Container Registry and mounts your HA config read-only:

services:
  ha-mcp-readonly:
    image: ghcr.io/paulomac1000/ha-mcp-readonly:latest
    container_name: ha-mcp-readonly
    env_file: .env
    environment:
      MCP_TRANSPORT: http
      MCP_BIND_HOST: 0.0.0.0
      MCP_AUTH_TOKEN: ${MCP_AUTH_TOKEN:?Set a strong MCP_AUTH_TOKEN}
    ports:
      - "127.0.0.1:9091:9091"  # health
      - "127.0.0.1:9092:9092"  # authenticated Streamable HTTP MCP
    volumes:
GitHub에서 전체 README 보기

설치

docker run -d \
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "ha-mcp-readonly": { "command": "ha-mcp-readonly", "env": { "HA_URL": "http://homeassistant.local:8123", "HA_TOKEN": "replace-with-a-long-lived-access-token", "HA_CONFIG_PATH": "/path/to/home-assistant/config" } } } }