Home Assistant MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "HA_URL=${HA_URL}" -e "HA_TOKEN=${HA_TOKEN}" home-assistant -- uvx ha-mcp
Required:HA_URLHA_TOKEN
README.md

Interact with Home Assistant to control smart home devices and automations.

The Unofficial and Awesome Home Assistant MCP Server

<em>A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with Home Assistant.
Using natural language, control smart home devices, query states, execute services and manage your automations.</em>

Demo with Claude Desktop


🚀 Get Started

Full guide to get you started with Claude Desktop (~10 min)

No paid subscription required. Click on your operating system:

    

Quick install (~5 min)

🍎 macOS
  1. Go to claude.ai and sign in (or create a free account)
  2. Open Terminal and run:
    curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | sh
    
  3. Download Claude Desktop (or restart: Claude menu → Quit)
  4. Ask Claude: "Can you see my Home Assistant?"

You're now connected to the demo environment! Connect your own Home Assistant →

🪟 Windows
  1. Go to claude.ai and sign in (or create a free account)
  2. Open Windows PowerShell (from Start menu) and run:
    irm https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-windows.ps1 | iex
    
  3. Download Claude Desktop (or restart: File → Exit)
  4. Ask Claude: "Can you see my Home Assistant?"

You're now connected to the demo environment! Connect your own Home Assistant →

🧙 Setup Wizard for 15+ clients

Claude Code, Gemini CLI, ChatGPT, Open WebUI, VSCode, Cursor, and more.

Having issues? Check the FAQ & Troubleshooting


💬 What Can You Do With It?

Just talk to Claude naturally. Here are some real examples:

You Say What Happens
"Create an automation that turns on the porch light at sunset" Creates the automation with proper triggers and actions
"Add a weather card to my dashboard" Updates your Lovelace dashboard with the new card
"The motion sensor automation isn't working, debug it" Analyzes execution traces, identifies the issue, suggests fixes
"Make my morning routine automation also turn on the coffee maker" Reads the existing automation, adds the new action, updates it
"Create a script that sets movie mode: dim lights, close blinds, turn on TV" Creates a reusable script with the sequence of actions

Spend less time

Tools (3)

control_deviceTurn devices on or off or adjust their settings.
query_stateGet the current state or attributes of a specific entity.
manage_automationCreate, update, or debug Home Assistant automations.

Environment Variables

HA_URLrequiredThe base URL of your Home Assistant instance
HA_TOKENrequiredLong-lived access token for Home Assistant

Configuration

claude_desktop_config.json
{"mcpServers": {"home-assistant": {"command": "uvx", "args": ["ha-mcp"], "env": {"HA_URL": "http://homeassistant.local:8123", "HA_TOKEN": "your-long-lived-access-token"}}}}

Try it

Create an automation that turns on the porch light at sunset
Add a weather card to my dashboard
The motion sensor automation isn't working, debug it
Make my morning routine automation also turn on the coffee maker
Create a script that sets movie mode: dim lights, close blinds, turn on TV

Frequently Asked Questions

What are the key features of Home Assistant?

Control smart home devices using natural language. Query entity states and system information. Create and modify automations directly via AI. Debug automation execution traces. Manage Lovelace dashboard configurations.

What can I use Home Assistant for?

Automating complex lighting scenes based on time or sensor triggers. Troubleshooting broken smart home automations by analyzing logs. Updating dashboard layouts without manual YAML editing. Creating reusable scripts for multi-device routines.

How do I install Home Assistant?

Install Home Assistant by running: curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | sh

What MCP clients work with Home Assistant?

Home Assistant works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Home Assistant docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare