by voska
Hass-MCP is a Python-based server that integrates AI assistants like Claude with Home Assistant. It acts as a bridge, enabling large language models to interact with smart home devices, query their states, control them, and assist with automation tasks.
Hass-MCP (Home Assistant Model Context Protocol Server) is a Python-based server that integrates AI assistants like Claude with your Home Assistant instance. It acts as a bridge, allowing large language models (LLMs) to interact directly with your smart home devices, query their states, control them, and even assist with automation tasks.
Hass-MCP can be installed using Docker (recommended) or Python 3.13+ with uv
. For Docker, pull the voska/hass-mcp:latest
image. Integration with AI clients like Claude Desktop, Cursor, and Claude Code (CLI) involves adding specific configurations that point to the Hass-MCP server, including your Home Assistant URL and a long-lived access token. The configuration typically involves setting environment variables for HA_URL
and HA_TOKEN
within the client's MCP server settings.
get_version
, get_entity
, entity_action
, list_entities
, search_entities_tool
, domain_summary_tool
, list_automations
, call_service_tool
, restart_ha
, get_history
, and get_error_log
.create_automation
, debug_automation
, troubleshoot_entity
, routine_optimizer
, automation_health_check
, entity_naming_consistency
, and dashboard_layout_generator
.Q: What are the prerequisites for installing Hass-MCP?
A: You need a Home Assistant instance with a Long-Lived Access Token and either Docker (recommended) or Python 3.13+ with uv
.
Q: How do I configure Hass-MCP with Claude Desktop?
A: You need to add a specific JSON configuration to your claude_desktop_config.json
file, including the Docker run command for Hass-MCP and environment variables for your Home Assistant URL and token.
Q: Can I use Hass-MCP with other MCP clients besides Claude Desktop? A: Yes, Hass-MCP can be integrated with other MCP clients like Cursor and Claude Code (CLI) by providing similar configuration details.
Q: What if Home Assistant is running in Docker on the same machine as Hass-MCP?
A: You might need to add --network host
to the Docker arguments or use the actual IP address of your machine instead of host.docker.internal
for the container to access Home Assistant.
Q: What kind of prompts can I use with Hass-MCP? A: You can use prompts to query device states, control entities, list sensors, get domain summaries, create automations, troubleshoot issues, and search for entities, among others.
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/
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by Skyvern-AI
Skyvern automates browser-based workflows using LLMs and computer vision, offering a robust solution for repetitive online tasks.
by PipedreamHQ
Connect APIs quickly, run event‑driven automations, and execute custom code in Node.js, Python, Go, or Bash on a hosted platform.
by czlonkowski
Provides AI assistants with structured access to n8n node documentation, properties, and operations, enabling automated workflow creation, validation, and management.
by executeautomation
mcp-playwright is a Model Context Protocol (MCP) server that enables large language models (LLMs) to perform browser automation and web scraping tasks using Playwright.
by browserbase
Provides cloud browser automation capabilities for LLMs, enabling web navigation, interaction, screenshot capture, and data extraction through Browserbase and Stagehand.
by haris-musa
excel-mcp-server is a Python-based Model Context Protocol (MCP) server that enables AI agents to programmatically create, read, and modify Excel files without requiring Microsoft Excel to be installed.
by mobile-next
Mobile-mcp is a Model Context Protocol (MCP) server designed for scalable mobile automation, app scraping, and development across iOS and Android devices, including physical devices, simulators, and emulators.
by anaisbetts
mcp-installer is an MCP server designed to automate the installation of other MCP servers, simplifying the process for users.
by leonardsellem
An MCP server that enables AI assistants to interact with n8n workflows through natural language.