Home Assistant MCP Server

v1.0.6
io.github.jarahkon/hass-mcp-server Checked 2 days ago Published 8 months ago

MCP server for full Home Assistant control — dashboards, files, automations, add-ons, and more

Values you need

VariableWhat it is
HA_URLrequired Home Assistant base URL (e.g. http://homeassistant.local:8123)
HA_TOKENrequired secret Home Assistant long-lived access token
HA_SSH_HOSToptional SSH hostname for file management (optional)
HA_SSH_PORToptional SSH port (default: 22)
HA_SSH_USERoptional SSH username (must be root)
HA_SSH_KEY_PATHoptional Path to SSH private key
HA_SSH_PASSWORDoptional secret SSH password (alternative to key)

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add hass-mcp-server -e 'HA_TOKEN=<HA_TOKEN>' -e 'HA_URL=<HA_URL>' -- npx -y @jarahkon/hass-mcp-server@1.0.6
Add to claude_desktop_config.json
{
  "mcpServers": {
    "hass-mcp-server": {
      "args": [
        "-y",
        "@jarahkon/hass-mcp-server@1.0.6"
      ],
      "command": "npx",
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "HA_URL": "<HA_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "hass-mcp-server": {
      "args": [
        "-y",
        "@jarahkon/hass-mcp-server@1.0.6"
      ],
      "command": "npx",
      "env": {
        "HA_TOKEN": "<HA_TOKEN>",
        "HA_URL": "<HA_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "HA_TOKEN",
      "id": "ha-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "HA_URL",
      "id": "ha-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "hass-mcp-server": {
      "args": [
        "-y",
        "@jarahkon/hass-mcp-server@1.0.6"
      ],
      "command": "npx",
      "env": {
        "HA_TOKEN": "${input:ha-token}",
        "HA_URL": "${input:ha-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.hass-mcp-server]
command = "npx"
args = ["-y", "@jarahkon/hass-mcp-server@1.0.6"]
env = { "HA_TOKEN" = "<HA_TOKEN>", "HA_URL" = "<HA_URL>" }

For AI agents

  1. Ask the user for: HA_URL, HA_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: ha_list_dashboards, ha_create_dashboard, ha_update_dashboard, ha_delete_dashboard, ha_get_dashboard_config, ha_save_dashboard_config, ha_list_files, ha_read_file, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json