I use Claude to work on my Home Assistant, and MCP, the Model Context Protocol, is what makes that possible. It lets an AI app use the tools Home Assistant offers, so Claude can read whatās happening and change things. This is how I have it set up, the settings that matter and the rules I keep around it.
| At a glance | |
|---|---|
| What it is | An integration in Home Assistant that lets AI apps such as Claude control devices and read state |
| Where it lives | Settings, System, AI, then the Model Context Protocol card |
| Main address | /api/mcp on your Home Assistant |
| My settings | Full access, administrators only, read only off, all chosen on purpose |
| What needs me | Locks, the alarm and the garage, always |
Two Kinds of MCP in Home Assistant
Home Assistant has two MCP integrations, and they point in opposite directions.
- The Model Context Protocol integration makes Home Assistant an MCP server. An AI app connects to it and uses its tools. This is the one Claude uses.
- The Model Context Protocol Client integration makes Home Assistant the client. It takes tools from another MCP server and passes them to Home Assistantās own conversation agent, such as Assist.
Both arrived in Home Assistant 2025.2, and I use both. The second one is how the ESPHome Device Builder fits in, which I cover below.
How I Connect Claude
Claude here means Jarvis, my Claude Code assistant, which also takes my requests by voice. To get the address, open Settings, System, AI, enable the Model Context Protocol card if it asks, and copy the URL. Claude Code only talks to MCP servers over HTTPS, so Home Assistant needs an HTTPS address.
The official page describes a normal OAuth sign in, and the command is short:
claude mcp add --transport http home-assistant https://<your-home-assistant>/api/mcp
Instead, I pass a long lived access token in the Authorization header, which works for me:
claude mcp add --transport http home-assistant https://<your-home-assistant>/api/mcp \
--header "Authorization: Bearer <long-lived-access-token>"
If you use OAuth with Claude on the web, the client ID is the AI appās own address, such as https://claude.ai. The docs are firm that it must not be your Home Assistant address. Thereās no client secret to fill in. Keep any token out of screenshots, scripts and Git.
The Settings That Matter
The integration has a few options. They apply to the main /api/mcp address.
| Setting | What it does | Default |
|---|---|---|
| Expose all AI tools | Offers every set of tools, including ones that integrations add later | On |
| Require an administrator account | Only admin users can connect | On |
| Read-only | Leaves out anything that changes something, including calling actions | Off |
There are two main sets of tools. Device control reads and controls only the entities youāve exposed to voice assistants. The Home Assistant set is much bigger: it can read every entity, the logs and the history, list and reload integrations, and perform any action. That set always needs an administrator.
I chose full access with administrators only, and I left read only off. Deciding what to allow was the hardest part of the whole setup. Jarvis needs the wider set to do the jobs I give it, so the safety comes from the rules I keep around it.
Each set also has its own address. The Device control one, /api/mcp/assist, is the only one non administrators can use. These per set addresses ignore the options above, so keep that in mind if you use them.
What Claude Can and Canāt Do
With Device control, Claude only sees what Iāve exposed to voice assistants. That list is the first thing to get right, and itās the reason some entities simply donāt show up for it. With the Home Assistant set it can see more, so the limits there are mine.
My rules are the same ones I use for the rest of my homelab:
- Anything to do with locks, the alarm or the garage needs my confirmation, every time.
- Changes to automations and scripts go through a small wrapper script I wrote. It saves the old version first and refuses to touch those sensitive devices.
- Rebooting the Home Assistant host needs my say so.
What I Use It For
- Claude writes or fixes automations and scripts, and the wrapper keeps a backup of every change.
- It reads the logs and history when something looks wrong.
- It builds dashboard config.
- Devices go through Assist, and I can ask by voice with āHey Jarvisā.
Where the ESPHome Device Builder Fits
Iām new to the ESPHome Device Builderās MCP side, so this section is what the documentation says plus one harmless test.
The add-on has its own MCP server. When the add-on starts, it tells Home Assistant about it, Home Assistant shows it as a discovered integration, and you confirm it. After that, Home Assistant is a client of the add-on, using the Model Context Protocol Client from earlier. Because I expose all AI tools, those ESPHome tools show up in Claude too.
There are around twenty tools. They can list your devices, read and edit a deviceās config, add components, check a config, compile it, install it onto the device, follow the progress of those jobs, search the component and board catalogue, and create a new device. They can also work with the secrets file and with automations inside a device.
For my test I only had Claude list my ESPHome devices. It came back with each oneās online state, address and firmware version, and it showed that one device had an update waiting. Nothing was changed.
A few things from the docs are worth knowing before you let an AI loose on this:
- To overwrite a config, the tool has to send back the exact text it read. If the file changed in the meantime, nothing is written.
- Changes land in version history, so a bad edit can be undone.
- Flashing canāt be undone. A config that compiles but drops the Wi-Fi, API or OTA settings, or names the wrong board, can leave a device that only a cable can recover.
- The tools can list secret names and set one value at a time, and output hides concealed values. The docs warn that if the AI reads the secrets file itself, those values go into its context.
Tips If You Want to Try It
- Start with the Read-only option on, and loosen it once you trust what youāre seeing.
- Expose only what it needs. Use the exposed entities list for voice assistants, and keep locks, alarms and garage doors out of reach.
- Keep sensitive actions behind you. Anything risky should need your confirmation.
Final Thoughts
The settings that matter most are which entities you expose to voice assistants and whether read only is on, so look at both before you connect anything. Iāve only done the harmless test with the ESPHome tools so far.
The official pages for the MCP server and the MCP client cover the full option lists, and the ESPHome Device Builder project documents its tools. If you want to see how the rest of my setup fits together, my monitoring post shows how my servers report into Home Assistant.
More from the blog
7 pages
Related projects
3 pages
Got a question about this, or built something similar? Get in touch. New write-ups go out on the RSS feed and LinkedIn, everything I've built is on the projects page, and my free calculators and guides are on the tools page.