
Home Assistant MCP Server (ha-mcp): Setup for Claude, Cursor and Other Apps
Lets Claude, Cursor and other assistants control your Home Assistant devices and build automations, scripts, scenes and dashboards for you.
ha-mcp is a community server for Home Assistant, made by the homeassistant-ai group and not by Nabu Casa. It reaches everything in your Home Assistant, not only the devices you exposed to Assist. It can control devices and also create, edit and delete automations, scripts, scenes, helpers, dashboards, areas and more.
The project's recommended route is its Home Assistant custom component, which you install from HACS and which gives you a private connect URL to paste into your AI app. It also runs as a Home Assistant app (add-on), in Docker, or on your computer through uvx, which is the route the install box shows. The uvx route needs your Home Assistant address and a long-lived access token, and the README marks stdio as not recommended for a real setup.
Good for
- Home Assistant users who want to talk to their home in plain English
- Tinkerers who want the assistant to write and fix automations and dashboards
- People debugging why an automation did not run, using traces, history and logs
- Users who want a read-only view of their home for an assistant
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install ha MCP
Claude Code
- 1
Copy this prompt.
Add the ha MCP server to Claude Code. Run this command: claude mcp add ha -e HOMEASSISTANT_URL=<HOMEASSISTANT_URL> -e HOMEASSISTANT_TOKEN=<HOMEASSISTANT_TOKEN> -- uvx ha-mcp Ask me for HOMEASSISTANT_URL, HOMEASSISTANT_TOKEN and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires uv (Python).
Built from the package data we hold. Not yet tested by us.
Tools
Manage explicit operations or one deterministic structural bulk action
Runs the same control action on many devices at once, or applies one structural change across a group, and reports the result for each.
Try: “Turn off every light on the first floor.”
Write ·
ha_bulk_controlExecute a custom event on the Home Assistant event bus
Fires a custom event on the Home Assistant event bus, which any automation listening for that event name will react to.
Try: “Fire the event named movie_night_start.”
Write ·
ha_call_eventCall any Home Assistant service or one-shot WebSocket command: the catch-all escape h...
Calls any Home Assistant service, such as turning lights off, locking doors or starting a vacuum. It is the catch-all, so it can do anything the services can.
Try: “Turn off all lights in the living room.”
Write ·
ha_call_serviceDelete a storage-mode dashboard completely
Deletes a whole dashboard created in the UI (storage mode). The dashboard and its cards are gone afterwards.
Try: “Delete the dashboard called Test.”
Delete ·
ha_config_delete_dashboardDelete a dashboard resource
Deletes a registered dashboard resource, such as a custom card, theme or script file, so dashboards stop loading it.
Try: “Remove the unused custom card resource.”
Delete ·
ha_config_delete_dashboard_resourceGet Home Assistant automation configuration
Reads the full configuration of one automation: its triggers, conditions and actions.
Try: “Show me the porch light automation.”
Network ·
ha_config_get_automationGet calendar events from a calendar entity within a time range
Lists the events on a calendar between two times, such as everything on the family calendar this week.
Try: “What is on my family calendar this week?”
Network ·
ha_config_get_calendar_eventsGet category info - list all categories for a scope or get a specific one by ID
Lists the categories used to sort automations, scripts and helpers, or reads one category by its id.
Try: “List my automation categories.”
Network ·
ha_config_get_categoryGet Lovelace dashboards: list them, read one config, or search their cards
Lists your dashboards, reads one dashboard configuration, or searches the cards in them for a keyword.
Try: “List my dashboards.”
Network ·
ha_config_get_dashboardGet label info - list all labels or get a specific one by ID
Lists the labels you use to tag entities and devices, or reads one label by its id.
Try: “List my labels.”
Network ·
ha_config_get_labelGet a scene's complete configuration, or list and search scenes without scene_id
Reads one scene in full, or lists and searches your scenes when no scene is named.
Try: “List my scenes.”
Network ·
ha_config_get_sceneGet Home Assistant script configuration
Reads the full configuration of one script: its sequence of steps and settings.
Try: “Show the Good night script.”
Network ·
ha_config_get_scriptGet the current YAML fragment under a key, from one config file or across a glob
Beta, off by default. Reads the YAML under a key in your configuration files.
Try: “Show the template section of configuration.yaml.”
Files ·
ha_config_get_yamlList Lovelace dashboard resources (custom cards, themes, CSS/JS)
Lists the custom cards, themes and CSS or JavaScript files your dashboards load.
Try: “List the custom cards my dashboards load.”
Network ·
ha_config_list_dashboard_resourcesList Home Assistant entity groups with their member entities
Lists the entity groups you have set up and the entities in each.
Try: “List my entity groups.”
Network ·
ha_config_list_groupsList Home Assistant helpers of a specific type with their configurations
Lists helpers of one type, such as toggles, counters or timers, with their settings.
Try: “List my input_boolean helpers.”
Network ·
ha_config_list_helpersDelete a Home Assistant automation permanently
Deletes an automation permanently. Home Assistant stops running it from then on.
Try: “Delete the automation called Old porch light.”
Delete ·
ha_config_remove_automationDelete an event from a calendar
Deletes one event from a calendar.
Try: “Delete the dentist event on Friday.”
Delete ·
ha_config_remove_calendar_eventDelete a Home Assistant category
Deletes a category. Items that used it lose that category.
Try: “Delete the category called Old.”
Delete ·
ha_config_remove_categoryRemove a service-based Home Assistant entity group via the group.remove service
Removes a group that was created through the group service. Its member entities stay.
Try: “Remove the group called Downstairs lights.”
Delete ·
ha_config_remove_groupDelete a Home Assistant label
Deletes a label and takes it off everything it was attached to.
Try: “Delete the label called Old.”
Delete ·
ha_config_remove_labelDelete a Home Assistant scene
Deletes a scene so it can no longer be activated.
Try: “Delete the scene called Party.”
Delete ·
ha_config_remove_sceneDelete a Home Assistant script
Deletes a script, so automations or buttons that call it stop working.
Try: “Delete the script called Old blinds.”
Delete ·
ha_config_remove_scriptCreate or update a Home Assistant automation
Creates an automation, or replaces the configuration of an existing one, from the triggers, conditions and actions you describe.
Try: “Create an automation that turns on the porch light at sunset.”
Write ·
ha_config_set_automationCreate a new event in a calendar, or update an existing one
Adds an event to a calendar, or changes an existing event.
Try: “Add a dentist visit to the family calendar on Friday at 9.”
Write ·
ha_config_set_calendar_eventCreate or update a Home Assistant category
Creates a category or renames an existing one.
Try: “Create a category called Lighting for automations.”
Write ·
ha_config_set_categoryCreate or update a Home Assistant dashboard
Creates a dashboard or changes the layout and cards of an existing one.
Try: “Add a card with room temperatures to my Home dashboard.”
Write ·
ha_config_set_dashboardCreate or update a dashboard resource (inline code or external URL)
Registers a dashboard resource from inline code or a URL, or updates an existing one.
Try: “Add a JavaScript resource for a custom card.”
Write ·
ha_config_set_dashboard_resourceCreate or update a service-based Home Assistant entity group via the group.set service
Creates an entity group or changes its members, using the group service.
Try: “Create a group called Downstairs lights.”
Write ·
ha_config_set_groupCreate or update Home Assistant helpers: storage types, every helper flow HA lists, a...
Create or update Home Assistant helpers: storage types, every helper flow HA lists, and config subentries.
Try: “Create a toggle helper called Guest mode.”
Write ·
ha_config_set_helperCreate or update a Home Assistant label
Creates a label or changes the name and color of an existing one.
Try: “Create a label called Battery powered.”
Write ·
ha_config_set_labelCreate or update a Home Assistant scene
Creates a scene from the entity states you list, or replaces an existing scene.
Try: “Create a Movie night scene with the lights at 20 percent.”
Write ·
ha_config_set_sceneCreate or update a Home Assistant script
Creates a script from the steps you describe, or replaces an existing one.
Try: “Create a script that closes all blinds.”
Write ·
ha_config_set_scriptUpdate raw YAML configuration in configuration.yaml, packages/*.yaml, or themes/*.yam...
Beta, off by default. Edits raw YAML in configuration.yaml, packages or themes. The docs call it a last resort.
Try: “Add a template sensor to configuration.yaml.”
Write ·
ha_config_set_yamlDelete a file from allowed directories in the Home Assistant config
Beta, off by default. Deletes a file from allowed folders of your Home Assistant config.
Try: “Delete the old backup file in my config folder.”
Delete ·
ha_delete_fileManage the running ha-mcp server itself (developer mode)
Developer mode only. Manages the running ha-mcp server, including pending approval requests.
Try: “Show pending approval requests in developer mode.”
Write ·
ha_dev_manage_serverManage ha-mcp server settings and the Tools/Policies/Backups surfaces (developer mode)
Developer mode only. Manages ha-mcp settings and its tools, policies and backups views.
Try: “Show the ha-mcp settings in developer mode.”
Write ·
ha_dev_manage_settingsExecute a Jinja2 template render, or an automation condition check, in Home Assistant
Renders a Home Assistant Jinja2 template, or checks an automation condition, and returns the result. Useful for testing a template before using it.
Try: “Render the template that counts lights that are on.”
Network ·
ha_eval_templateGet installed or available Home Assistant apps (add-ons), or details for one
Lists the Home Assistant apps (add-ons) that are installed or available, or shows the details of one.
Try: “Which apps (add-ons) do I have installed?”
Network ·
ha_get_appGet execution traces for automations and scripts to debug issues
Returns the recent runs of an automation or script, step by step, so the assistant can see why it did or did not fire.
Try: “Why did the porch light automation not run last night?”
Network ·
ha_get_automation_tracesGet a snapshot image from a Home Assistant camera entity
Takes a snapshot from a camera entity and returns the image.
Try: “Show me a snapshot from the front door camera.”
Network ·
ha_get_camera_imageGet rendered images of a Home Assistant Lovelace dashboard view
Beta, off by default. Returns rendered images of a dashboard view.
Try: “Take a screenshot of my Energy dashboard.”
Network ·
ha_get_dashboard_screenshotGet device information with pagination, including Zigbee (ZHA/Z2M) and Z-Wave JS devices
Reads devices from the device registry, including Zigbee and Z-Wave devices, a page at a time.
Try: “Show the device details for the hallway motion sensor.”
Network ·
ha_get_deviceGet entity registry information for one or more entities
Reads the registry entry for one or more entities: name, area, platform and whether they are enabled.
Try: “Show the registry details for light.kitchen.”
Network ·
ha_get_entityGet entity exposure settings - list all or get settings for a specific entity
Shows which entities are exposed to voice assistants such as Assist, for all entities or one.
Try: “Which entities are exposed to Assist?”
Network ·
ha_get_entity_exposureGet HACS (Home Assistant Community Store) data — search the store or fetch repository...
Get HACS (Home Assistant Community Store) data — search the store or fetch repository details.
Try: “Search HACS for a thermostat card.”
Network ·
ha_get_hacs_infoGet historical data from Home Assistant's recorder
Returns how an entity changed over a time range, from the Home Assistant recorder.
Try: “Show the living room temperature for the last 24 hours.”
Network ·
ha_get_historyGet integration (config entry) information with pagination
Lists your integrations (config entries) a page at a time, or shows the details of one.
Try: “List my integrations and their state.”
Network ·
ha_get_integrationGet Home Assistant logs from various sources
Reads Home Assistant logs from the sources you pick, to look for errors.
Try: “Show the latest errors in the Home Assistant log.”
Network ·
ha_get_logsGet the status of one or more device operations with real-time WebSocket verification
Checks whether earlier device commands actually took effect, by watching the live state over the WebSocket.
Try: “Did the last command to the garage door finish?”
Network ·
ha_get_operation_statusGet AI-friendly system overview with intelligent categorization
Returns a summary of your whole system grouped by type, a good first call for a new conversation.
Try: “Give me an overview of my home.”
Network ·
ha_get_overviewGet current status, state, and attributes of one or more entities (lights, switches, ...
Get current status, state, and attributes of one or more entities (lights, switches, sensors, climate, covers, locks, fans, etc.).
Try: “Is the front door locked?”
Network ·
ha_get_stateGet Home Assistant system health, including Zigbee (ZHA), Z-Wave JS, and per-integrat...
Get Home Assistant system health, including Zigbee (ZHA), Z-Wave JS, and per-integration diagnostics dumps.
Try: “How healthy is my Home Assistant system?”
Network ·
ha_get_system_healthGet todo lists or items - list all todo lists or get items from a specific list
Lists your to-do lists, or the items on one list.
Try: “What is on my shopping list?”
Network ·
ha_get_todoGet zone information - list all zones or get details for a specific one
Lists your zones (home, work and so on), or reads one zone.
Try: “List my zones.”
Network ·
ha_get_zoneList files in a directory within the Home Assistant config directory
Beta, off by default. Lists files in a folder of your Home Assistant config.
Try: “List the files in my config folder.”
Files ·
ha_list_filesList floors sorted by level ascending, each with their assigned areas nested, plus ar...
List floors sorted by level ascending, each with their assigned areas nested, plus areas without a floor.
Try: “List my floors and the areas on each.”
Network ·
ha_list_floors_areasList available Home Assistant services with optional pagination and detail control
Lists the services Home Assistant offers, with optional paging and detail, so the assistant knows what it can call.
Try: “List the services the light domain offers.”
Network ·
ha_list_servicesManage Home Assistant apps (add-ons) or proxy an app API
Manages Home Assistant apps (add-ons), including install and uninstall, or sends a request to an app API.
Try: “Restart the Mosquitto app.”
Delete ·
ha_manage_appCreate, list or restore full Home Assistant backups, or the automatic per-entity edit...
Creates, lists or restores full Home Assistant backups, or the automatic per-entity edit backups it takes before changes.
Try: “Create a backup of Home Assistant now.”
Delete ·
ha_manage_backupManage Home Assistant blueprints — list, read, import, save, delete, or render a stan...
Manage Home Assistant blueprints — list, read, import, save, delete, or render a standalone config.
Try: “List the blueprints I have imported.”
Delete ·
ha_manage_blueprintsCreate and run a custom tool in a sandbox, or manage saved custom tools
Beta, off by default. Lets the assistant write and run its own tool in a sandbox, and save or delete saved ones.
Try: “Write a custom tool that totals my solar sensors.”
Runs code ·
ha_manage_custom_toolManage the Home Assistant Energy Dashboard preferences: grid / solar / battery / gas ...
Manage the Home Assistant Energy Dashboard preferences: grid / solar / battery / gas / water energy sources, device consumption sensors for electricity and water, and cost tariffs.
Try: “Add my solar inverter to the Energy dashboard.”
Write ·
ha_manage_energy_prefsManage HACS (Home Assistant Community Store) — install/update, remove, add custom rep...
Manage HACS (Home Assistant Community Store) — install/update, remove, add custom repositories, or refresh repository information.
Try: “Update the HACS card I just found.”
Delete ·
ha_manage_hacsManage Home Assistant Assist pipelines
Reads or changes your Assist voice pipelines, which set speech recognition, the conversation agent and speech output.
Try: “Show my Assist voice pipelines.”
Write ·
ha_manage_pipelineManage Home Assistant radios — Z-Wave, Zigbee, Matter, and Thread
Manages the Z-Wave, Zigbee, Matter and Thread radios in your Home Assistant.
Try: “Show my Z-Wave devices and their config parameters.”
Write ·
ha_manage_radioManage the tool security policy that gates high-stakes tool calls behind user approval
Reads or changes the policy that holds chosen tool calls until you approve them.
Try: “Show which tool calls need my approval.”
Write ·
ha_manage_security_policyManage Home Assistant frontend themes
Reads or changes the frontend themes that style your dashboards.
Try: “List my frontend themes.”
Write ·
ha_manage_themeManage Home Assistant updates (list, details, install, skip) and Repairs issues (ignore)
Lists available updates, shows their details, installs or skips them, and ignores Repairs issues.
Try: “Which updates are waiting?”
Write ·
ha_manage_updatesRead a file from the Home Assistant config directory
Beta, off by default. Reads a file from your Home Assistant config folder.
Try: “Read my configuration.yaml.”
Files ·
ha_read_fileExecute a Home Assistant configuration reload without a full restart
Reloads configuration such as automations or scripts without restarting Home Assistant.
Try: “Reload the core configuration.”
Write ·
ha_reload_coreRemove a Home Assistant area or floor
Deletes an area or a floor. Devices in it become unassigned.
Try: “Remove the empty area called Storage.”
Delete ·
ha_remove_area_or_floorRemove an orphaned device from the Home Assistant device registry
Removes an orphaned device from the device registry.
Try: “Remove the orphaned device Old plug.”
Delete ·
ha_remove_deviceRemove one or more entities from the Home Assistant entity registry
Removes one or more entities from the entity registry.
Try: “Remove the dead entity sensor.old_meter.”
Delete ·
ha_remove_entityRemove a Home Assistant helper or integration config entry
Removes a helper or an integration, with all its entities.
Try: “Remove the helper called Guest mode.”
Delete ·
ha_remove_helpers_integrationsRemove an item from a Home Assistant todo list
Deletes one item from a to-do list.
Try: “Remove milk from the shopping list.”
Delete ·
ha_remove_todo_itemRemove a Home Assistant zone
Deletes a zone, which can break automations that trigger on it.
Try: “Remove the zone called Old office.”
Delete ·
ha_remove_zoneGet diagnostics and a finished GitHub issue for a bug, agent feedback or a feature re...
Get diagnostics and a finished GitHub issue for a bug, agent feedback or a feature request.
Try: “Prepare a bug report for what just failed.”
Network ·
ha_report_issueExecute a Home Assistant restart
Restarts Home Assistant, which takes your whole home offline for a moment.
Try: “Restart Home Assistant.”
Write ·
ha_restartSearch for entities (lights, sensors, switches, climate, etc.) by name, domain, or ar...
Search for entities (lights, sensors, switches, climate, etc.) by name, domain, or area — AND inside automation/script/scene/helper/dashboard configurations — in one call.
Try: “Find every light and every automation that mentions the kitchen.”
Network ·
ha_searchCreate or update a Home Assistant area or floor
Creates an area or floor, or renames or changes an existing one.
Try: “Create an area called Garage on the ground floor.”
Write ·
ha_set_area_or_floorUpdate device properties such as name, area, disabled state, or labels
Changes a device name, area, enabled state or labels.
Try: “Move the hallway sensor to the Hall area.”
Write ·
ha_set_deviceUpdate entity properties in the entity registry
Changes entity registry settings such as its name, area, icon or enabled state.
Try: “Rename sensor.garage_temp to Garage temperature.”
Write ·
ha_set_entityManage an integration (config entry): enable/disable, add, update options, or reconfi...
Manage an integration (config entry): enable/disable, add, update options, or reconfigure.
Try: “Disable the Spotify integration.”
Write ·
ha_set_integrationCreate or update a todo item in Home Assistant
Adds an item to a to-do list or updates one, such as marking it done.
Try: “Add milk to the shopping list.”
Write ·
ha_set_todo_itemCreate or update a Home Assistant zone
Creates a zone or changes the location and radius of an existing one.
Try: “Create a zone called Office around these coordinates.”
Write ·
ha_set_zoneWrite a file to allowed directories in the Home Assistant config
Beta, off by default. Writes a file in allowed folders of your Home Assistant config.
Try: “Save this note to a file in my config folder.”
Write ·
ha_write_file
Read from the source code
Permissions
high risk · 5 things to watch · 6 advisories
High risk
The assistant can control every device in your Home Assistant and can create, change and delete its settings, including restarting it. Start with the read-only address and a token from a test setup, then widen access.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can delete and restart things in your home
Tools remove automations, devices, entities, dashboards and integrations, and one restarts Home Assistant. Use the /readonly address, or Read Only Mode, until you trust the setup. github.com
It can call any Home Assistant service
The service tool is a catch-all that can unlock doors, open garage doors or run any service you have. Use the security policy to require approval for the calls that matter. github.com
The connect URL is the password
For remote access the secret webhook URL is the credential. Anyone with it can reach the server, so do not share it. You can switch to Home Assistant sign-in instead. github.com
Beta tools can edit files and run code
Opt-in beta tools edit files and YAML in your config folder and run a sandboxed custom tool. They are off by default, so leave them off unless you need them. github.com
Edits are backed up first
The README says it takes automatic edit backups, and it has a tool security policy that holds chosen calls for your approval. github.com
Security advisories
6 known advisories, all fixed in a newer version.
- OAuth 2.1 Temporary HA Credentials Keyed by client_id Instead of Authorization Code Enables Cross-Session LLAT Swap / Race Conditionmedium · Fixed in 9.0.0 · GHSA-prrg-fp57-vcx4
- OAuth-mode Settings Routes Missing Authenticationmedium · Fixed in 7.14.0 · GHSA-mx64-982r-65vg
- ha-mcp: Add-on settings and policy routes are reachable without authentication at the bare root pathmedium · Fixed in 7.10.0 · GHSA-q855-8rh5-jfgq
- Home Assistant MCP Server: YAML config backups written under www/ are served unauthenticated at /local/medium · Fixed in 7.5.0 · GHSA-g39v-cvjh-8fpf
- ha-mcp has XSS via Unescaped HTML in OAuth Consent Formmedium · Fixed in 7.0.0 · GHSA-pf93-j98v-25pv
Technical details
| Turning on read-only | Turn on Read Only Mode in the ha-mcp settings, or add /readonly to the end of the server address for one connection. |
|---|---|
| Talks to | Your Home Assistant instance. The AI app you connect, which receives what the tools return |
| Sign-in and keys | The token sits in your assistant's config (uvx route) or in the Home Assistant integration entry (custom component). Remote access uses a secret webhook URL as the credential. |
| Scopes |
|
Questions
Is ha-mcp the official Home Assistant MCP server?
No. Home Assistant has its own built-in MCP Server integration, which only reaches entities exposed to Assist. ha-mcp is a separate community project that also builds and edits automations, dashboards, scripts and more.
How do I connect it?
The project recommends its custom component, installed through HACS. It shows a private connect URL you paste into your AI app. You can also use the Home Assistant app, Docker or uvx. The install box shows the uvx route, which needs your Home Assistant address and token.
Do I need an access token?
For the uvx, Docker and custom component routes, yes: a long-lived access token from your Home Assistant profile, ideally from an administrator account. The Home Assistant app route needs no token setup.
Can I make it read-only?
Yes. Turn on Read Only Mode in its settings, or add /readonly to the end of the server address for one connection. Read-only connections hide write tools and block write calls.
Can it unlock my doors or open the garage?
It can, if those are Home Assistant entities, because it can call any service. Use read-only mode or its security policy, which holds chosen calls for your approval.
Does it work outside my home network?
Yes. The custom component gives a webhook address that works through Nabu Casa or a reverse proxy. You can turn remote access off at setup, or put the connection behind OIDC sign-in.
Why do I only see a few tools?
Tool search mode, a setting you can turn on, replaces the full list with a few search tools to save space. Beta tools for files, YAML and custom code stay hidden until you enable them. Refresh your app's tool list after changing settings.
Is it free?
Yes. It is open source under the MIT license.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
ha-mcp- Registry
- PyPI
- Transport
- stdio, Streamable HTTP
- Auth
- token in env
- Version
- 9.0.0
- License
- MIT
- Last commit
- Oct 31, 2026
- Open issues
- 8
- Listed in
- Official MCP registry
Other Home Assistant MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 5Hide
- github.com · github.com
- github.com · github.com
- github.com · github.com
- github.com · github.com
- github.com · github.com