by voska
Enable AI assistants to query and control Home Assistant entities, retrieve summaries, manage automations, and conduct guided conversations using lean JSON responses.
Home Assistant MCP Server provides a set of tools that let large language models (LLMs) like Claude interact directly with a Home Assistant instance. The server exposes commands for reading entity states, performing actions, searching devices, summarizing domains, and managing automations, all through the Model Context Protocol (MCP).
voska/hass-mcp:latest
or install via uv
(Python 3.13+).HA_URL
and HA_TOKEN
.get_entity
, entity_action
, list_automations
) via natural‑language prompts.Q: How do I obtain a long‑lived token? A: In Home Assistant UI go to Profile → Long‑Lived Access Tokens and create a new token.
Q: Can I run the server without Docker?
A: Yes. With Python 3.13+ you can install the package using uv
and run hass-mcp
directly.
Q: What if Home Assistant is also running in Docker on the same host?
A: Add --network host
to the Docker arguments or use the host’s IP address instead of host.docker.internal
.
Q: Which LLM clients are supported? A: Claude Desktop, Cursor, Claude Code CLI, and any other MCP‑compatible client.
Q: How do I limit the size of search results?
A: Use the limit
parameter in the hass://search/{query}/{limit}
resource endpoint.
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
.
Install uv on your system.
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": "uvx",
"args": ["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
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.
{ "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" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by Skyvern-AI
Automates browser‑based workflows by leveraging large language models and computer‑vision techniques, turning natural‑language prompts into fully functional web interactions without writing custom scripts.
by ahujasid
Enables Claude AI to control Blender for prompt‑assisted 3D modeling, scene creation, and manipulation via a socket‑based Model Context Protocol server.
by PipedreamHQ
Connect APIs quickly with a free, hosted integration platform that enables event‑driven automations across 1,000+ services and supports custom code in Node.js, Python, Go, or Bash.
by elie222
Organizes email inbox, drafts replies in the user's tone, tracks follow‑ups, and provides analytics to achieve inbox zero quickly.
by grab
Enables Cursor AI to read and programmatically modify Figma designs through a Model Context Protocol integration.
by ahujasid
Enables Claude AI to control Ableton Live in real time, allowing AI‑driven creation, editing, and playback of tracks, clips, instruments, and effects through a socket‑based server.
by leonardsellem
Provides tools and resources to enable AI assistants to manage and execute n8n workflows via natural language commands.
by GongRzhe
Provides a Model Context Protocol server that enables AI assistants to send, read, search, and organize Gmail messages, supporting attachments, label and filter management, and automatic OAuth2 authentication.
by mario-andreschak
A unified platform that manages AI models, MCP servers, and complex workflows, offering secure key storage, visual flow building, and an interactive chat UI.