homeassistant-ai/ha-mcp

▲ 31 stars today★ 5,806⑂ 285

Configure and automate Home Assistant with Claude, ChatGPT, and other AI assistants.

About homeassistant-ai/ha-mcp

homeassistant-ai/ha-mcp is an open-source project on GitHub, mainly written in Python. Configure and automate Home Assistant with Claude, ChatGPT, and other AI assistants. It currently holds 5,806 stars and 285 forks with 26 open issues, and was last pushed on 2026-11-09 (repository created 2025-09-14).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #33 with 31 new stars today.

GitHub Repository Details

Repository homeassistant-ai/ha-mcp · default branch master · size 56806 KB · watchers 20 · source: GitHub REST API and repository README

README

Breaking change (v7.3.0): ha_config_set_yaml has been moved to beta.
https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Home Assistant MCP Server Logo

# HA-MCP — Manage Home Assistant with AI

https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/87 Tools https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Release https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/E2E Tests https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/License
https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Activity https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Built with FastMCP https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Python Version https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/GitHub Sponsors https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Website

Configure and automate Home Assistant with Claude, ChatGPT, and other AI assistants.

---

Demo with Claude Desktop

---

🚀 Get Started

The recommended way to run ha-mcp is the HA-MCP integration. It installs into Home Assistant through HACS (the built-in Marketplace on Home Assistant 2026.11+), runs the full server in-process, and works on every Home Assistant installation type — Home Assistant OS, Supervised, Container, and Core — with full feature parity. It is the easiest setup in every case: setup asks for an administrator access token and how clients may connect.

Add it to Home Assistant via HACS or, on Home Assistant 2026.11+, the Marketplace (the preferred install):

Add HA-MCP to HACS

Quick start:

The setup below is for version 9.0.0 (October 28, 2026) and later; earlier versions show a shorter setup form without the administrator account step.

