Claude Code for Home Assistant

Run MCP Server directly inside Home Assistant

Install type

Run MCP Server directly inside Home Assistant.

 

Note

Newly solutions  usually ran as an internal Python process inside Home Assistant.

 

ha-mcp-integration is a native Home Assistant integration that embeds an MCP (Model Context Protocol) Server directly inside Home Assistant.

offcial website:https://github.com/homeassistant-ai/ha-mcp-integration

download:https://codeload.github.com/homeassistant-ai/ha-mcp-integration/zip/refs/tags/v1.3.0

Usage examples

claude “Create an automation to turn off lights when I leave home”

Create an automation that turns on the bedroom AC when the temperature exceeds 28°C.

How does it work?

ha-mcp-integration

The integration starts an MCP Server.

The integration registers MCP Tools

AI Mcp client connects via MCP.

Architecture

                 AI Client
       (ChatGPT / Claude / Cursor)
                    │
          MCP Protocol (HTTP/SSE)
                    │
        ┌────────────────────────┐
        │ Home Assistant         │
        │ ha-mcp-integration     │
        │                        │
        │  MCP Server            │
        │  Tool Registry         │
        │  Authentication        │
        └──────────┬─────────────┘
                   │
          Home Assistant Core
                   │
      ┌────────────┴─────────────┐
      │ States                   │
      │ Services                 │
      │ Devices                  │
      │ Areas                    │
      │ Automations              │
      │ Scripts                  │
      │ History                  │
      └──────────────────────────┘

 

 

ha-mcp-integration:Full MCP Server running inside Home Assistant. AI clients connect directly to it.

ha_mcp_tools:A library of MCP tools used by the MCP Server.

ha-mcp-integration
        │
        ├── starts MCP Server
        │
        └── uses ha_mcp_tools
                 │
                 ├── call_service
                 ├── get_state
                 ├── list_entities
                 ├── search_devices
                 └── ...

 

ha-mcp-integration does not "think up" automations by itself. Instead, it exposes Home Assistant capabilities as MCP tools, allowing an AI (ChatGPT, Claude, Cursor, etc.) to inspect your Home Assistant configuration and then create or modify automations.

 

 

Requirements

Home Assistant Docker

Anthropic account 

Installation

 

ha-mcp-integration=HA-MCP Custom Component

 

 

 

 

 

 

Comments

Be the first to post a comment

Post a comment