GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ~/jackwent.co.uk
  • Jack Went
  • contact
  • linkedin
  • github
  • youtube
  • privacy
  • terms
  • 2:projects
  • 3:tools
  • 4:games
  • 5:feeds
  • 6:blog

This view

  • Original page
  • New address

GeezerVison is showing jackwent.co.uk — Claude and Home Assistant MCP: Setup and Safety | Jack Went

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 isAn integration in Home Assistant that lets AI apps such as Claude control devices and read state
Where it livesSettings, System, AI, then the Model Context Protocol card
Main address/api/mcp on your Home Assistant
My settingsFull access, administrators only, read only off, all chosen on purpose
What needs meLocks, 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.

claude to home assistant over mcpconnected

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.

SettingWhat it doesDefault
Expose all AI toolsOffers every set of tools, including ones that integrations add laterOn
Require an administrator accountOnly admin users can connectOn
Read-onlyLeaves out anything that changes something, including calling actionsOff

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.

jack@jackwent:~$ rate --this-post

Was this helpful?

jack@jackwent:~$ whoami

Written by Jack Went. I'm Head of Technical Delivery at a Managed Service Provider, with over 20 years in IT and 35 certifications. The projects on this site are things I've built and run at home.

More about me and my certifications

jack@jackwent:~$ ls -lht ~/blog

More from the blog

total 7 7 pages

wazuh-alerts.logSecurity Monitoring at Home with Wazuh-rw-r--r--21 Nov 265.3Kpfsense-26-10-ce-plus-mergepfSense CE and Plus Are Merging: What Changes in 26.10 and How I'll Upgrade-rw-r--r--16 Nov 263.7Krename.logRenaming My SaaS: SkillVortex Is Now SkillsLedger-rw-r--r--14 Nov 264.0Kopendyslexic.mdWhy This Site Now Has an OpenDyslexic Switch-rw-r--r--14 Oct 262.4Kbuilding-skillsledger.mdBuilding SkillsLedger: My Skills Matrix App-rw-r--r--09 Oct 265.1Khouse-rules.mdThe Home Assistant Rules My Smart Home Lives By-rw-r--r--07 Oct 267.7Kai-and-dyslexia.mdHow AI Helps Me Work Smarter with Dyslexia-rw-r--r--02 Oct 253.9K
jack@jackwent:~$ ls -lht ~/projects | head -3

Related projects

total 3 3 pages

llm-doorbell.yamlA Sarcastic AI Doorbell in Home AssistantTurn a doorbell camera into a cheeky British commentator with LLM Vision and Home Assistant. The full prompt, settings and real examples.-rw-r--r--07 Oct 268.1Kserver-alerts.yamlOne Alert for the Whole HomelabOne Home Assistant notification listing every offline server and pending update, which clears itself when everything is healthy. Full YAML included.-rw-r--r--07 Oct 267.6Kha-mqtt-agent.shMonitor Ubuntu Servers in Home Assistant Using MQTTOne bash script puts each Ubuntu or Debian server in Home Assistant: CPU, RAM, disk, pending updates and a reboot button. No Python, no YAML.-rwxr-xr-x16 Oct 2523K

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.

sections

  1. Two Kinds of MCP in Home Assistant
  2. How I Connect Claude
  3. The Settings That Matter
  4. What Claude Can and Can’t Do
  5. What I Use It For
  6. Where the ESPHome Device Builder Fits
  7. Tips If You Want to Try It
  8. Final Thoughts
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.