1. Install the HA-MCP integration (requires Home Assistant 2026.8.0 or newer; see compatibility details). On Home Assistant 2026.8–2026.10, open HACS, search for HA-MCP, then Download. On Home Assistant 2026.11 or newer, open Settings → Marketplace, accept its first-run warning, and search for HA-MCP, then Install. HA-MCP is in the default catalog, so installing it and receiving its updates do not require connecting GitHub or adding a custom repository. The badge above also opens its catalog page. Already installed from the earlier homeassistant-ai/ha-mcp-integration repository? It keeps receiving the same releases. On the Marketplace, keep GitHub connected for its background checks on that custom repository. Older installed releases may still appear as HA-MCP Custom Component; searching for HA-MCP matches both names. 2. Restart Home Assistant. 3. Decide which administrator account the server acts as. Either create a long-lived access token on your own account (your profile → Security → Long-lived access tokens → Create token; it works from anywhere if it leaks, and the server's changes show under your name), or, safer, create an account just for HA-MCP under Settings → People → Add person with Allow login, Local access only and Administrator on. Never use your own login for the second option. 4. Go to Settings → Devices & Services → Add Integration, search for HA-MCP and choose HA-MCP Server. Paste your token, or enter the user name and password of the account you made for HA-MCP (HA-MCP creates its token), pick how clients may connect — Remote access through Home Assistant (start with Secret URL, the simplest; Home Assistant sign-in adds a login) and/or Network access: Local network — then click Submit. Both start disabled, so a client on another device needs one of them. 5. Copy the connect URL from the entry's Configure screen (Settings → Devices & Services → “HA-MCP — Manage Home Assistant with AI” → HA-MCP Server → Configure). A notification confirms the server started and points you there. 6. Paste that URL into your AI client — done.

Connect URL. The Configure screen gives you a Home Assistant webhook URL for remote clients — https:///api/webhook/ through Nabu Casa or any reverse proxy already pointed at Home Assistant (locally, http://:8123/api/webhook/). For clients on the same network, the server is also reachable directly at http://:9584/private_.

The component's second entry type, the File & YAML services entry (HA-MCP File & YAML Tools), is only needed if you enable ha-mcp's opt-in file and YAML editing tools (feature flags, off by default) — skip it otherwise; you can add it later at any time. It works with any server type (in-process, app, Docker, or stdio).

Full in-process server documentation → · Setup Wizard for client-specific config →

🏠 Home Assistant app (add-on)

Prefer to run ha-mcp as a Home Assistant app (add-on)? On Home Assistant OS and Supervised installs it is a close second — no access token to manage, and it works with Claude Desktop, Claude.ai, ChatGPT, and any other MCP client on your local network or configured for remote access.

1. Add the repository to your Home Assistant instance:

Add Repository

If that opens the App store without an add-repository dialog (a known Home Assistant issue), add it manually: Settings → Apps → Install app → ⋮ → Repositories, then paste https://github.com/homeassistant-ai/ha-mcp.

2. Install "Home Assistant MCP Server" from Settings → Apps → Install app and click Start. (Home Assistant 2026.2 renamed "Add-ons" to "Apps"; on older versions this is the Add-on store.) 3. Open the Logs tab to find your unique MCP URL. 4. Connect your AI client to that URL — no token or credential setup needed.

Full app documentation →

⚠️ Configure exactly one install method per client. The custom component, the app, Docker/PyPI, and local stdio are independent ways to run the same server — pick one and point your AI client at that single URL. Keeping two entries for the same server in one client (for example a local uvx ha-mcp@latest entry with HOMEASSISTANT_URL / HOMEASSISTANT_TOKEN alongside an app or component URL) is a known cause of connection hangs.

Other install methods

These run the server outside Home Assistant — useful for Container / Core installs (which can't run apps) or a separate host. The Setup Wizard generates the exact client-specific config for each.

> ⚠️ stdio has known transport issues. The stdio transport has connection problems that streamable HTTP does not (#1713). It is recommended only for demo/testing tinkering — for a real setup, use the custom component or an HTTP method above.

🌐 Remote access (Nabu Casa / Webhook Proxy app / OpenAI Tunnel)
Using the HA-MCP custom component? You do not need the Webhook Proxy — the component has its own built-in webhook for remote access (see the Get Started quick start at the top). The proxy is for the app (it can also front another external server via its mcp_server_url option). The OpenAI Tunnel below is different: it applies to any install method when Home Assistant isn't publicly reachable at all (no Nabu Casa or reverse proxy).

Already have Nabu Casa or another reverse proxy pointing at your Home Assistant? The Webhook Proxy app routes MCP traffic through your existing setup — no separate tunnel or port forwarding needed.

1. Install the MCP Server app (see above) and the Webhook Proxy app from the same store 2. Start the webhook proxy and restart Home Assistant when prompted 3. Copy the webhook URL from the app logs:

   MCP Server URL (remote): https://xxxxx.ui.nabu.casa/api/webhook/mcp_xxxxxxxx
   
4. Configure your AI client with that URL

For other remote access methods (Cloudflare Tunnel, custom reverse proxy), see the Setup Wizard.

ChatGPT / Codex behind a firewall (OpenAI Tunnel). ChatGPT connectors normally require a publicly reachable URL. If you can't (or don't want to) expose one, the community OpenAI Tunnel for HA-MCP integration by @norpol runs OpenAI's tunnel-client inside Home Assistant and connects your local MCP server URL to an OpenAI-hosted tunnel over an outbound-only connection — no port forwarding, reverse proxy, or public URL. Point it at your ha-mcp URL, then attach the ChatGPT connector to the same tunnel ID. See the FAQ entry and #1811.

Webhook proxy documentation →

🧪 Demo server (Windows / macOS / Linux)

Want to try ha-mcp before connecting your own Home Assistant? No paid subscription required. These one-command scripts set up a local stdio connection to a hosted demo environment so you can see it working in a few minutes. Each script's Connect your own Home Assistant link then shows how to point it at your instance.

🍎 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 →

🐧 Linux

Anthropic doesn't ship Claude Desktop for Linux, so pick one path:

Claude Desktop — free, via the community build:

1. Install the community Claude Desktop for Linux build and sign in with a free claude.ai account 2. Open Terminal and run:

   curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-linux.sh | sh
   
3. Restart Claude Desktop, then ask: "Can you see my Home Assistant?"

Claude Code — official CLI, requires a paid Claude plan:

1. Install Claude Code: curl -fsSL https://claude.ai/install.sh | bash 2. Configure ha-mcp, then run claude:

   curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install.sh | sh -s -- --claude-code
   
3. Start claude, run /mcp to confirm, then ask: "Can you see my Home Assistant?"

Full Linux guide →

🪟 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.

https://github.com/homeassistant-ai/ha-mcp/blob/HEAD/Open Setup Wizard

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 configuring, more time enjoying your smart home.

---

✨ Features

| Category | Capabilities | |----------|--------------| | 🔍 Search | Fuzzy entity search, deep config search, system overview | | 🏠 Control | Any service, bulk device control, real-time states | | 🔧 Manage | Automations, scripts, helpers, dashboards, areas, zones, groups, calendars, blueprints | | 📊 Monitor | History, statistics, camera snapshots, automation traces, ZHA devices | | 💾 System | Backup/restore, updates, apps, device registry | | 🔒 Safety | Read Only Mode toggle, per-tool enable/disable, tool security policies (user approval), automatic edit backups |

Template helper edit backups capture persisted options through the HA-MCP custom component, using either its Server entry or File & YAML Tools entry. Helper edits, generic integration options edits, and deletion capture the stable config-entry identity and entity ID/name mapping. Capture refuses degraded secret scrubbing. Restoring an existing helper requires a fresh safety backup, removes optional settings absent from the snapshot, and verifies persisted options.

For Template backup listing and bulk deletion, filter by the config-entry ID returned as entity_id by capture. Capture accepts an entity alias; the history filters use the stable config-entry ID. Recreation reports its replacement config-entry ID and saved entity mapping separately.

If the original entry has been deleted, restore recreates the helper and reports its new config-entry ID. The saved entity ID and custom name are restored when available; an occupied entity ID is refused before creation. Older snapshots without entity metadata cannot preserve renamed entity IDs. If a collision or verification failure occurs after creation, the new helper and source backup are retained and the result reports the new entry for inspection. Other entity/device registry settings are not restored. Helper and integration edits through the same server wait until restore finishes; other Home Assistant clients are outside this coordination. Failed or uncertain restores report their outcome and safe refusal reasons; inspect the current helper before retrying.

Complete Tool List (87 tools)

| Category | Tools | |----------|-------| | Apps (add-ons) | ha_get_app, ha_manage_app | | Areas & Floors | ha_list_floors_areas, ha_remove_area_or_floor, ha_set_area_or_floor | | Assist | ha_manage_pipeline | | Automations | ha_config_get_automation, ha_config_remove_automation, ha_config_set_automation | | Blueprints | ha_manage_blueprints | | Calendar | ha_config_get_calendar_events, ha_config_remove_calendar_event, ha_config_set_calendar_event | | Camera | ha_get_camera_image | | Dashboard | ha_get_dashboard_screenshot (beta) | | Dashboards | ha_config_delete_dashboard_resource, ha_config_delete_dashboard, ha_config_get_dashboard, ha_config_list_dashboard_resources, ha_config_set_dashboard_resource, ha_config_set_dashboard | | Developer | ha_dev_manage_server, ha_dev_manage_settings | | Device Registry | ha_get_device, ha_remove_device, ha_set_device | | Energy | ha_manage_energy_prefs | | Entity Registry | ha_get_entity_exposure, ha_get_entity, ha_remove_entity, ha_set_entity | | Files | ha_delete_file (beta), ha_list_files (beta), ha_read_file (beta), ha_write_file (beta) | | Groups | ha_config_list_groups, ha_config_remove_group, ha_config_set_group | | HACS | ha_get_hacs_info, ha_manage_hacs | | Helper Entities | ha_config_list_helpers, ha_config_set_helper, ha_remove_helpers_integrations | | History & Statistics | ha_get_automation_traces, ha_get_history, ha_get_logs | | Integrations | ha_get_integration, ha_get_system_health, ha_set_integration | | Labels & Categories | ha_config_get_category, ha_config_get_label, ha_config_remove_category, ha_config_remove_label, ha_config_set_category, ha_config_set_label | | Matter | ha_manage_radio | | Scenes | ha_config_get_scene, ha_config_remove_scene, ha_config_set_scene | | Scripts | ha_config_get_script, ha_config_remove_script, ha_config_set_script | | Search & Discovery | ha_get_overview, ha_get_state, ha_search | | Service & Device Control | ha_bulk_control, ha_call_event, ha_call_service, ha_get_operation_status, ha_list_services | | System | ha_config_get_yaml (beta), ha_config_set_yaml (beta), ha_manage_backup, ha_manage_custom_tool (beta), ha_manage_security_policy, ha_manage_theme, ha_manage_updates, ha_reload_core, ha_restart | | Todo Lists | ha_get_todo, ha_remove_todo_item, ha_set_todo_item | | Utilities | ha_eval_template, ha_report_issue | | Zones | ha_get_zone, ha_remove_zone, ha_set_zone |

Z-Wave configuration values can be read through ha_manage_radio with action="get_config_params" or action="get_config_param", even when their configuration entities are disabled or absent. Reads use the Z-Wave JS cache by default; a single full root parameter can explicitly request a device read. See parameter reads, freshness, and examples.

---

🆚 ha-mcp vs. Home Assistant's built-in MCP Server

Home Assistant ships its own MCP Server integration. It is built on the Assist pipeline, so a connected MCP client can read and control the entities you have exposed to Assist and run the intents Assist understands — handy for voice-style control of already-exposed devices.

ha-mcp is a standalone server built for configuring, building, and debugging your smart home, not just controlling it. On top of device control, it adds capabilities the built-in integration does not have:

| Capability | Built-in MCP Server | ha-mcp | |------------|:-------------------:|:------:| | Control exposed devices, query states | Yes | Yes | | Entity scope | Only entities exposed to Assist | Everything in Home Assistant | | Create / edit automations, scripts, scenes | No | Yes | | Build & edit dashboards | No | Yes | | Debug automations from traces, read history & logs | No | Yes | | Manage helpers, areas, zones, labels, groups | No | Yes | | Backups, apps, HACS, device & entity registry | No | Yes |

Rule of thumb: Use the built-in integration for voice-style control of devices you have already exposed; use ha-mcp when you want an AI assistant that can also build and maintain your Home Assistant setup.

---

🔌 Custom Component (ha_mcp_tools) — File & YAML Services

The HA-MCP integration also powers a set of privileged tools that standard Home Assistant APIs can't provide: file system access and YAML config editing. (The same component runs the full server in-process — that's the recommended install in the Get Started section at the top.) Its File & YAML services entry (HA-MCP File & YAML Tools) enables the tools below.

**Tools that require the comp

GitHub Stars & Activity

5,806Stars
285Forks
26Open issues
PythonLanguage

GitHub Popularity

GitHub stars5,806
Forks285
Open issues26
Primary languagePython
LicenseMIT
Stars gained today31
Created2025-09-14
Last pushed2026-11-09

Trending History

Daily boardrank #33 · ▲ 31 stars

Related AI Projects

1

NousResearch / hermes-agent

Python★ 262,017⑂ 0
→
2

anthropics / skills

Python★ 190,708⑂ 22,430▲ 1,052 stars
→
3

Significant-Gravitas / AutoGPT

Python★ 187,972⑂ 0
→
4

huggingface / transformers

Python★ 168,692⑂ 0
→
5

langgenius / dify

Python★ 160,773⑂ 0
→
6

langchain-ai / langchain

Python★ 149,276⑂ 0
→
7

Graphify-Labs / graphify

Python★ 144,937⑂ 0
→
8

Shubhamsaboo / awesome-llm-apps

Python★ 144,288⑂ 0
→

More AI Rankings