ha-mcp
An MCP server for Home Assistant: the agent reads smart-home state and controls devices through your instance
High risk
We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.
Why this level
- Controls real smart-home devices
- Uses a long-lived Home Assistant access token
- Connected users share the server credentials
Install
Manual install
uvx ha-mcp@latestRuns the server in streamable HTTP mode from the PyPI package. Needs the Home Assistant URL and token.
This is third-party code. Review the repository files before installing.
What it does
ha-mcp connects an AI agent to your Home Assistant server over MCP. The agent sees devices, entities and their state, calls services and controls the smart home in natural language. The server runs in HTTP mode via Docker or a PyPI package, points at your Home Assistant URL and a long-lived token, and connects to the client through a secret URL. Remote access has dedicated paths, and sign-in can sit behind an external OIDC provider.
Who it is for. For Home Assistant smart-home owners who want to control it through an AI assistant.
Good fit when
- You want to control Home Assistant devices from an agent chat
- You want the agent to see entity state and call services
- You need remote access to the home through an agent with access protection
Not a fit when
- You have no Home Assistant server
- You cannot issue a long-lived access token
- You need only public data reads, not home control
Example request
Turn off the living room lights and show which doors are open nowLimitations
Requires a Home Assistant instance and a long-lived token. The streamable HTTP transport is recommended; stdio has known connection issues. All authenticated users share the server's Home Assistant credentials.
How to disable. Stop the ha-mcp container or process and remove the server from the client MCP config; revoke the long-lived token in Home Assistant if needed.
MCP
- Transport
- http, stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| HA_URL required | Your Home Assistant server URL |
| HA_TOKEN required, secret | A Home Assistant long-lived access token |
Security check
- Controls real smart-home devices
- Uses a long-lived Home Assistant access token
- Connected users share the server credentials
README in short
ha-mcp is an unofficial MCP server for Home Assistant that lets an agent read smart-home state and control devices. It runs in HTTP mode via Docker or the ha-mcp PyPI package and connects to Home Assistant with a URL and a long-lived token. A setup wizard produces ready per-client config. There are remote-access options and OIDC-protected sign-in. MIT licensed.
FAQ
Is this an official Home Assistant integration?
No, the authors call it an unofficial MCP server for Home Assistant.
Which transport should I use?
Streamable HTTP via Docker or PyPI is recommended. stdio has known connection issues and is left for demos.
Related
An MCP server with n8n node and template knowledge: the agent picks nodes, validates configs and, with API access, creates workflows in your n8n
Zapier's official MCP plugin: the agent gets actions across thousands of apps through your Zapier account
Awesome Claude Skills by Composio
Awesome Claude Skills
A curated list of Claude skills and plugins, plus Composio's own automation skills for 78 SaaS apps
A plugin and CLI catalog for agents: generates command-line interfaces for GUI apps like GIMP and Blender and installs ready ones via CLI-Hub