loading…
Search for a command to run...
loading…
Enhanced Home Assistant MCP server with 22 context efficient tools for smart home control, automation trace debugging, entity registry management, CEL expressio
Enhanced Home Assistant MCP server with 22 context efficient tools for smart home control, automation trace debugging, entity registry management, CEL expression queries, and long-term statistics.
PyPI version License: MIT Docker Pulls Tests
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:
| 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 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 hostand usehttp://localhost:8123.
pip install hass-mcp-plus
Run the server:
HA_URL=http://homeassistant.local:8123 HA_TOKEN=YOUR_LONG_LIVED_TOKEN uvx hass-mcp-plus
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.
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"
}
}
}
}
YOUR_LONG_LIVED_TOKEN with your actual token and update HA_URL to match your Home Assistant instanceHass-MCP-Pluscommanddocker run -i --rm -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN rmaher001/hass-mcp-plus
YOUR_LONG_LIVED_TOKEN with your actual token and update HA_URLHere are some examples of prompts you can use with Claude once Hass-MCP-Plus is set up:
Hass-MCP-Plus provides 24 tools for interacting with Home Assistant:
get_entity: Get the state of a specific entity with optional field filteringentity_action: Perform actions on entities (turn on, off, toggle) with domain-specific parameterslist_entities: Get entities with domain filtering, search, and output format options (lean/compact/detailed)search_entities: Search for entities matching a query string across IDs, names, and attributesquery_entities: Filter entities using CEL expressions with numeric comparisons and boolean logicdomain_summary: Get a summary of a domain's entities with state distribution and examplessystem_overview: Get a comprehensive overview of the entire Home Assistant systemget_entity_registry: Get detailed registry entry for a single entity (platform, device, area, status)list_entity_registry: List all registry entries with optional domain filter (for auditing and bulk management)update_entity: Update entity properties — rename, change icon, assign area, disable/enable, hide/unhideremove_entity: Remove an entity from the registry (requires explicit confirm=True flag)list_automations: Get all automations with pagination supportlist_automation_traces: Get recent execution traces for a specific automationget_automation_trace: Get detailed trace for a specific automation run (trigger, conditions, actions, errors)get_error_log: Get the Home Assistant error log with integration/level filteringget_core_logs: Get core journal logs (DEBUG/INFO/WARNING/ERROR) with integration/pattern filteringset_log_level: Set log level for any integration (enable debug logging, then read with get_core_logs)get_history: Get raw state change history with automatic pagination and samplingget_history_range: Get state changes for a specific date/time range with sampling strategiesget_statistics: Get aggregated statistics (mean, min, max) with configurable periods (5min/hour/day/week/month)get_statistics_range: Get long-term statistics for any date range — the best tool for historical analysisget_version: Get the Home Assistant versioncall_service: Call any Home Assistant service (low-level API access)restart_ha: Restart Home Assistantuv run pytest tests/ -v
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"hass-mcp-plus": {
"command": "npx",
"args": []
}
}
}