# Home Assistant

> Home Assistant is an open-source MCP server for productivity. Query a Home Assistant's states and history and run actions, approving locks first. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://foreverworks.github.io/mcps/servers/home-assistant/
- **Repository:** https://github.com/foreverworks/mcps/tree/HEAD/servers/home-assistant
- **MCP Registry name:** com.foreverworks/home-assistant
- **Categories:** productivity
- **Listing updated:** 2026-11-14

## About

The server talks to a Home Assistant instance you can reach on your network or through its remote address, using a long-lived access token. It reads entities, areas, history and the logbook, and render_template lets the assistant answer anything a template can compute. Running an action is the only thing that changes state.

Actions in the lock, alarm_control_panel, cover and valve domains need your approval call by call before they run, and HOME_ASSISTANT_CONFIRM_DOMAINS changes that list. A malformed value refuses every action until fixed, so a typo cannot silently turn approval off. A non-administrator token is recommended; the server itself refuses administrator-only actions such as restarts, and render_template is the one tool that needs an admin token.

There is no account to open and no cost. After a refused token, the server never resends it, because Home Assistant may ban an address after a few failed logins. It has 10 tools, is marked beta and needs Node 22.19 or newer.

## Features

- **State and history reads:** Reads entities, areas, history and the logbook.
- **Template queries:** render_template answers questions a Home Assistant template can.
- **Action calls:** Dims lights, sets thermostats and starts scripts.
- **Per-call approval:** Locks, alarm panels, covers and valves need your approval each time.
- **Admin-action refusal:** Refuses restarts and reloads with a non-admin token.
- **Ban-safe sign-in:** Never sends a refused token twice.

## Good for

- Check which lights are on
- See how a room's temperature changed overnight
- Find out what unlocked the front door
- Dim a light or lock a door after approving it

## Install

### Claude Code (Terminal)

```sh
claude mcp add home-assistant --env HOME_ASSISTANT_URL='<HOME_ASSISTANT_URL>' --env HOME_ASSISTANT_TOKEN_FILE='<HOME_ASSISTANT_TOKEN_FILE>' -- npx -y @foreverworks/mcp-home-assistant
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "home-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>",
        "HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "home-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>",
        "HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "home-assistant": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>",
        "HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "home-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>",
        "HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "home-assistant": {
      "command": "npx",
      "args": [
        "-y",
        "@foreverworks/mcp-home-assistant"
      ],
      "env": {
        "HOME_ASSISTANT_URL": "<HOME_ASSISTANT_URL>",
        "HOME_ASSISTANT_TOKEN_FILE": "<HOME_ASSISTANT_TOKEN_FILE>"
      }
    }
  }
}
```

## Tools

- `render_template`: Render a Home Assistant template; needs an administrator token

## FAQ

### Which token should I use?

A non-administrator user's long-lived token is recommended; only render_template needs an admin token.

### Which actions require approval?

By default lock, alarm_control_panel, cover and valve; set HOME_ASSISTANT_CONFIRM_DOMAINS to change it.

### Does it cost anything?

No account and no cost.

### Is it stable?

The page marks it beta.

### Is Home Assistant free?

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

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

Run this command in your terminal: claude mcp add home-assistant --env HOME_ASSISTANT_URL='<HOME_ASSISTANT_URL>' --env HOME_ASSISTANT_TOKEN_FILE='<HOME_ASSISTANT_TOKEN_FILE>' -- npx -y @foreverworks/mcp-home-assistant

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

The closest alternatives to Home Assistant are Ha MCP, Concord MCP, note1, CalderFlow and nicemails.

## Alternatives

- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): Ha MCP is an open-source MCP server for productivity.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [CalderFlow](https://ai-powered.com/mcp/calderflow): CalderFlow is a free MCP server for design and media.
- [nicemails](https://ai-powered.com/mcp/nicemails): nicemails is a freemium MCP server for communication.
- [ConvertAudioToText](https://ai-powered.com/mcp/convertaudiototext): ConvertAudioToText is a freemium MCP server for design and media.
- [MeetBetr](https://ai-powered.com/mcp/meetbetr): MeetBetr is a free MCP server for productivity.
- [Hostlet](https://ai-powered.com/mcp/hostlet): Hostlet is a free MCP server for productivity.

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