Skip to main content
Glama
aderik

ha-automation-mcp

by aderik
README.md
# ha-automation-mcp

> **Deprecated.** Since v1.1.0 the [Home Assistant Automation API](https://github.com/aderik/ha-automation-api#mcp-server)
> 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](https://github.com/aderik/ha-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_stats`
  sensors, notify groups
- Lovelace 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_api` integration (>= 1.0.0) installed via HACS
- A long-lived access token of an **administrator** (profile → Security)
- For the managed package tools, packages enabled in `configuration.yaml`:

  ```yaml
  homeassistant:
    packages: !include_dir_named packages
  ```

## Configuration

| Variable     | Required | Description |
|--------------|----------|-------------|
| `HA_URL`     | yes      | Base URL, e.g. `http://homeassistant.local:8123` |
| `HA_TOKEN`   | 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](https://docs.astral.sh/uv/):

```bash
uv tool install git+https://github.com/aderik/ha-automation-mcp
```

That puts `ha-automation-mcp` on your `PATH`. To run it without installing:

```bash
uvx --from git+https://github.com/aderik/ha-automation-mcp ha-automation-mcp
```

### Claude Code

```bash
claude mcp add ha-automation -s user \
  -e HA_URL=http://homeassistant.local:8123 \
  -e HA_TOKEN=... \
  -- ha-automation-mcp
```

### LogicForce

Under **Settings → MCP connections**:

| Field     | Value |
|-----------|-------|
| Name      | `ha-automation` |
| Transport | `stdio` |
| Command   | `uvx` |
| Arguments | `["--from", "git+https://github.com/aderik/ha-automation-mcp@v1.0.0", "ha-automation-mcp"]` |
| Secrets   | `{"HA_URL": "http://<ha-host>:8123", "HA_TOKEN": "..."}` |

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.

TDQS

B3.1/5.0

Scored across 58 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count2/5

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.

Completeness4/5

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

ActivityMaintained
ResponsivenessNo issues