ha
A Model Context Protocol (MCP) server that provides AI assistants with access to Home Assistant, enabling smart home control and automation management.
claude mcp add --transport stdio zorak1103-ha-mcp docker run -d --name ha-mcp -p 8080:8080 -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=your-long-lived-token zorak1103/ha-mcp:latest
How to use
ha-mcp is a MCP server that exposes a rich set of Home Assistant focused tools to an AI client via HTTP/WebSocket. It enables you to query entities, manage automations, scripts, and scenes, inspect registries, analyze dependencies, and perform system administration tasks such as config validation and logbook access. The server is designed to work with an external Home Assistant instance, granting AI assistants the ability to read data and perform CRUD operations on Home Assistant resources through a structured MCP interface. You can connect your AI client by configuring a MCP connection entry that points to the ha-mcp instance and includes proper authentication headers or tokens as required by your deployment.
How to install
Prerequisites:
- Docker installed and running on the host
- Access to a Home Assistant URL and a long-lived access token
Install and run the MCP server (Docker):
- Pull and run the image in detached mode, exposing the MCP port (default 8080):
docker run -d --name ha-mcp -p 8080:8080 \
-e HA_URL=http://homeassistant.local:8123 \
-e HA_TOKEN=your-long-lived-token \
zorak1103/ha-mcp:latest
- Verify the container is running:
docker ps | grep ha-mcp
- If you need to stop/remove later:
docker stop ha-mcp
docker rm ha-mcp
Alternative install method if you prefer binary or Go-based builds can be found in the repository releases, but using the Docker image is the recommended approach for quick setup.
Additional notes
- Ensure the Home Assistant URL (HA_URL) and token (HA_TOKEN) are provided and valid; the MCP server relies on these to access Home Assistant data.
- The server exposes port 8080 by default; configure your client to connect to http://<host>:8080.
- For production, consider enabling TLS/HTTPS and WebSocket security as appropriate for your environment.
- You can adjust environment variables and Docker options to fit your deployment (restart policies, logging drivers, network settings).
- If you need more contained setups, you can also build and run the binary directly from source or use other supported deployment methods described in the docs.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
flux-operator
GitOps on Autopilot Mode
lingti-bot
🐕⚡ 「极简至上 效率为王 一次编译 到处执行 极速接入」的 AI Bot
kodit
👩💻 MCP server to index external repositories
github-brain
An experimental GitHub MCP server with local database.
bgg
BGG MCP provides access to BoardGameGeek and a variety of board game related data through the Model Context Protocol. Enabling retrieval and filtering of board game data, user collections, and profiles.