# Home Assistant MCP

> Home Assistant MCP is an open-source MCP server for smart home. Let coding agents read Home Assistant state, edit automations and flash ESPHome devices. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/vortitron/home-assistant-mcp
- **MCP Registry name:** io.github.Vortitron/home-assistant-mcp
- **Categories:** [smart home](https://ai-powered.com/categories/smart-home), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

The server gives an agent the same loop a person would use: list entities, read live states and history, render a Jinja template against real data, check the configuration, read the logs, then change something and see whether it worked. ha_get_system_log is the suggested first stop for deduplicated, structured errors, and ha_get_trace shows which step of an automation run failed.

Writes are off by default. In direct mode they require HA_ALLOW_WRITE=true, and creating or updating automations also needs HA_ALLOW_CONFIG_WRITE. Connecting uses HA_URL plus a long-lived HA_TOKEN, or a VOMEHOME_TOKEN to reach the home through the Vome service. ESPHome dashboard support covers editing, validating, compiling and flashing firmware.

It is part of the Vome family and an open-source companion to the managed VomeHome. In Claude Code, four side panes show the automation being edited, the ESPHome device being built, a home health score and a dashboard.

## Features

- **Entity and history access:** Lists entities, areas and devices and reads states, history and logbook.
- **Template rendering:** Tests Jinja2 templates against live state.
- **Log and trace debugging:** Structured system log and per-run automation traces.
- **Gated writes:** Service calls and edits stay off until enabled.
- **ESPHome workflow:** Edit, validate, compile and flash device firmware.
- **Camera stills:** Returns a camera's current image for the agent to see.

## Good for

- Debug an automation that does not fire
- Create or update a helper without restarting
- Check why an integration is logging errors
- Build and flash ESPHome firmware from a chat
- Review the Energy dashboard setup

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add home-assistant-mcp --env HA_TOKEN='<HA_TOKEN>' --env VOMEHOME_TOKEN='<VOMEHOME_TOKEN>' -- npx -y @vortitron/home-assistant-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add home-assistant-mcp --env HA_TOKEN='<HA_TOKEN>' --env VOMEHOME_TOKEN='<VOMEHOME_TOKEN>' -- npx -y @vortitron/home-assistant-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.home-assistant-mcp]
command = "npx"
args = ["-y", "@vortitron/home-assistant-mcp"]
env = { HA_TOKEN = "<HA_TOKEN>", VOMEHOME_TOKEN = "<VOMEHOME_TOKEN>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e HA_TOKEN='<HA_TOKEN>' -e VOMEHOME_TOKEN='<VOMEHOME_TOKEN>' home-assistant-mcp npx -- -y @vortitron/home-assistant-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "home-assistant-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@vortitron/home-assistant-mcp"
      ],
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "VOMEHOME_TOKEN": "<VOMEHOME_TOKEN>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 17 tools change data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `ha_get_config` (name suggests: reads): Returns core config such as version and time zone.
- `ha_list_entities` (name suggests: reads): Lists entities by domain, search or area.
- `ha_get_state` (name suggests: reads): Returns state and attributes for entities.
- `ha_get_history` (name suggests: reads): Returns state changes over a time window.
- `ha_render_template`: Renders a Jinja2 template against live state.
- `ha_check_config` (name suggests: reads): Validates the configuration.
- `ha_get_system_log` (name suggests: reads): Returns deduplicated structured errors.
- `ha_get_error_log` (name suggests: reads): Tails the raw error log.
- `ha_list_automations` (name suggests: reads): Lists automations with state and last triggered.
- `ha_get_automation` (name suggests: reads): Returns an automation's full config.
- `ha_list_traces` (name suggests: reads): Lists recent automation runs.
- `ha_get_trace` (name suggests: reads): Shows step-by-step detail of one run.
- `ha_camera_image`: Returns a camera's current still.
- `ha_get_energy_prefs` (name suggests: reads): Returns the Energy dashboard setup.
- `ha_call_service`: Calls a Home Assistant service; write-gated.
- `ha_set_automation` (name suggests: changes): Creates or updates an automation; write-gated.
- `ha_set_helper` (name suggests: changes): Creates or updates a helper; write-gated.

## FAQ

### Can Home Assistant MCP change my home by default?

No. Writes are refused until HA_ALLOW_WRITE is set to true.

### What does Home Assistant MCP need to connect?

A Home Assistant URL and long-lived token, or a Vome key.

### Does Home Assistant MCP support ESPHome?

Yes, optionally through the ESPHome dashboard.

### Which clients does Home Assistant MCP target?

Cursor, VS Code Copilot, Claude Desktop and other MCP clients.

### Is Home Assistant MCP free?

Yes. Home Assistant MCP is open source, so you can use and self-host it for free.

### How do I add Home Assistant MCP to Claude Code?

Run this command in your terminal: claude mcp add home-assistant-mcp --env HA_TOKEN='<HA_TOKEN>' --env VOMEHOME_TOKEN='<VOMEHOME_TOKEN>' -- npx -y @vortitron/home-assistant-mcp

### What are the best alternatives to Home Assistant MCP?

The closest alternatives to Home Assistant MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/home-assistant-mcp-2
