Basics · Energy management
Home Assistant as an energy manager
Installation type, hardware, storage and backup – the foundation before a model is allowed to switch anything.
Read the article →Technical article · Home Assistant · AI
“Home Assistant, a few Shellys and an AI via an MCP server” – that is the answer you get when someone asks whether KNX is still needed at all. What is behind it is more sober: an interface through which a language model may switch exactly the devices you expose to it. Which ones are already exposed without you doing anything is the real question of this article.
Updated on 6 November 2026: Since
Home Assistant 2026.10, the main URL /api/mcp of a new setup exposes all
sets of tools by default, including the “Home Assistant” set, which reads all entities, logs and
history and can perform any action; it requires an administrator account. Since 2026.11 a
language model can also reload integrations through it. What this article says about the
boundary of the Assist exposure list now only applies to the address /api/mcp/assist
(device control). How to limit access is covered in
Connecting Claude to Home Assistant.
/api/mcp/assist the model does not get full access,
but the tools of the Assist API: switching and querying exposed entities, running exposed
scripts. The main URL of a new setup, by contrast, exposes everything since 2026.10 (see the
note above).The Model Context Protocol (MCP) is an open protocol through which applications exchange tools, context and prepared instructions with language models. A server offers tools, a client inside the language model's application uses them. Home Assistant can do both, and the two directions are easily confused:
| Model Context Protocol Server | Model Context Protocol | |
|---|---|---|
| Domain | mcp_server | mcp |
| Direction | an external language model controls Home Assistant | Home Assistant uses the tools of a third-party MCP server |
| Typical counterpart | Claude, ChatGPT, Claude Code, Cursor and others | conversation agents in Home Assistant: Anthropic, Google Generative AI, Ollama, OpenAI |
| Since | 2025.2 | 2025.2 |
| IoT class | Local Push | Local Polling |
| Quality scale | Silver | Silver |
This article is about the MCP server, the direction in which a language model outside Home Assistant switches things in your house. The other direction is less critical: there, Home Assistant's own conversation agent remains the one acting, and it also controls devices via the Assist API and the exposure list.
The server does not pass on commands of its own, but those of a Home Assistant LLM API. The built-in one is called Assist. The developer documentation describes it as equivalent to the capabilities and exposed entities available to the built-in conversation agent, and states: “No administrative tasks can be performed.” Concretely, the client receives three things:
homeassistant://assist/context-snapshot:
a read-only snapshot of the current state, if the API includes the
GetLiveContext tool.The decisive restriction is stated in the documentation under the Control Home Assistant option:
“Clients can only control or provide information about entities that are exposed to them.”
Then there are scripts: exposing a script to Assist turns it into a tool the model can call directly. The script's description becomes the model's instruction on when to use it. The documentation names 1024 characters as the description limit some LLM APIs enforce, 128 characters per field description, and no more than 128 scripts or tools in total.
What the server cannot do is listed in the table of known limitations: sampling and notifications are not supported. Home Assistant therefore cannot tell the model anything on its own initiative. That matters in the KNX section.
“Only exposed entities” sounds like an empty list you fill deliberately. It is not. Home Assistant exposes new entities to Assist automatically unless that setting is turned off – and for Assist it is turned on out of the box. Which entities qualify is set in the source code:
| Type | Exposed |
|---|---|
| Whole domains | climate, cover, fan, humidifier, light, media_player, scene, switch, todo, vacuum, water_heater |
| Binary sensors | only classes door, garage door, lock, motion, opening, presence, window |
| Sensors | only classes air quality, CO, CO₂, humidity, PM10, PM2.5, temperature, volatile organic compounds |
| Never automatically | entities with a category (configuration, diagnostic) and hidden entities |
For an energy management system this means two things:
switch, the heat pump often a climate or
water_heater, a garage door a cover. The model may switch them
as soon as it is connected via the MCP server.Locks (lock) and alarm panels
(alarm_control_panel) are not among the automatically exposed domains. If you
expose a lock by hand, be aware: the turn-off intent unlocks it. The source code
says literally: “For locks, this performs an ‘unlock’ action.” Blinds and garage doors are
opened by the turn-on intent.
The help page on exposing explains the list by saying that sensitive devices such as locks
and garage doors should not be controlled inadvertently by voice. That holds for locks; for
garage doors only if they are not integrated as a cover. You can check under
Settings › Voice assistants › Expose, which lists every entity with its
exposure status.
The MCP specification itself says where security does not come from: tools represent arbitrary code execution, and the protocol cannot enforce its security principles on its own. Responsibility lies with the implementations – on one side the application the model runs in, which should obtain the user's consent before every tool call, on the other side Home Assistant with its exposure list. What is in your hands:
/api/mcp endpoint.
The Assist API itself performs no administrative tasks; the option governs who may
connect, not what the model may do.If the language model runs in the cloud, i.e. in the browser on claude.ai or chatgpt.com, Home Assistant must be reachable from the internet according to the documentation, via Home Assistant Cloud or another remote access method. Claude Code connects over HTTPS only. Sign-in uses OAuth 2.0 with PKCE; some clients such as Cursor use a long-lived access token instead. It follows that the states of all exposed entities go to the model provider with every query. If you have deliberately run your installation locally so far, the MCP server changes two things at once.
Besides the core integration there are community projects. The best known,
ha-mcp, describes itself as “Unofficial” and listed 87 tools on
13.10.2026, including creating and deleting automations, editing dashboards, restoring
backups, managing apps and restarting Home Assistant. By its own comparison it works
with “Everything in Home Assistant”, not just exposed entities, and offers a read-only mode
and per-tool rules for that. That can be useful if a model is meant to help with
configuration. But it is a different security situation from the one described here.
The claim compares two things that work on different levels. KNX is a bus: a push button sends its telegram to the actuator, and the actuator switches without a server or an internet connection in between. A language model via the MCP server is a user interface on top. It can only switch what Home Assistant can switch anyway – whether via KNX, Shelly or something else.
Where a language model helps:
Where logic has to stay deterministic:
Home Assistant sees the roles the same way: in its own article on AI in the smart home the project describes AI as a tool, “as opposed to something that takes over your home”, and lets Assist handle commands first; only what it does not understand goes to the language model. My assessment: a model via MCP is a good interface for a house whose logic is already in place. It is no substitute for that logic, let alone for wiring that switches without a server.
claude mcp add home-assistant --transport http <URL>, then
/mcp and Authenticate.ip_bans.yaml in the configuration directory: if your own IP or the client's
is listed there, remove the entry and restart Home Assistant.The integration is removed under Settings › Devices & services via the entry's three-dot menu and Delete.
That depends on the address. Through /api/mcp/assist it gets the Assist tools: switching exposed entities, querying states and running exposed scripts; entities that are not exposed are invisible to it. Since version 2026.10, the main URL /api/mcp of a new setup exposes every set of tools, including read access to all entities, logs and history and any action, and requires an administrator account. The Read-only option limits it to tools that only read.
New entities are exposed to Assist automatically if they belong to one of eleven domains, including switches, lights, climate, water heaters and covers such as blinds and garage doors. Sensors only for temperature, humidity, air quality and similar classes. Locks and alarm panels are not among them. You can check this under Settings, Voice assistants, Expose.
If the language model runs in the cloud, for example on claude.ai or chatgpt.com, yes. The documentation names Home Assistant Cloud or another remote access method. Claude Code connects over HTTPS only.
No. The integration does not support notifications, so the language model learns of no event by itself. It only acts when asked. Anything that has to react to an event or a time of day belongs in an automation.
The MCP server turns Home Assistant into a tool for an external language model. The MCP integration works the other way round: it connects third-party MCP servers to Home Assistant so that its own conversation agent gets additional tools. Both have existed since version 2025.2.
The information comes from the official Home Assistant documentation and source code and from the MCP specification, each with the date it was checked.
Home Assistant changes every month. What counts is the project's current documentation.
You want to connect a language model and know beforehand everything it could switch in your house? I will go through the exposure settings with you – the first conversation is free.