Home Assistant MCP Server
Provides tools for configuring and maintaining a Home Assistant instance: setting up integrations via config flows, managing devices, entities, areas, floors, labels and categories; creating and validating automations, scripts, scenes, helpers, dashboards and blueprints; handling repairs, diagnostics, traces, backups and system reloads.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Home Assistant MCP Server
An MCP (Model Context Protocol) server for setting up and maintaining Home Assistant with an AI assistant. It adds integrations through config flows, organises devices and entities, builds automations, scripts, scenes, helpers, dashboards and blueprints, fixes repairs, debugs automation traces, and manages backups.
It is aimed at configuration, not day-to-day device control. The generic
call_service tool is off by default.
Features
Integration setup -- start and step through config flows, options flows and subentry flows; handle discovered and ignored flows; delete integrations
Registries -- list, search and edit devices, entities, areas, floors, labels and categories; remove orphaned entities and devices
Automations, scripts, scenes -- full CRUD, validated against Home Assistant before saving, plus conflict detection
Helpers --
input_*,counter,timerandschedule, and config-flow helpers (template, group, utility_meter, ...) via config flowsDashboards and blueprints -- views, cards, blueprint import and instantiation
Diagnostics -- repairs, structured system log, automation/script traces, and discovery of the triggers, conditions and services available for a target
Backups -- list, create, delete, and configure automatic backups
System -- reload domains, restart core after a config check, system health
Guided workflows -- six prompt templates
Tools added in 0.2.0 (config flows, registry removal, categories,
diagnostics, backup configuration, counter/timer/schedule helpers)
are not yet verified against a live Home Assistant.
Related MCP server: Home Assistant MCP Server
Security model
MCP clients authenticate with an API key (
Authorization: Bearer <key>). The add-on generates one on first start; the pip version refuses to serve HTTP without one.Confirmation is a server setting (
confirm_mode), never a tool argument, so the model can't skip it.Every tool carries MCP annotations (read-only / destructive), so your client can auto-approve reads and prompt for changes.
read_onlymode exposes only read tools.Shell/Python execution, Supervisor services, stop/restart and recorder purge are blocked in
call_serviceeven when device control is on.
Installation
Home Assistant add-on (recommended)
Settings > Add-ons > Add-on Store, overflow menu (⋮) > Repositories, add
https://github.com/roandegraaf/ha-mcp.Install Home Assistant MCP Server and click Start.
Open the MCP Server panel in the sidebar. It shows your API key and ready-to-copy snippets for Claude Code, Claude Desktop, Cursor, VS Code and other clients.
For example, Claude Code:
claude mcp add --transport http --scope user home-assistant http://homeassistant.local:8099/mcp \
--header "Authorization: Bearer <API_KEY>"Claude Desktop (requires Node.js; Settings > Developer > Edit Config):
{
"mcpServers": {
"home-assistant": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://homeassistant.local:8099/mcp",
"--allow-http", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer <API_KEY>" }
}
}
}Claude Desktop's custom connectors can't reach a server on your LAN, so use the config file above. See docs/configuration.md for all clients.
pip install
Requires Python 3.11+ and a long-lived access token.
pip install .
export HA_MCP_HA_URL="http://homeassistant.local:8123"
export HA_MCP_HA_TOKEN="<long-lived-access-token>"
ha-mcp # stdio, for clients that launch the server themselvesFor HTTP, an API key is required:
export HA_MCP_TRANSPORT=http
export HA_MCP_API_KEY="$(python3 -c 'import secrets; print(secrets.token_urlsafe(32))')"
ha-mcp # serves http://127.0.0.1:8099/mcpConfiguration
Variable | Default | Description |
|
| Home Assistant base URL |
| (required) | Long-lived access token |
|
|
|
|
| Bind address for |
|
| Port for |
| (empty) | Required for |
|
| Allow |
|
|
|
|
| Only expose read-only tools |
|
| Expose |
|
| Logging level |
Documentation
Configuration -- settings, confirmation, client setup
Tools reference -- all 110 tools
License
See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect assistants to your workspace knowledge, skills, and work tools.
Set up and run an in-product AI assistant: widgets, knowledge, MCP connections, usage.
Manage your AI chatbot from your AI assistant: analyze conversations, audit content, configure it.
Zendesk configuration management for AI agents: propose, review, apply and roll back changes.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with Home Assistant to control smart home devices, query entity states, and manage automations using natural language. It provides over 90 tools for comprehensive system management, including dashboard configuration, service execution, and automation debugging.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Home Assistant via natural language, including device control, automation management, and system monitoring.MIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI assistant to set up and maintain a smart-home instance by adding integrations through config flows, editing registries, and building or debugging automations, scripts, scenes, helpers, dashboards, and blueprints. It also covers diagnostics, repairs, trace inspection, and backup management, with read-only and confirmation safeguards.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with Home Assistant through natural language, including device control, state queries, service execution, and management of automations, scripts, dashboards, and backups.MIT