Interact with Home Assistant to control smart home devices, query states, manage automations, and troubleshoot your smart home setup.
A Model Context Protocol (MCP) server for Home Assistant integration with Claude and other LLMs.
Hass-MCP enables AI assistants like Claude to interact directly with your Home Assistant instance, allowing them to:
Pull the Docker image:
docker pull voska/hass-mcp:latest
Add the MCP server to Claude Desktop:
a. Open Claude Desktop and go to Settings
b. Navigate to Developer > Edit Config
c. Add the following configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"hass-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"HA_URL",
"-e",
"HA_TOKEN",
"voska/hass-mcp"
],
"env": {
"HA_URL": "http://homeassistant.local:8123",
"HA_TOKEN": "YOUR_LONG_LIVED_TOKEN"
}
}
}
}
d. Replace YOUR_LONG_LIVED_TOKEN
with your actual Home Assistant long-lived access token
e. Update the HA_URL
:
http://host.docker.internal:8123
(Docker Desktop on Mac/Windows)f. Save the file and restart Claude Desktop
The "Hass-MCP" tool should now appear in your Claude Desktop tools menu
Note: If you're running Home Assistant in Docker on the same machine, you may need to add
--network host
to the Docker args for the container to access Home Assistant. Alternatively, use the IP address of your machine instead ofhost.docker.internal
.
Hass-MCP
command
docker run -i --rm -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN voska/hass-mcp
YOUR_LONG_LIVED_TOKEN
with your actual Home Assistant tokenTo use with Claude Code CLI, you can add the MCP server directly using the mcp add
command:
Using Docker (recommended):
claude mcp add hass-mcp -e HA_URL=http://homeassistant.local:8123 -e HA_TOKEN=YOUR_LONG_LIVED_TOKEN -- docker run -i --rm -e HA_URL -e HA_TOKEN voska/hass-mcp
Replace YOUR_LONG_LIVED_TOKEN
with your actual Home Assistant token and update the HA_URL to match your Home Assistant instance address.
Here are some examples of prompts you can use with Claude once Hass-MCP is set up:
Hass-MCP provides several tools for interacting with Home Assistant:
get_version
: Get the Home Assistant versionget_entity
: Get the state of a specific entity with optional field filteringentity_action
: Perform actions on entities (turn on, off, toggle)list_entities
: Get a list of entities with optional domain filtering and searchsearch_entities_tool
: Search for entities matching a querydomain_summary_tool
: Get a summary of a domain's entitieslist_automations
: Get a list of all automationscall_service_tool
: Call any Home Assistant servicerestart_ha
: Restart Home Assistantget_history
: Get the state history of an entityget_error_log
: Get the Home Assistant error logHass-MCP includes several prompts for guided conversations:
create_automation
: Guide for creating Home Assistant automations based on trigger typedebug_automation
: Troubleshooting help for automations that aren't workingtroubleshoot_entity
: Diagnose issues with entitiesroutine_optimizer
: Analyze usage patterns and suggest optimized routines based on actual behaviorautomation_health_check
: Review all automations, find conflicts, redundancies, or improvement opportunitiesentity_naming_consistency
: Audit entity names and suggest standardization improvementsdashboard_layout_generator
: Create optimized dashboards based on user preferences and usage patternsHass-MCP provides the following resource endpoints:
hass://entities/{entity_id}
: Get the state of a specific entityhass://entities/{entity_id}/detailed
: Get detailed information about an entity with all attributeshass://entities
: List all Home Assistant entities grouped by domainhass://entities/domain/{domain}
: Get a list of entities for a specific domainhass://search/{query}/{limit}
: Search for entities matching a query with custom result limituv run pytest tests/
Dynamic and reflective problem-solving through thought sequences
Interact with task, doc, and project data in Dart, an AI-native project management tool
Contract and template management for drafting, reviewing, and sending binding contracts.
Perform queries and entity operations in your Fibery workspace.
Human-in-the-loop platform - Allow AI agents and automations to send requests for approval to your gotoHuman inbox.
Turn your Make scenarios into callable tools for AI assistants.
Notion official MCP server
Create spaced repetition flashcards in Rember to remember anything you learn in your chats
Connect your AI Agents to 8,000 apps instantly.
Talk with your Apple Notes