Add it to Claude Code
claude mcp add -e "HA_URL=${HA_URL}" -e "HA_TOKEN=${HA_TOKEN}" home-assistant -- uvx ha-mcpHA_URLHA_TOKENMake your agent remember this setup
home-assistant's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- 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
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 instanceHA_TOKENrequiredLong-lived access token for Home AssistantTry it
Original README from dkurti/HA-mcp
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>

🚀 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)
<details> <summary><b>🍎 macOS</b></summary>- Go to claude.ai and sign in (or create a free account)
- Open Terminal and run:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | sh - Download Claude Desktop (or restart: Claude menu → Quit)
- Ask Claude: "Can you see my Home Assistant?"
You're now connected to the demo environment! Connect your own Home Assistant →
</details> <details> <summary><b>🪟 Windows</b></summary>- Go to claude.ai and sign in (or create a free account)
- Open Windows PowerShell (from Start menu) and run:
irm https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-windows.ps1 | iex - Download Claude Desktop (or restart: File → Exit)
- Ask Claude: "Can you see my Home Assistant?"
You're now connected to the demo environment! Connect your own Home Assistant →
</details>🧙 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