Home Assistant
Comprehensive Model Context Protocol server for managing Home Assistant through AI assistants.
What is Home Assistant?
Home Assistant is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to comprehensive model context protocol server for managing home assistant through ai assistants.
Comprehensive Model Context Protocol server for managing Home Assistant through AI assistants.
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Comprehensive Model Context Protocol server for managing Hom
Use Cases
Maintainer
Works with
Installation
PIP
pip install ha-mcpManual Installation
pip install ha-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Home Assistant
ha-mcp is a comprehensive MCP server for Home Assistant that exposes 84+ tools covering device control, automation creation, dashboard management, system administration, and monitoring through natural language via AI assistants. It connects to your Home Assistant instance over its REST API and supports real-time state queries, bulk device control, script and scene management, camera snapshots, backup management, and add-on control. Smart home enthusiasts and home automation developers can control and configure their entire Home Assistant setup by conversing with Claude or another AI client, without opening the Home Assistant UI.
Prerequisites
- Home Assistant instance (local network or remote, any installation type)
- Home Assistant Long-Lived Access Token (generated in HA Profile settings)
- Claude Desktop, Claude Code, or another MCP-compatible AI client
- pip or the platform-specific install script for ha-mcp
Install ha-mcp
Install the ha-mcp package using pip, or use the platform-specific one-liner installer for macOS or Linux.
# Using pip:
pip install ha-mcp
# macOS one-liner:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-macos.sh | sh
# Linux one-liner:
curl -LsSf https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/scripts/install-linux.sh | shGenerate a Home Assistant Long-Lived Access Token
In Home Assistant, click your user profile in the bottom-left, scroll to 'Long-Lived Access Tokens', and create a new token. Copy it — you will not be able to see it again.
Configure your MCP client
Add ha-mcp to your Claude Desktop configuration with your Home Assistant URL and the access token you generated.
Optional: install the ha_mcp_tools custom component
For advanced file and YAML configuration editing, install the optional custom component via HACS (recommended) or by manually copying it to your Home Assistant custom_components directory.
Restart Claude Desktop and verify
Restart your MCP client. Ask it to list your Home Assistant entities or turn on a light to verify the connection.
Home Assistant Examples
Client configuration
Add ha-mcp to your Claude Desktop configuration. Replace the URL and token with your actual Home Assistant instance details.
{
"mcpServers": {
"home-assistant": {
"command": "ha-mcp",
"args": [],
"env": {
"HA_URL": "http://homeassistant.local:8123",
"HA_TOKEN": "your_long_lived_access_token_here"
}
}
}
}Prompts to try
Use these prompts with Claude to control and configure your Home Assistant smart home.
- "Turn off all the lights in the living room"
- "Create an automation that turns on the porch light at sunset"
- "What is the current temperature from my bedroom sensor?"
- "Show me all automations that use the motion sensor"
- "Take a snapshot from the front door camera"
- "Debug my morning routine automation and tell me why it failed last night"Troubleshooting Home Assistant
Connection refused or timeout when connecting to Home Assistant
Verify HA_URL is reachable from the machine running ha-mcp. For local installs use http://homeassistant.local:8123 or the direct IP. For remote access ensure the HA instance is exposed and the correct port/URL is used. Test with curl $HA_URL/api/ -H 'Authorization: Bearer $HA_TOKEN'.
Authentication error: 401 Unauthorized
The Long-Lived Access Token may have been revoked or copied incorrectly. Go to your Home Assistant profile, delete the old token, create a new one, and update HA_TOKEN in your MCP config.
Only a subset of the 84+ tools are visible to the AI
If you are using a smaller context model, enable BM25 tool search by setting ENABLE_TOOL_SEARCH=true in your server environment. This reduces the upfront token cost and makes tools discoverable on demand. Set TOOL_SEARCH_MAX_RESULTS to control how many results are returned per search.
Frequently Asked Questions about Home Assistant
What is Home Assistant?
Home Assistant is a Model Context Protocol (MCP) server that comprehensive model context protocol server for managing home assistant through ai assistants. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Home Assistant?
Install via pip with: pip install ha-mcp. Then configure your AI client to connect to this MCP server.
Which AI clients work with Home Assistant?
Home Assistant works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Home Assistant free to use?
Yes, Home Assistant is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Home Assistant Alternatives — Similar Cloud Services Servers
Looking for alternatives to Home Assistant? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Home Assistant in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Home Assistant?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.