Skip to content
MCP server

Home Assistant

Query a Home Assistant's states and history and run actions, approving locks first

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.1.3
Listing updated
3 days ago

About Home Assistant

Home Assistant is an open-source MCP server for productivity. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a 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

Add to claude_desktop_config.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>"
      }
    }
  }
}

Add to ~/.cursor/mcp.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>"
      }
    }
  }
}

Add to .vscode/mcp.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>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.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>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "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>"
      }
    }
  }
}

Configuration

  • HOME_ASSISTANT_URLThe address you open Home Assistant at, such as http://homeassistant.local:8123.Required
  • HOME_ASSISTANT_TOKEN_FILEPath of a file holding a long-lived access token made in an administrator's Home Assistant profile.Required
  • HOME_ASSISTANT_CONFIRM_DOMAINSAction domains you approve call by call, comma-separated (default lock,alarm_control_panel,cover,valve; none for none).

Tools this server provides (1)

Taken from the project documentation; the running server may differ.

render_template
Render a Home Assistant template; needs an administrator token

What it does

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

Pricing

Open source

Free npm package; no account or cost.

Prices change. Check foreverworks.github.io before you buy.

Home Assistant 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 to Home Assistant

  1. Ha MCP

    MCP server

    MCP server for managing and automating Home Assistant from AI assistants

    Runs locally
    • 8 tools
    • Open source
    • 7.9K GitHub stars
    • Productivity
  2. Concord MCP

    MCP server

    Local-first MCP server for messaging and shared work-state between coding agents

    Runs locally
    • Freemium
    • 1.3K GitHub stars
    • Developer tools
  3. note1

    MCP server

    MCP server giving AI assistants search and summaries across your note1 meetings

    • 4 tools
    • Remote
    • Free trial
    • 1 GitHub star
    • Productivity
  4. CalderFlow

    MCP server

    Turn notes or specs into editable flowcharts, timelines and funnels from an AI assistant

    • 10 tools
    • Remote
    • Free
    • Design and media
  5. nicemails

    MCP server

    Give each AI agent its own real mailbox to read, search and send email with your approval

    • 8 tools
    • Remote
    • Freemium
    • Communication
  6. Transcribe audio and video links from Claude or ChatGPT and read the results

    Not checked yet
    • 5 tools
    • Remote
    • Freemium
    • Design and media