Ha MCP logo

Ha MCP

Connects AI assistants to Home Assistant for device control, state queries, service execution, and automation management.

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.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

  • home-assistant
  • home-automation
  • smart-home
  • mcp

The ha-mcp MCP server connects AI assistants to Home Assistant and exposes tools for controlling devices, querying entity states, executing services, and managing automations. It can run inside Home Assistant through the HACS custom component, as a Home Assistant app, or externally with Docker or PyPI/uvx. Clients connect through a webhook, local HTTP endpoint, or stdio depending on the installation method. Reach for it when an agent needs to inspect or operate a Home Assistant installation through natural-language requests.

Use cases

  • Control smart-home devices with natural-language requests
  • Query Home Assistant entity states
  • Execute Home Assistant services from an AI client
  • Manage Home Assistant automations
  • Edit YAML when the optional tools are enabled

Key features

  • Home Assistant device control
  • Entity state queries
  • Home Assistant service execution
  • Automation management
  • Optional file and YAML tools
  • Webhook and local HTTP access

Security & health

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

ActiveLast checked 2d ago

Recent health check succeeded.

12/12 checks healthy over the last 40d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 4Low 2

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

Adoption & maintenance

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

GitHub stars5.1kStargazers on the source repository.
Last commit2d agoMost recent push to the default branch.

How Ha MCP works

What ha-mcp does

The ha-mcp MCP server gives MCP-compatible AI clients access to Home Assistant operations. Its documented capabilities include controlling smart-home devices, reading states, calling Home Assistant services, and working with automations. The project advertises 87 tools, although the available set can depend on configuration and enabled feature flags.

This fits the Home Automation category for assistants that need to inspect a Home Assistant setup or perform actions on its behalf. The server acts through a Home Assistant administrator account or token in the recommended custom-component setup.

How it works

The preferred deployment is the HA-MCP Custom Component, installed through HACS. It runs the server in the Home Assistant process and supports Home Assistant OS, Supervised, Container, and Core installations. After installation and a restart, an administrator configures the integration, selects an access method, and copies the connection URL from the integration’s Configure screen.

Remote clients can use a Home Assistant webhook URL, including one exposed through Nabu Casa or an existing reverse proxy. Clients on the same network can connect to the direct local endpoint on port 9584. The component can require Home Assistant sign-in, or it can use a secret URL as the credential. Local-only deployments can leave webhook access disabled.

Other deployment options include a Home Assistant app for OS and Supervised installations, Docker in HTTP mode, and the published PyPI package through uvx or pip. The app provides a connection URL in its logs and does not require separate token setup. Docker and PyPI deployments use a Home Assistant URL and long-lived access token.

Setup and configuration

Install the custom component from HACS, restart Home Assistant, add the HA-MCP Server integration, and choose the account or token it should use. The setup then enables remote access, local-network access, or both. Manual installation is also supported by copying the component into config/custom_components/ before restarting.

Only one installation method should be configured for a given client. The custom component, app, Docker deployment, and local stdio process are separate server instances; adding more than one entry can cause connection hangs.

File and YAML editing is separate from the main setup. Those opt-in tools are disabled by default and require the HA-MCP File & YAML Tools entry. An administrator-only HA-MCP sidebar panel can manage tools, feature flags, backups, and themes while the server is running.

Tools and capabilities

The documented tool groups cover:

  • Querying Home Assistant entity states.
  • Controlling smart-home devices.
  • Executing Home Assistant services.
  • Managing automations.
  • Editing files and YAML when the related feature flags and entry are enabled.

The ha_config_set_yaml tool is marked as beta in version 7.3.0 documentation. The available tools can be managed through the server’s settings panel.

Limitations and notes

The project is an unofficial Home Assistant MCP server. Authentication and exposure depend on the selected deployment: a secret URL, Home Assistant sign-in, local network access, or an external server configuration. Treat long-lived tokens and secret URLs as credentials; the setup guidance warns that a token created on a personal account works from anywhere if it leaks.

The Home Assistant app is limited to OS and Supervised installations. Container and Core users can use the custom component or an external deployment instead. File and YAML features are not enabled by default, and the YAML configuration tool is beta. A client must support the selected MCP transport and be pointed at exactly one ha-mcp MCP server instance.

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 clients control smart-home devices, query entity states, execute Home Assistant services, and manage automations. It can run as a Home Assistant component, app, Docker service, or PyPI/uvx process.

Install the HA-MCP Custom Component through HACS, restart Home Assistant, add the HA-MCP Server integration, and copy its connection URL.

Yes, ha-mcp works with Claude Desktop through a supported MCP connection.

Yes, but file and YAML editing is optional and disabled by default. Enable the relevant feature flags and add the HA-MCP File & YAML Tools entry. The `ha_config_set_yaml` tool is marked beta in version 7.3.0.

Connect the client using the URL shown by the selected deployment. The custom component provides a webhook or local endpoint, the Home Assistant app prints its URL in the logs, and Docker or PyPI/uvx deployments provide their configured HTTP or stdio connection. Configure only one server entry per client.

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>