MCP server/other

Hass-MCP-Plus MCP Server

Enhanced Home Assistant MCP server for smart home control and debugging

★ 2rmaher001/hass-mcp-plus ↗by rmaher001updated
1

Add it to Claude Code

claude mcp add -e "HA_URL=${HA_URL}" -e "HA_TOKEN=${HA_TOKEN}" hass-mcp-plus -- docker run -i --rm -e HA_URL -e HA_TOKEN rmaher001/hass-mcp-plus
Required:HA_URLHA_TOKEN+ 2 optional
2

Make your agent remember this setup

hass-mcp-plus's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • 24 tools for entity control, registry management, and logs
  • CEL expression filtering for complex entity queries
  • Long-term statistics aggregation with date range support
  • Automation trace inspection for debugging failed runs
  • Context flooding prevention and input validation

Tools 5

entity_controlControl and query state of Home Assistant entities
registry_managementManage Home Assistant entity registry with safe deletion
statistics_queryRetrieve long-term statistics with aggregation and date ranges
log_accessAccess core journal logs with filtering
automation_traceInspect automation traces for debugging failed runs

Environment Variables

HA_URLrequiredHome Assistant URL (e.g., http://192.168.1.100:8123)
HA_TOKENrequiredHome Assistant Long-Lived Access Token
HA_VERIFY_SSLSet to true to enable SSL certificate verification
TZTimezone (e.g., America/Los_Angeles)

Try it

What's the current state of my living room lights?
Turn off all the lights in the kitchen
Find all battery sensors below 20%
Show me the hourly temperature statistics for the last week
Why didn't my motion sensor trigger the hallway light?
Original README from rmaher001/hass-mcp-plus

Hass-MCP-Plus

A complete rewrite of voska/hass-mcp — an MCP server for Home Assistant built for token efficiency, security hardening, and context flooding prevention. Thanks to Matt Voska for the original project.

Features:

  • 24 tools covering entity control, registry management, statistics, logs, and automation debugging
  • CEL expression filtering for complex entity queries (e.g., "all battery sensors below 20%")
  • Entity registry management with safe two-phase delete
  • Long-term statistics with hourly/daily/weekly/monthly aggregation and date range support
  • Core journal log access with debug-level and integration filtering
  • Automation trace inspection for debugging failed runs
  • Configurable output formats (lean/compact/detailed)
  • Input validation, error sanitization, and context flooding prevention across all calls
  • Works with Claude Desktop, Claude Code, Cursor, and other MCP clients

Installation

Prerequisites

Environment Variables

Variable Required Description
HA_URL Yes Home Assistant URL (e.g., http://192.168.1.100:8123)
HA_TOKEN Yes Home Assistant Long-Lived Access Token
HA_VERIFY_SSL No Set to true to enable SSL certificate verification (default: false). Useful when using HTTPS with self-signed certificates.
TZ No Timezone (e.g., America/Los_Angeles)

Docker (Recommended)

docker pull rmaher001/hass-mcp-plus:latest

Verify the server starts correctly:

docker run -i --rm \
  -e HA_URL=http://homeassistant.local:8123 \
  -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN \
  rmaher001/hass-mcp-plus

Note: If Home Assistant is running on the same machine, use http://host.docker.internal:8123 (Docker Desktop on Mac/Windows) or add --network host and use http://localhost:8123.

Python (uv/uvx)

pip install hass-mcp-plus

Run the server:

HA_URL=http://homeassistant.local:8123 HA_TOKEN=YOUR_LONG_LIVED_TOKEN uvx hass-mcp-plus

Client Configuration

<details> <summary><strong>Claude Code (CLI)</strong></summary>
claude mcp add hass-mcp-plus \
  -e HA_URL=http://homeassistant.local:8123 \
  -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN \
  -- docker run -i --rm -e HA_URL -e HA_TOKEN rmaher001/hass-mcp-plus

Replace YOUR_LONG_LIVED_TOKEN with your actual token and update HA_URL.

</details> <details> <summary><strong>Claude Desktop</strong></summary>
  1. Open Claude Desktop → Settings → Developer → Edit Config
  2. Add to claude_desktop_config.json:

Using Docker:

{
  "mcpServers": {
    "hass-mcp-plus": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HA_URL",
        "-e",
        "HA_TOKEN",
        "rmaher001/hass-mcp-plus"
      ],
      "env": {
        "HA_URL": "http://homeassistant.local:8123",
        "HA_TOKEN": "YOUR_LONG_LIVED_TOKEN"
      }
    }
  }
}

Using uvx:

{
  "mcpServers": {
    "hass-mcp-plus": {
      "command": "uvx",
      "args": ["hass-mcp-plus"],
      "env": {
        "HA_URL": "http://homeassistant.local:8123",
        "HA_TOKEN": "YOUR_LONG_LIVED_TOKEN"
      }
    }
  }
}
  1. Replace YOUR_LONG_LIVED_TOKEN with your actual token and update HA_URL to match your Home Assistant instance
  2. Save and restart Claude Desktop
</details> <details> <summary><strong>Cursor</strong></summary>
  1. Go to Cursor Settings → MCP → Add New MCP Server
  2. Fill in the form:
    • Name: Hass-MCP-Plus
    • Type: command
    • Command:
      docker run -i --rm -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN rmaher001/hass-mcp-plus
      
  3. Replace YOUR_LONG_LIVED_TOKEN with your actual token and update HA_URL
  4. Click "Add" to save
</details>

Usage Examples

Here are some examples of prompts you can use with Claude once Hass-MCP-Plus is set up:

  • "What's the current state of my living room lights?"
  • "Turn off all the lights in the kitchen"
  • "Find all battery sensors below 20%"
  • "Give me a summary of my climate entities"
  • "Show me the hourly temperature statistics for the last week"
  • "Why didn't my motion sensor

Frequently Asked Questions

What are the key features of Hass-MCP-Plus?

24 tools for entity control, registry management, and logs. CEL expression filtering for complex entity queries. Long-term statistics aggregation with date range support. Automation trace inspection for debugging failed runs. Context flooding prevention and input validation.

What can I use Hass-MCP-Plus for?

Debugging complex automation failures using trace inspection. Querying large numbers of sensors using CEL expressions. Analyzing long-term energy or temperature trends. Managing and cleaning up Home Assistant entity registries.

How do I install Hass-MCP-Plus?

Install Hass-MCP-Plus by running: docker pull rmaher001/hass-mcp-plus:latest

What MCP clients work with Hass-MCP-Plus?

Hass-MCP-Plus works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep Hass-MCP-Plus docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest