PlugWiki
ha-mcp logo

Home Assistant MCP Server (ha-mcp): Setup for Claude, Cursor and Other Apps

CommunityLocal

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.

Install ha MCP

Claude Code

  1. 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. 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_control

  • Execute 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_event

  • Call 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_service

  • Delete 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_dashboard

  • Delete 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_resource

  • Get 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_automation

  • Get 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_events

  • Get 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_category

  • Get 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_dashboard

  • Get 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_label

  • Get 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_scene

  • Get 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_script

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

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.

Show all 6
Technical details
Turning on read-onlyTurn on Read Only Mode in the ha-mcp settings, or add /readonly to the end of the server address for one connection.
Talks toYour Home Assistant instance. The AI app you connect, which receives what the tools return
Sign-in and keysThe 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
  • A Home Assistant long-lived access token. An administrator account is recommended, and non-admin tokens work with limits.

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

WebsiteGitHubPyPIOfficial MCP RegistryChangelogIssues

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 5
  1. github.com · github.com
  2. github.com · github.com
  3. github.com · github.com
  4. github.com · github.com
  5. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.