Common questions and solutions for ha-mcp setup.
No. Claude Desktop works with a free Claude account. The MCP integration is available to all users, though free accounts have usage limits.
You can also use ha-mcp with other AI clients. See the Setup Wizard for 15+ supported clients.
No. The HA add-on is just one installation method. Most users run ha-mcp directly on their computer using uvx (recommended for Claude Desktop). The add-on is only needed if you want to run ha-mcp inside your Home Assistant OS environment.
| Feature | Built-in HA MCP | ha-mcp |
|---|---|---|
| Tools | ~15 basic tools | 80+ comprehensive tools |
| Focus | Device control | Full system administration |
| Automations | Limited | Create, edit, debug, trace |
| Dashboards | No | Full dashboard management |
| Cameras | No | Screenshot and analysis |
Built-in = operate devices. ha-mcp = administer your system.
Want to test before connecting to your own Home Assistant? Use our public demo:
https://ha-mcp-demo-server.qc-h.net demo mcp / mcp The demo environment resets weekly. Your changes won't persist.
v7.0.0 removed the Home Assistant URL field from the OAuth consent form to fix security vulnerabilities (SSRF and XSS). Set HOMEASSISTANT_URL as a server-side environment variable before starting ha-mcp.
# Docker
docker run -d -p 8086:8086 \
-e HOMEASSISTANT_URL=https://your-ha-instance.example.com \
-e MCP_BASE_URL=https://your-mcp-server.example.com \
ghcr.io/homeassistant-ai/ha-mcp:latest ha-mcp-oauth
# uvx
HOMEASSISTANT_URL=https://your-ha-instance.example.com \
MCP_BASE_URL=https://your-mcp-server.example.com \
uvx --from=ha-mcp@latest ha-mcp-oauth The consent form now accepts only the token. See the full migration guide for details.
If ha-mcp connects to the demo server but fails to reach your local Home Assistant (192.168.x.x, 10.x.x.x, etc.) on macOS, check the following. See #867 (Local Network Privacy), #630 (env vars), #773 (Python version) for related reports.
macOS Sequoia silently blocks subprocess connections to local network IPs. Claude Desktop spawns uvx as a child process, and macOS may block its outbound LAN connections without showing a permission dialog.
Workaround — SSH tunnel to localhost:
macOS does not restrict connections to localhost, so an SSH port forward bypasses the restriction:
ssh -N -L 8123:localhost:8123 user@your-ha-server-ip Then set HOMEASSISTANT_URL to http://localhost:8123 in your config.
Third-party firewalls may block python or node processes spawned by Claude Desktop. Check your firewall rules and allow connections for these processes. See #780 for an example resolution.
Home Assistant running in container mode (Docker, K3s) uses HTTP by default. Using https:// causes a TLS handshake error. Use http:// unless you have explicitly configured SSL/TLS or a reverse proxy.
ha-mcp requires Python 3.13+. If you are on Python 3.12 or older, uvx installs an outdated version with known bugs (including read-only filesystem errors). Upgrade Python:
brew install python@3.13 Then force a refresh:
uvx --refresh ha-mcp@latest If uvx still uses the old Python after installing 3.13, explicitly pin it by adding --python 3.13 to your config args:
"args": ["--python", "3.13", "ha-mcp@latest"] If your Home Assistant uses HTTPS with a self-signed certificate or custom CA, you may see SSL verification errors.
Docker solution:
cat $(python3 -m certifi) /path/to/your-ca.crt > combined-ca-bundle.crt SSL_CERT_FILE:
docker run --rm \
-e SSL_CERT_FILE=/certs/ca-bundle.crt \
-v ./combined-ca-bundle.crt:/certs/ca-bundle.crt:ro \
... After installing uv, restart your terminal (or Claude Desktop) for the PATH changes to take effect.
Mac:
# Reload shell or restart terminal
source ~/.zshrc
# Or verify with full path
~/.local/bin/uvx --version Windows:
# Restart PowerShell/cmd after installing uv
# Or use full path
%USERPROFILE%\.local\bin\uvx.exe --version Claude Desktop note: Claude Desktop does not inherit your shell's PATH. If uvx is not found even after restarting, use the absolute path in your config instead of uvx. Find it with which uvx in your terminal, then set "command": "/Users/<you>/.local/bin/uvx" (macOS/Linux) or the equivalent Windows path.
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonIf you're having trouble setting up remote access — TLS errors, Cloudflare configuration issues, or port forwarding problems — the Webhook Proxy add-on may be a simpler alternative.
Instead of requiring a dedicated tunnel to port 9583, the Webhook Proxy routes MCP traffic through Home Assistant's main port (8123) via a webhook. If you already have Nabu Casa or any reverse proxy pointing at your HA instance, this can be the easiest remote setup.
See #784 for an example where this resolved a TLS connection issue.
uvx downloads packages on first runFASTMCP_SHOW_SERVER_BANNER=false to your stdio env config. This disables the startup banner that Antigravity misinterprets as unexpected output.
uvx ha-mcp@latest --version in your terminal first to download and cache the package before Antigravity tries to start it.
If tools stop responding or the connector appears disconnected in Claude.ai:
Before setting up a client, you can run a quick smoke test against the public demo server to confirm uvx is installed and ha-mcp launches correctly:
HOMEASSISTANT_URL=https://ha-mcp-demo-server.qc-h.net HOMEASSISTANT_TOKEN=demo uvx ha-mcp@latest This starts ha-mcp in stdio mode connected to the public demo Home Assistant instance. Press Ctrl+C to stop. If it launches without errors, your environment is ready — replace the URL and token with your own values to connect to your Home Assistant.
To run the ha-mcp HTTP server detached from the terminal so it survives logout:
nohup uvx --from ha-mcp@latest ha-mcp-web > /dev/null 2>&1 & nohup detaches the process from the terminal and redirects output to /dev/null. The trailing & sends it to the background. For more robust setups (auto-restart on crash, start on boot), use systemd or the Home Assistant add-on instead.
When running ha-mcp-web in Docker, the port is set in two independent places and they must match:
-p HOST:CONTAINER — this is the container-side port Docker listens onMCP_PORT environment variable — this is the port ha-mcp binds inside the containerIf these differ, the container starts but requests never reach the server. Example using port 9000:
docker run -d --name ha-mcp \
-p 9000:9000 \
-e HOMEASSISTANT_URL=http://homeassistant.local:8123 \
-e HOMEASSISTANT_TOKEN=your_token \
-e MCP_PORT=9000 \
ghcr.io/homeassistant-ai/ha-mcp:latest \
ha-mcp-web The first number in -p (the host port) can be anything — only the second number must match MCP_PORT.
Some tools require a companion custom component installed in Home Assistant. Standard HA APIs do not expose file system access or YAML config editing. This component provides both.
Tools that require the component:
ha_config_set_yaml — Safely add, replace, or remove top-level YAML keys in configuration.yaml and package files (automatic backup, validation, and config check)ha_list_files — List files in allowed directories (www/, themes/, custom_templates/)ha_read_file — Read files from allowed paths (config YAML, logs, www/, themes/, custom_templates/, custom_components/)ha_write_file — Write files to allowed directoriesha_delete_file — Delete files from allowed directoriesAll other tools work without the component. These five return an error with installation instructions if the component is missing.
Using HACS (recommended):
To add manually: open HACS > Integrations > three-dot menu > Custom repositories > add https://github.com/homeassistant-ai/ha-mcp (category: Integration) > Download.
After installing, restart Home Assistant. Then open Settings > Devices & Services > Add Integration and search for HA MCP Tools.
Manual install: Copy custom_components/ha_mcp_tools/ from the repository into your HA config's custom_components/ directory. Restart Home Assistant, then add the integration as described above.
Yes. The component is required, but the tools are also gated by feature flags for safety:
| Variable | Enables |
|---|---|
HAMCP_ENABLE_FILESYSTEM_TOOLS=true | ha_list_files, ha_read_file, ha_write_file, ha_delete_file |
ENABLE_YAML_CONFIG_EDITING=true | ha_config_set_yaml |
HAMCP_ENABLE_CUSTOM_COMPONENT_INTEGRATION=true | ha_install_mcp_tools (automated installer) |
| Variable | Description | Required |
|---|---|---|
HOMEASSISTANT_URL | Your Home Assistant URL | Yes |
HOMEASSISTANT_TOKEN | Long-lived access token (or demo) | Yes |
BACKUP_HINT | Backup recommendation level | No |
| Mode | Behavior |
|---|---|
strong | Suggests backup before first modification each day/session |
normal | Suggests backup only before irreversible operations (recommended) |
weak | Rarely suggests backups |
auto | Same as normal (future: auto-detection) |
We'd love to hear how you're using ha-mcp!
Ready to get started? Go to Setup Wizard