Home Assistant
Enables control and monitoring of Home Assistant smart home devices through MCP protocol. Automatically manages authentication tokens and provides simplified tools for device discovery, switch control, and light brightness adjustment.
What is Home Assistant?
Home Assistant is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables control and monitoring of home assistant smart home devices through mcp protocol. automatically manages authentication tokens and provides simplified tools for device discovery, switch control...
Enables control and monitoring of Home Assistant smart home devices through MCP protocol. Automatically manages authentication tokens and provides simplified tools for device discovery, switch control, and light brightness adjustment.
This server falls under the Cloud Services and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables control and monitoring of Home Assistant smart home
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx home-assistant-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Home Assistant
The Home Assistant MCP server bridges AI assistants with a local Home Assistant instance, enabling natural language control and monitoring of smart home devices over the Home Assistant WebSocket API. It authenticates using a Long Lived Access Token and provides tools for device discovery, switch control, and light brightness adjustment — allowing an AI agent to query the state of all connected devices and issue commands through conversation. Note that the standalone repository is archived (March 2025), as its functionality is being integrated directly into Home Assistant Core.
Prerequisites
- A running Home Assistant instance (local or remote) accessible via WebSocket at port 8123
- The home-assistant-model-context-protocol custom component installed in Home Assistant (from github.com/allenporter/home-assistant-model-context-protocol)
- A Long Lived Access Token generated from your Home Assistant user profile
- Python with the uv package manager installed
- An MCP client such as Claude Desktop
Install the Home Assistant custom component
Install the home-assistant-model-context-protocol custom component into your Home Assistant instance. This component enables the WebSocket endpoints the MCP server uses.
Generate a Long Lived Access Token
In Home Assistant, go to your user profile (bottom-left avatar), scroll to Long Lived Access Tokens, and create a new token. Copy it — it will not be shown again.
Clone the MCP server repository
Clone the mcp-server-home-assistant repository to a local path where uv can run it.
git clone https://github.com/allenporter/mcp-server-home-assistant.git
cd mcp-server-home-assistantTest the server manually
Run the server directly with uv to verify it connects to your Home Assistant WebSocket endpoint before adding it to your MCP client.
HOME_ASSISTANT_WEB_SOCKET_URL=http://localhost:8123/api/websocket \
HOME_ASSISTANT_API_TOKEN=your_token_here \
uv --directory /path/to/mcp-server-home-assistant run mcp-server-home-assistant -v -vAdd the server to your MCP client config
Edit your claude_desktop_config.json to register the Home Assistant MCP server with your connection details and token.
Restart Claude Desktop and test
Restart Claude Desktop and ask it to list your smart home devices or turn on a light to confirm everything is working.
Home Assistant Examples
Client configuration
Add this to claude_desktop_config.json. Replace /path/to/mcp-server-home-assistant with the absolute path to your cloned repository.
{
"mcpServers": {
"Home-assistant": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-server-home-assistant",
"run",
"mcp-server-home-assistant",
"-v",
"-v"
],
"env": {
"HOME_ASSISTANT_WEB_SOCKET_URL": "http://localhost:8123/api/websocket",
"HOME_ASSISTANT_API_TOKEN": "your_long_lived_access_token"
}
}
}
}Prompts to try
Control and monitor your smart home using natural language through Claude Desktop.
- "List all the smart devices connected to my Home Assistant"
- "Turn on the living room lights"
- "Set the bedroom light brightness to 40%"
- "What is the current state of the front door lock?"
- "Turn off all the switches in the kitchen"Troubleshooting Home Assistant
Connection refused or WebSocket timeout errors
Verify that HOME_ASSISTANT_WEB_SOCKET_URL is correct — it should be the full WebSocket URL including '/api/websocket'. If Home Assistant is on a different machine, use its network IP instead of localhost.
Authentication errors with the access token
Long Lived Access Tokens can only be viewed once when created. If you lost the token, generate a new one in Home Assistant under your user profile > Long Lived Access Tokens, then update HOME_ASSISTANT_API_TOKEN in your MCP config.
Server starts but no devices are discovered
The home-assistant-model-context-protocol custom component must be installed and active in Home Assistant. Verify it appears in Settings > Integrations. Check the MCP server logs at ~/Library/Logs/Claude/mcp-server-Home-assistant.log for details.
Frequently Asked Questions about Home Assistant
What is Home Assistant?
Home Assistant is a Model Context Protocol (MCP) server that enables control and monitoring of home assistant smart home devices through mcp protocol. automatically manages authentication tokens and provides simplified tools for device discovery, switch control, and light brightness adjustment. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Home Assistant?
Follow the installation instructions on the Home Assistant GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
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 Apache 2.0 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.