Skip to main content
Glama
Devitek

mcp-ha

by Devitek

mcp-ha: Home Assistant 用の MCP サーバー(アドオンとして)

CI Release MIT License

この Home Assistant アドオンは、MCP(Model Context Protocol)サーバーを公開します。実際には、Claude、Gemini、またはその他の MCP クライアントをインスタンスに接続して、家と会話します。

「どの照明が点けっ放しだった?」「昨夜、暖房の自動化が作動しなかったのはなぜ?」「今週のエネルギー使用量をプロットして。」

ドキュメント: devitek.github.io/mcp-ha(英語とフランス語)

対象範囲

ドメイン

ツール

エンティティ、エリア、デバイス

あいまい検索、ページネーション付きリスト、完全な詳細

サービス

ドメインごとのカタログ、検索、保護付き呼び出し(オプトイン)

オートメーション

一覧、状態、最終トリガー、完全な設定

スクリプト

一覧、実行状態

履歴

状態変更、長期統計、ログブック

アドオン

一覧と詳細(読み取り)

システム

Jinja テンプレートのレンダリング、HA 設定、エラーログ

合計 16 のツールがあり、LLM のコンテキストウィンドウを節約するように設計されています。コンパクトでページネーションされ、上限付きの応答と、アシスタントをより正確なクエリに導くメモが含まれます。

Related MCP server: hass-mcp

公式の HA MCP インテグレーションを使わない理由

それは存在し、動作しますが、Assist API を経由します。Assist に公開されたエンティティのみで、履歴、レジストリ、アドオン、オートメーション設定はありません。このアドオンは、直接かつ詳細なアクセスを提供します。両方共存できます。

インストール

要件: Home Assistant OS または Supervised(アドオンには Supervisor が必要です)。

  1. このリポジトリをアドオンリポジトリに追加します:

    Add repository

    または手動で: 設定、アドオン、アドオンストア、三点リーダーメニュー、リポジトリ、そして https://github.com/Devitek/mcp-ha を貼り付けます。

  2. 「MCP Home Assistant」をインストールして起動します。

  3. アドオンの「設定」タブを開きます。初回起動時に API トークンが生成され、そこに保存されています(アドオンのログにも出力されます)。

クライアントの接続

Claude Code:

claude mcp add --transport http home-assistant \
  http://HA_IP:9583/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Claude Desktop と Gemini CLI: ドキュメントサイトの クライアントガイド を参照してください。

セキュリティ(概要)

  • デフォルトでは読み取り専用。 サービス呼び出しツールは、allow_write を有効にしない限りクライアントには存在しません。

  • 書き込みを有効にした場合の多層防御: 危険なサービス(HA シャットダウン、shell_command など)の拒否リスト、エンティティのグロブ許可/拒否リスト、dry_run モード、ログ内のすべての試行の JSON 監査証跡。

  • LAN のみ。 TLS も OAuth もありません。ポート 9583 をインターネットに公開しないでください。

完全な脅威モデルは SECURITY.md にあります。

ドキュメント

ライセンス

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server and Home Assistant add-on that enables AI assistants to manage smart homes by creating automations, designing dashboards, and interacting with entities. It features native access to Home Assistant APIs, built-in Git versioning for safe rollbacks, and full management of HACS integrations.
    638
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for controlling and querying Home Assistant via its REST API, exposing tools to get entity states, list all states, and call services.
    16
    52 npm
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    MCP server for full Home Assistant control, enabling AI agents to manage dashboards, automations, files, apps, entities, and more via REST API, WebSocket, and SSH.
    66
    99 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI assistants to control Home Assistant via natural language, including device control, automation management, and system configuration.
    MIT