Technical article · Home Assistant · AI

Controlling Home Assistant with AI: what the MCP server exposes and how to limit it

“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.

Integration
Model Context Protocol Server (mcp_server), core
Since
Home Assistant 2025.2
Boundary
only entities exposed to Assist
Not supported
sampling, notifications
Status
October 2026 · primary sources below, with date checked
Author
Julian Haag, state-certified electrical engineering technician
Play the video: Claude and Home Assistant, three ways
Video on YouTube (8:22): connecting Claude to Home Assistant. The MCP server starts at 5:26, limiting its permissions at 6:46. As of 2026.11. The narration voice is synthetic. Clicking the image starts the video here at 5:26. Only then does your browser load content from YouTube (Google); see the privacy policy, section 9.

The essentials in one minute

What the MCP server is – and what the MCP integration is

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:

Two integrations, two directions
Model Context Protocol ServerModel Context Protocol
Domainmcp_servermcp
Directionan external language model controls Home AssistantHome Assistant uses the tools of a third-party MCP server
Typical counterpartClaude, ChatGPT, Claude Code, Cursor and othersconversation agents in Home Assistant: Anthropic, Google Generative AI, Ollama, OpenAI
Since2025.22025.2
IoT classLocal PushLocal Polling
Quality scaleSilverSilver

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.

What a language model reaches through the MCP server The language model, for example Claude or ChatGPT, connects over HTTPS to the Home Assistant MCP server at /api/mcp; if it runs in the cloud, Home Assistant must be reachable from the internet. The server passes on the tools of the Assist API, without administrative tasks, and they act only on entities on the expose list. Exposed by default are, among others, switch, light, climate, cover including garage doors, water_heater and fan. Not exposed automatically are locks, alarm panels, power and energy sensors and hidden entities. Language model Claude, ChatGPT … HTTPS Home Assistant MCP server /api/mcp Assist API (tools) no administrative tasks Expose list exposed entities only If the model runs in the cloud, HA must be reachable from the internet. Exposed by default switch · light · climate cover (incl. garage door) water_heater · fan … Not automatic lock · alarm power, energy hidden entities
Based on the documentation of the “Model Context Protocol Server” integration and the list in exposed_entities.py (Home Assistant Core, checked on 13.10.2026). Outlined in red: what a model may switch without you doing anything.

What the language model gets

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:

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.

What is exposed without you doing anything

“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:

Exposed to Assist automatically (Home Assistant Core, exposed_entities.py)
TypeExposed
Whole domainsclimate, cover, fan, humidifier, light, media_player, scene, switch, todo, vacuum, water_heater
Binary sensorsonly classes door, garage door, lock, motion, opening, presence, window
Sensorsonly classes air quality, CO, CO₂, humidity, PM10, PM2.5, temperature, volatile organic compounds
Never automaticallyentities with a category (configuration, diagnostic) and hidden entities

For an energy management system this means two things:

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.

Limiting access

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:

  1. Go through the exposure list from top to bottom. Before setting up, not afterwards. Untick everything a model should not switch: immersion heater, pumps, garage door, sockets feeding devices that should not run unattended.
  2. Turn off automatic exposure of new entities. Otherwise the list silently grows with every new integration.
  3. Expose scripts rather than devices. A script “heat hot water to 60 °C once” is a narrowly defined tool. An exposed switch is a switch the model can operate as long and as often as it likes.
  4. Do not expose more LLM APIs than needed. According to the documentation, Expose all LLM APIs is on by default and includes APIs added later by other integrations. If you only want Assist, turn it off and select Assist under Control Home Assistant.
  5. Consider the administrator account. With Require an administrator account, only administrator accounts may use the /api/mcp endpoint. The Assist API itself performs no administrative tasks; the option governs who may connect, not what the model may do.

Remote access is part of the equation

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.

Unofficial MCP servers have more rights

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.

“At least as capable as KNX”?

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.

Setup in brief

  1. Check and trim the exposure list under Settings › Voice assistants › Expose, as described above.
  2. Under Settings › System › AI, enable MCP if necessary and copy the URL of the MCP server you want. The documentation recommends “My MCP” “because it lets the AI agent control everything Home Assistant has access to” – the boundary is still the exposure list.
  3. Connect in the client. On claude.ai and in Claude Desktop via Add custom connector with OAuth sign-in; in Claude Code in the terminal with claude mcp add home-assistant --transport http <URL>, then /mcp and Authenticate.
  4. If sign-in keeps failing, the documentation points to the file 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.

Frequently asked questions

What can an AI do in Home Assistant through the MCP server?

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.

Which devices are exposed to the AI by default?

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.

Does Home Assistant have to be reachable from the internet?

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.

Can the MCP server replace automations?

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.

What is the difference between the MCP server and the MCP integration?

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.

Sources

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.