Skip to main content
Glama

ESPHome MCP Server

An MCP (Model Context Protocol) server for interacting with an ESPHome dashboard. Provides read-only tools to list devices, check for updates, view configurations, and stream logs.

Tools

Tool

Description

list_devices

List all configured devices with versions, addresses, status, and platform info

list_device_names

List only the names of all configured devices

check_device_update

Check if a firmware update is available for a specific device

get_device_status

Check whether a device is online or offline

get_device_version

Get the deployed and current firmware versions for a device

get_device_configuration

View the YAML configuration file for a device, or save it to a local file with output_path

get_device_logs

Stream and collect logs from a device (configurable duration, max 30s)

get_esphome_schema

Get the ESPHome configuration schema for a specific version (list components or get a component's schema)

validate_device_configuration

Validate a configuration without modifying anything — pass a device name (validates the saved config on the dashboard) or a path to a local YAML file (validated with the ESPHome CLI)

edit_device_configuration

Save a new YAML configuration for a device (saves and validates); pass the YAML inline via yaml_content or read it from a local file via config_path

install_device_configuration

Compile and flash firmware to a device via OTA

update_device

Recompile and flash a device with the latest ESPHome version

Related MCP server: Home Assistant MCP Server (HA-mcp)

Installation

pip install .

Or for development:

pip install -e .

Configuration

Set the following environment variables:

Variable

Required

Description

ESPHOME_DASHBOARD_URL

Yes

Base URL of your ESPHome dashboard (e.g., http://192.168.1.100:6052)

ESPHOME_DASHBOARD_USERNAME

No

Username for Basic Auth (if dashboard auth is enabled)

ESPHOME_DASHBOARD_PASSWORD

No

Password for Basic Auth (if dashboard auth is enabled)

LOG_LEVEL

No

Logging level (default: INFO)

Usage

Standalone

export ESPHOME_DASHBOARD_URL=http://192.168.1.100:6052
esphome-mcp

Claude Desktop

Add to your Claude Desktop MCP configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "esphome": {
      "command": "esphome-mcp",
      "env": {
        "ESPHOME_DASHBOARD_URL": "http://192.168.1.100:6052"
      }
    }
  }
}

With authentication

{
  "mcpServers": {
    "esphome": {
      "command": "esphome-mcp",
      "env": {
        "ESPHOME_DASHBOARD_URL": "http://192.168.1.100:6052",
        "ESPHOME_DASHBOARD_USERNAME": "admin",
        "ESPHOME_DASHBOARD_PASSWORD": "your-password"
      }
    }
  }
}

Claude Code

Add a .claude/settings.json to your project to auto-approve the read-only tools exposed by this server:

{
  "permissions": {
    "allow": [
      "mcp__esphome__list_devices",
      "mcp__esphome__list_device_names",
      "mcp__esphome__check_device_update",
      "mcp__esphome__get_device_status",
      "mcp__esphome__get_device_version",
      "mcp__esphome__get_device_configuration",
      "mcp__esphome__get_device_logs",
      "mcp__esphome__get_esphome_schema",
      "mcp__esphome__validate_device_configuration"
    ]
  },
  "mcpServers": {
    "esphome": {
      "command": "esphome-mcp",
      "env": {
        "ESPHOME_DASHBOARD_URL": "http://192.168.1.100:6052"
      }
    }
  }
}

Docker

Build the image:

docker build -t esphome-mcp .

Run standalone:

docker run --rm \
  -e ESPHOME_DASHBOARD_URL=http://192.168.1.100:6052 \
  -p 8080:8080 \
  esphome-mcp

The Docker image runs the MCP server in HTTP mode on port 8080.

Docker Compose

services:
  esphome:
    image: ghcr.io/esphome/esphome
    volumes:
      - ./esphome-config:/config
    ports:
      - "6052:6052"
    restart: unless-stopped

  esphome-mcp:
    image: ghcr.io/kdkavanagh/esphome-mcp:latest
    ports:
      - "8080:8080"
    environment:
      - ESPHOME_DASHBOARD_URL=http://esphome:6052
    # Uncomment if your dashboard has auth enabled:
    # - ESPHOME_DASHBOARD_USERNAME=admin
    # - ESPHOME_DASHBOARD_PASSWORD=your-password
    depends_on:
      - esphome

To use the Docker container with Claude Desktop, configure with the HTTP URL:

{
  "mcpServers": {
    "esphome": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

Disclaimer

I had claude-code write this mcp server, under my (a professional software engineer with 15yrs of experience) supervision.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to interact with Home Assistant to control smart home devices, query entity states, and manage automations using natural language. It provides over 90 tools for comprehensive system management, including dashboard configuration, service execution, and automation debugging.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to manage ESPHome devices via the 2026.6+ dashboard WebSocket protocol, including listing, configuring, validating, and flashing firmware.
      37
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to manage ESPHome devices by listing, inspecting, editing, validating, compiling, and flashing firmware over-the-air via the ESPHome WebSocket API.
      17
      MIT