MCP server for ESPHome

Hey folks, I've built a MCP server for ESPHome to allow you to interact with it directly from whatever AI you're using (in my case, Open Design + Claude Code to make pretty UIs).

You can check it out here: GitHub - loryanstrant/ESPHome-MCP: A MCP server for ESPHome that supports the new Device Builder functionality released in build 2026.6 Β· GitHub

(There were 2 other MCP projects, but they hadn't been updated to handle the new API and methods used in ESPHome 2026.6.)

Great stuff! Does it also work with openweb ui?

I have been working hard to get a good lvgl display (1400+ lines now!), and Claude is key for that.

But more direct integration would make things even easier.

Sure does!
However, I have Claude talk directly to it.

I have the docker running on Portainer and connected to ESPHome. But connecting it to Open WebUI hasn't worked yet. Seems to me that the issue is that the docker image doesn't support OpenAI connection types?

How are you connecting it?
It should be added as a tool server.

and

  # ─────────────────────────────────────────
  # ESPHome MCP native server
  # ─────────────────────────────────────────
  mcp-esphome:
    image: ghcr.io/loryanstrant/esphome-mcp:latest
    container_name: mcp-esphome
    restart: unless-stopped
    environment:
      - ESPHOME_DASHBOARD_URL=${ESPHOME_DASHBOARD_URL}
      - ESPHOME_API_KEY=${ESPHOME_API_KEY}
    networks:
      - webui-net

  # ─────────────────────────────────────────
  # mcpo bridge for ESPHome MCP (HTTP type)
  # ─────────────────────────────────────────
  mcp-esphome-proxy:
    image: ghcr.io/open-webui/mcpo:latest
    container_name: mcp-esphome-proxy
    restart: unless-stopped
    command: [
      "--port", "8090",
      "--type", "streamable_http",
      "http://mcp-esphome:8080/mcp"
    ]
    depends_on:
      - mcp-esphome
    networks:
      - webui-net

Can this connect to esphome if it is running as an addon - i.e. through the ingress controller?

It runs as a standalone Docker container, not as an add on.

can you make it an addon? i know addons are basicaly just docker containers but i dont know how to use docker or convert

How is this different from the MCP server for Home Assistant if ESPHome is an integration on Home Assistant? Wouldn’t Claude be able to see ESPHome through the integration?

In other words, if I have Claude on the Home Assistant MCP server, what would this integration bring to the party.

Note- I have not ventured into MCP for Home Assistant yet, so this is all speculation.

Same differentiation as running Claude code on a HA server’s config folder V. Connecting to that servers MCP tools.

When you need to have an agent edit files on the server you use a direct file repo. Give you tons of power. Can do lots of stuff (and break lots) by having direct access to the filesystem. BUT.

When you want to reboot it? Use that systems predesigned toolset for maybe consistency checks or possibly observe your own code in native env? Do I write a file to make the system reboot? Nope.

THAT is a tool call. Using MCP (in this case.)

Look at the tools provided in this kit. - they allow the agent to see the state of an esphome device from. The admin side. Restart it, get it’s logs etc.

So you could use this inside your HA agent if you want to let it manage esphome (personally never.) you could use it as an mcp tool surface for codex or Claude or opencode or whatev… And they could do the same whether or not you allow the agent to access the filesystem os up to you.

Pair that with a competent code agent that you trust and can write esphome yaml and it can both write the code and deploy it, read it and edit it in a cyclic automated improvement loop… :smiling_face_with_sunglasses:

For me this would exist as a tool for Nyx (my live test agent who does have filesystem access to my test dev ha box.

I could, but as I don’t run HA in a VM I wouldn’t be able to test it.
So, best someone fork the code and make it an addon if they want.

Where running this MCP server is handy, is that I don’t have to use Claude with it and expose all of my HA stuff to a cloud LLM.
I try to self-host as much as possible, especially when sensitive information is concerned.

For all my configs there’s a HARD wall between config and Frontline action. This falls on the sys config side. That’s all. Personal choice. But that’s where it comes from.

i run it on bare hardware with HA OS so i cant really do containers