Ha MCP logo

Ha MCP

Connect AI assistants to Home Assistant to query states, control devices, run services, and manage automations.

Install Ha MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "ha-mcp": {
      "command": "uvx",
      "args": [
        "ha-mcp@latest"
      ],
      "env": {
        "HOMEASSISTANT_URL": "YOUR_VALUE_HERE",
        "HOMEASSISTANT_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx ha-mcp@latest

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 5d ago.

Overview

ha-mcp connects AI assistants to Home Assistant through an MCP server with tools for querying states, controlling devices, executing services, and managing automations. The preferred deployment is an in-process Home Assistant custom component installed through HACS, with additional app, Docker, PyPI, and stdio options. Clients can connect through a Home Assistant webhook URL or a local network endpoint, depending on the selected setup. Reach for ha-mcp when an agent needs to operate or inspect a Home Assistant installation using natural-language requests.

Use cases

  • Query entity states from Home Assistant
  • Control smart-home devices through an AI assistant
  • Execute Home Assistant services
  • Manage automations with natural-language requests
  • Inspect or edit YAML with opt-in tools

Key features

  • Home Assistant device and state control
  • Service execution
  • Automation management
  • In-process custom component deployment
  • Webhook and local network access
  • Optional file and YAML editing

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

41/41 checks healthy over the last 57d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 4Low 2

Scanned 6d ago via OSV.dev · ha-mcp@latest (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5.5kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Ha MCP works

What ha-mcp does

ha-mcp exposes Home Assistant functionality to MCP-compatible AI assistants. Its tool set covers common home-automation tasks such as reading entity states, controlling smart-home devices, calling Home Assistant services, and working with automations. The project advertises 87 tools and can run with Home Assistant installations using OS, Supervised, Container, or Core deployment types.

Optional file and YAML editing tools are available through feature flags and are disabled by default. The ha_config_set_yaml tool is classified as beta. A separate HA-MCP File & YAML Tools entry is used when these opt-in capabilities are enabled.

How it works

The preferred architecture is an HA-MCP custom component running inside Home Assistant. After installation, the integration provides a connection URL from its Configure screen. Remote clients can use a Home Assistant webhook URL through Nabu Casa or an existing reverse proxy. Clients on the same network can instead use the direct local endpoint exposed on port 9584.

The component supports remote access through a secret URL or Home Assistant sign-in, as well as direct local-network access. These connection modes are disabled initially, so an administrator must enable the mode needed by the client. The server can also run as a Home Assistant app, an external Docker HTTP server, or a local stdio process.

Only one deployment should be configured for a given client. Running the custom component, app, Docker or PyPI server, and local stdio server together can result in duplicate entries and connection hangs.

Setup and configuration

For the recommended installation, add the repository to HACS, install the HA-MCP Custom Component, restart Home Assistant, and add the HA-MCP Server integration. Setup accepts either a long-lived Home Assistant access token or credentials for a dedicated administrator account, which the integration can use to create a token. The Configure screen then supplies the client connection URL.

A manual installation is also available by copying custom_components/ha_mcp_tools/ into the Home Assistant config/custom_components/ directory before restarting. The Home Assistant app is available for OS and Supervised installations and supplies its MCP URL in the app logs without requiring token setup.

External Docker or PyPI deployments use the Home Assistant URL and a long-lived access token. The integration includes an administrator-only HA-MCP sidebar panel for managing tools, feature flags, backups, and themes.

Tools and capabilities

  • Query Home Assistant entity states.
  • Control smart-home devices.
  • Execute Home Assistant services.
  • Manage automations.
  • Enable optional file and YAML editing tools.
  • Connect through webhook, local HTTP, or stdio transports depending on deployment.

Limitations and notes

The custom component, app, Docker, PyPI, and stdio methods are separate installations; select one per client. File and YAML editing requires explicit opt-in configuration. The app deployment is intended for Home Assistant OS and Supervised systems, while external deployments are useful for Container, Core, or separate-host setups. Remote clients require an enabled remote access mode and an appropriate connection URL.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Ha MCP

ha-mcp is an MCP server that connects AI assistants to Home Assistant. Its main tools let agents query entity states, control smart-home devices, execute Home Assistant services, and manage automations. Optional file and YAML editing tools can be enabled separately, and the server supports in-process, app, Docker, PyPI, and stdio deployments.

Install the HA-MCP Custom Component through HACS, restart Home Assistant, and add the HA-MCP Server integration. Configure an access token or dedicated administrator account, choose a connection method, then copy the URL from the integration’s Configure screen. Home Assistant OS and Supervised users can alternatively install the app.

Yes, Container and Core installations can use an external deployment such as Docker, PyPI, or local stdio. The in-process custom component also supports Home Assistant OS, Supervised, Container, and Core installations, while the Home Assistant app is intended for OS and Supervised systems.

The requirement depends on the deployment. The custom component accepts a long-lived access token or credentials for a dedicated administrator account, while the Home Assistant app does not require token setup. External Docker or PyPI deployments use the Home Assistant URL and a long-lived token.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHa MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/ha-mcp?style=directory)](https://allmcps.com/mcp/ha-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/ha-mcp"><img src="https://allmcps.com/api/badge/ha-mcp?style=directory" alt="Ha MCP on AllMCPs" /></a>