ha-automation-mcp
Summary: This MCP server exposes the Home Assistant Automation API as ~58 tools, letting an AI agent manage automations, helpers, dashboards, registries, and entities without touching YAML (note: deprecated since v1.1.0 in favor of the integration's built-in MCP endpoint at /api/automation_api/mcp).
Automations — list, read (live state + raw YAML), create/update, delete, and manually trigger
Managed package — CRUD for helpers (
input_boolean/input_datetime/input_number/input_select/input_text/input_button), template entities,history_statssensors, and notify groups; plus bulk read/overwrite of the whole packageDashboards (Lovelace) — create/update/delete dashboards; read/overwrite config; append/replace/delete views and cards
Registries — entities, devices, and config entries: list/get/update/delete, rename, hide, disable, plus reload/enable/disable/remove integrations
History — query recorder state history for one or more entities with time windows, counts, and optional significant/minimal filtering
System & native HA — reload config (all or by domain), restart Home Assistant, read the Automation API log, get entity state, and call any HA service
Allows AI agents to manage Home Assistant through the Home Assistant Automation API, including automations (list, read, create/update, delete, trigger), managed package helpers and template/history_stats entities, notify groups, Lovelace dashboards and cards, entity/device/config-entry registries, recorder history, reload/restart, entity states, and service calls.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ha-automation-mcp create an automation that turns off all lights at 11pm"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ha-automation-mcp
Deprecated. Since v1.1.0 the Home Assistant Automation API integration serves the same 58 tools itself, over Streamable HTTP at
/api/automation_api/mcp. Point your MCP client there; this standalone server is no longer maintained.
MCP server for the Home Assistant Automation API custom integration. It exposes the integration's REST API as MCP tools, so an AI agent can manage Home Assistant without anyone pasting YAML:
automations: list, read (live state and YAML), create/update, delete, trigger
managed package: helpers (
input_*), template entities,history_statssensors, notify groupsLovelace dashboards: dashboards, views and cards
registries: entities, devices, config entries (reload / enable / disable / remove)
recorder history, reload and restart
native HA: entity state and service calls
Requirements
Home Assistant with the
automation_apiintegration (>= 1.0.0) installed via HACSA long-lived access token of an administrator (profile → Security)
For the managed package tools, packages enabled in
configuration.yaml:homeassistant: packages: !include_dir_named packages
Related MCP server: Home Assistant MCP Server
Configuration
Variable | Required | Description |
| yes | Base URL, e.g. |
| yes | Long-lived access token of an administrator, used for every call |
Install and run
The server speaks MCP over stdio. Install it as a tool with uv:
uv tool install git+https://github.com/aderik/ha-automation-mcpThat puts ha-automation-mcp on your PATH. To run it without installing:
uvx --from git+https://github.com/aderik/ha-automation-mcp ha-automation-mcpClaude Code
claude mcp add ha-automation -s user \
-e HA_URL=http://homeassistant.local:8123 \
-e HA_TOKEN=... \
-- ha-automation-mcpLogicForce
Under Settings → MCP connections:
Field | Value |
Name |
|
Transport |
|
Command |
|
Arguments |
|
Secrets |
|
The first start in a container downloads Python and the server (about half a minute); LogicForce allows for that, and later starts are cached. To upgrade, change the tag in the arguments.
Available Tools
58 toolsappend_dashboard_cardC
Append a card to the given view.
card is any valid Lovelace card config (e.g. {"type": "entities", ...}).
Inputs: card (required), url_path (required), view_index (required).
append_dashboard_viewC
Append a view to a dashboard.
A view looks like:: {"title": "Moestuin", "path": "moestuin", "icon": "mdi:sprout", "cards": [ ... ]}
Inputs: view (required), url_path (required).
call_serviceC
Call any Home Assistant service via the native REST API.
Example: domain='light', service='turn_on', data={'entity_id': 'light.kitchen', 'brightness': 200}.
Inputs: domain (required), service (required), data.
create_dashboardA
Create a new storage-mode Lovelace dashboard.
The dashboard is immediately visible under Settings → Dashboards and at
/lovelace-<url_path>. It starts empty; add views and cards separately.
Args: url_path: URL slug — e.g. 'moestuin' yields /lovelace-moestuin. title: Sidebar title. icon: MDI icon, e.g. 'mdi:sprout'. show_in_sidebar: Whether to show in the left sidebar. require_admin: Admin‑only access.
Inputs: title (required), url_path (required), icon, require_admin, +1 more.
create_or_update_automationB
Create or update an automation (written to automations.yaml + reloaded).
Args: id: Stable slug (no 'automation.' prefix), e.g. 'living_room_lights_on'. name: Friendly name shown in the UI. trigger: List of HA trigger dicts. action: List of HA action dicts. condition: Optional list of HA condition dicts. description: Free-form description. mode: HA mode — 'single', 'restart', 'queued', or 'parallel'.
Inputs: id (required), name (required), action (required), trigger (required), +3 more.
delete_automationB
Delete an automation by id (removes it from automations.yaml).
Inputs: automation_id (required).
delete_dashboardA
Delete a custom dashboard. The default Overview cannot be deleted.
Inputs: url_path (required).
delete_dashboard_cardC
Delete a specific card from a view.
Inputs: url_path (required), card_index (required), view_index (required).
delete_dashboard_viewC
Delete the view at the given index.
Inputs: url_path (required), view_index (required).
delete_deviceA
Remove a device from the registry. Cascades to all entities of that device. The owning integration may re-add it on next discovery.
Inputs: device_id (required).
delete_helperC
Delete a helper from the managed package and reload the domain.
Inputs: domain (required), helper_id (required).
delete_history_stats_sensorB
Delete a history_stats sensor (HA restart required).
Inputs: name (required).
delete_notify_groupB
Delete a notify group (HA restart required).
Inputs: name (required).
delete_registry_entityA
Remove an entity from the registry. Active integrations may re-add
it on reload — use delete_device or remove_config_entry instead
if the entity belongs to a still-active integration.
Inputs: entity_id (required).
delete_template_entityB
Delete a template entity by type + name (reloads template domain).
Inputs: name (required), template_type (required).
disable_config_entryA
Soft-disable an integration (its devices/entities go unavailable but registry entries remain).
Inputs: entry_id (required).
enable_config_entryC
Re-enable a previously disabled integration.
Inputs: entry_id (required).
get_automationA
Get a single automation by id (e.g. 'solaredge_power_notify').
Returns live state + attributes. Use get_automation_yaml for the raw
YAML config (triggers / conditions / actions).
Inputs: automation_id (required).
get_automation_api_logB
Return the Automation API log file (automation_api.log).
Contains a record of every create/update/delete/trigger the integration has performed via REST, WebSocket, or service calls.
Inputs: no named parameters.
get_automation_yamlA
Return raw YAML config from automations.yaml.
Pass automation_id for a single automation, or omit to get everything.
Inputs: automation_id.
get_config_entryC
Get full details for a single config entry.
Inputs: entry_id (required).
get_dashboard_configB
Return the full Lovelace config of a dashboard.
Structure: {"title": ..., "views": [{"title": ..., "cards": [...]}, ...]}.
Inputs: url_path.
get_deviceC
Get full registry details for a single device id.
Inputs: device_id (required).
get_helperC
Return the config of a single helper in the managed package.
Inputs: domain (required), helper_id (required).
get_historyA
Fetch state-change history for one or more entities from HA's recorder.
Default window: last 24 hours. Use this to diagnose flapping sensors (count of changes) or to inspect when an automation last ran.
Args:
entity_id: A single entity id, or comma-separated list for multiple
(e.g. 'sensor.x,sensor.y').
hours: Window length in hours, ending at end (default now).
days: Window length in days. Ignored if hours is set.
start: ISO-format start datetime (e.g. '2026-05-22T00:00:00+00:00').
Overrides hours/days.
end: ISO-format end datetime (default: now).
significant: If true, use get_significant_states (HA's filtered
view). Default false = every recorded state change.
minimal: Smaller response shape (state + last_changed only).
Default true.
no_attributes: Strip attributes from the response. Default true.
Returns: {start, end, counts: {entity_id: n}, items: {entity_id: [...]}}.
counts is the quickest way to see how often a sensor flipped.
Inputs: entity_id (required), end, days, hours, +4 more.
get_history_stats_sensorC
Return the config of a single history_stats sensor.
Inputs: name (required).
get_managed_packageB
Return the full managed package file as JSON (helpers, templates, etc.).
Inputs: no named parameters.
get_notify_groupC
Return the config of a single notify group.
Inputs: name (required).
get_registry_entityC
Get full registry details for a single entity_id.
Inputs: entity_id (required).
get_stateC
Get the current state of any HA entity via the native REST API.
Inputs: entity_id (required).
get_template_entityC
Return the config of a single template entity by type + name.
Inputs: name (required), template_type (required).
list_areasA
List every area (room) defined in Home Assistant.
Inputs: no named parameters.
list_automationsA
List every automation known to Home Assistant.
Returns the entity_id, slug id, friendly name, current state, and last trigger timestamp for each automation (as reported by the state machine).
Inputs: no named parameters.
list_config_entriesA
List installed integrations (config entries).
Each item has entry_id, domain, title, state, disabled_by,
supports_unload, supports_remove_device. Filter by domain
(integration name like 'tuya' or 'wiz').
Inputs: domain.
list_dashboardsA
List every Lovelace dashboard (url_path, title, mode, icon).
Inputs: no named parameters.
list_devicesB
List devices from HA's device_registry.
Each item has id, name, name_by_user, manufacturer, model,
area_id, config_entries (list of entry ids), identifiers,
connections, disabled_by. Filter by integration to scope (e.g.
'tuya' to find all Tuya devices).
Inputs: model, area_id, disabled, integration, +2 more.
list_entitiesB
List Home Assistant entities with optional filters.
Args: domain: Filter by domain, e.g. 'light', 'switch', 'sensor'. area: Filter by area name (case-insensitive), e.g. 'Woonkamer'. search: Substring match against entity_id or friendly name.
Inputs: area, domain, search.
list_helpersC
List helpers of the given domain in the managed package.
Inputs: domain (required).
list_history_stats_sensorsB
List all history_stats sensors in the managed package.
Inputs: no named parameters.
list_notify_groupsA
List all notify groups in the managed package.
Inputs: no named parameters.
list_registry_entitiesB
List entries from HA's entity_registry with full details.
Returns each entity with unique_id, platform (integration name),
device_id, area_id, name (user-set), original_name (from
integration), disabled_by, hidden_by, config_entry_id. Use this
to find duplicates, orphans, or filter by integration.
Inputs: domain, area_id, disabled, platform, +2 more.
list_template_entitiesC
List all template entities of the given type in the managed package.
Inputs: template_type (required).
overwrite_managed_packageA
Overwrite the entire managed package file (expert / bulk migration use).
Triggers homeassistant.reload_all afterwards. Prefer the targeted upsert_* tools for day-to-day changes.
Inputs: content (required).
reload_configA
Reload HA config.
With no arguments → calls homeassistant.reload_all. With a list of domains → reloads each individually (input_boolean, input_datetime, template, automation, script, scene, ...).
Inputs: domains.
reload_config_entryB
Reload an integration without restarting HA.
Inputs: entry_id (required).
remove_config_entryA
Fully remove an integration. Cascades: all its devices and entities are removed from the registries. Irreversible — to restore, re-add the integration via Settings → Devices & services.
Inputs: entry_id (required).
replace_dashboard_cardC
Replace a specific card within a view.
Inputs: card (required), url_path (required), card_index (required), view_index (required).
replace_dashboard_viewC
Replace the view at the given index.
Inputs: view (required), url_path (required), view_index (required).
restart_home_assistantA
Schedule a Home Assistant restart (fire-and-forget).
Use after creating/updating/deleting notify groups or history_stats sensors, which have no reload service.
Inputs: no named parameters.
set_dashboard_configA
Overwrite the entire Lovelace config of a dashboard.
config must contain at least {"views": [...]}.
Inputs: config (required), url_path (required).
trigger_automationA
Manually fire an automation's actions, bypassing triggers + conditions.
Accepts either the slug ('my_auto') or the full entity_id ('automation.my_auto').
Inputs: automation_id (required).
update_dashboard_metadataB
Update dashboard metadata (title, icon, show_in_sidebar, require_admin).
Cannot modify the default/Overview dashboard's metadata.
Inputs: changes (required), url_path (required).
update_deviceC
Mutate a device. Supported keys: name_by_user, area_id,
disabled_by (bool).
Inputs: changes (required), device_id (required).
update_registry_entityB
Mutate a registry entity. Supported keys in changes:
name, icon, area_id, new_entity_id (rename),
disabled_by (bool), hidden_by (bool).
Inputs: changes (required), entity_id (required).
upsert_helperA
Create or update a helper (reloads the domain automatically).
Args: domain: One of input_boolean / input_datetime / input_number / input_select / input_text / input_button. helper_id: Slug used as the helper id, e.g. 'moestuin_startdatum'. config: Full YAML config dict for the helper. Examples: input_boolean → {"name": "...", "initial": true, "icon": "mdi:bell"} input_datetime → {"name": "...", "has_date": true, "has_time": false} input_number → {"name": "...", "min": 0, "max": 100, "step": 1}
Inputs: config (required), domain (required), helper_id (required).
upsert_history_stats_sensorA
Create or update a history_stats sensor entry.
A HA restart is required for it to take effect (response includes restart_required=true). Example config: {"entity_id": "binary_sensor.moestuin_regent", "state": "on", "type": "time", "end": "{{ now() }}", "duration": {"hours": 2}}
Inputs: name (required), config (required).
upsert_notify_groupA
Create or update a notify platform:group entry.
After writing, HA must be restarted before notify.<name> becomes
available (notify does not support hot reload).
Args:
name: Group name; service becomes notify.<name>.
services: List of notify services to aggregate, e.g.
["mobile_app_sm_s911b", "mobile_app_s25"].
extra: Optional extra top-level keys to include on the group entry.
Inputs: name (required), services (required), extra.
upsert_template_entityB
Create or update a template entity (reloads the template domain).
Args: template_type: One of sensor / binary_sensor / switch / button / number / select. name: Display name; also the unique key used for upsert. config: Template config (e.g. {"state": "{{ ... }}", "unit_of_measurement": "d", "icon": "mdi:sprout", "unique_id": "...", ...}).
Inputs: name (required), config (required), template_type (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 58 tools
Tools are largely grouped into clear CRUD families by resource (automations, helpers, dashboards, registry, etc.), but some overlaps exist: list_entities vs list_registry_entities, get_state vs get_history, and multiple upsert_* families can be confused without consulting descriptions. Descriptions help distinguish intent, so an agent can usually pick correctly.
Names are predominantly snake_case with a verb_noun pattern (list_*, get_*, delete_*, etc.), making the set readable. However, there is an inconsistent mix of create_or_update_automation versus the upsert_* convention used for other resources, plus varied verbs like set, append, replace, and overwrite.
With 58 tools, the server far exceeds the recommended 3–15 range and spans many disparate Home Assistant admin domains beyond automations (dashboards, registry, devices, config entries). The large number of CRUD groups multiplies the surface and makes the server heavy and harder to navigate.
The tool surface thoroughly covers automations, helpers, template entities, notify groups, history stats sensors, dashboards (down to view/card level), registry entities, devices, and config entries. Gaps remain for script and scene management, and there is no area creation/deletion, but core automation workflows are complete.
Maintenance
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control and monitor Home Assistant smart home devices through natural language interactions. Supports device control, entity state monitoring, history access, and automation generation with both MCP protocol and standalone HTTP REST API modes.1MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to control Home Assistant smart home devices via MCP, with zero external dependencies. Supports calling services, getting states, and looking up service parameters.37 npmMIT
- FlicenseNot gradedqualityBmaintenanceConnects LLM coding agents to Home Assistant instances, enabling configuration file management, service calls, template testing, and automation diagnostics via MCP tools.2-
- AlicenseNot gradedqualityCmaintenanceExposes a Home Assistant instance as an MCP tool set, running as a stateful agent on Cloudflare Workers, enabling clients to read entity states, call services, run scripts and automations, and send commands to phones.114 npmApache 2.0