Home Assistant
About
Enables direct control of smart home devices through Home Assistant API, allowing natural language searching of entities and management of device states, light colors, and brightness levels.
Details
- Author
- hpohlmann
- Repository
- hpohlmann/home-assistant-mcp
- GitHub stars
- 15
- License
- MIT License
- Categories
- Productivity, Other, AI, Design, Developer Tools, Search, Security, Frontend, API
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Home AssistantCommand (node, npx, python, etc.)uvArguments-
Argument 1
--directory -
Argument 2
/path/to/your/home-assistant-mcp -
Argument 3
run -
Argument 4
main.py
Environment-
HOME_ASSISTANT_TOKEN
your_home_assistant_token_here
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
To install Home Assistant Integration for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @hpohlmann/home-assistant-mcp --client claude
1. Clone this repository
2. Set up a Python environment:
cd home-assistant
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -U pip
pip install uv
uv pip install -e .
search_entities
Search for entities in your Home Assistant instance.
control_device
Control devices by turning them on or off.
set_light_color
Set the color of lights using RGB values. Parameters: entity_id (string), red (int 0-255), green (int 0-255), blue (int 0-255).
adjust_brightness
Adjust the brightness of lights. Parameters: entity_id (string), brightness (int 0-255).
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"home assistant": {
"env": {
"HOME_ASSISTANT_TOKEN": "your_home_assistant_token_here"
},
"args": [
"--directory",
"/path/to/your/home-assistant-mcp",
"run",
"main.py"
],
"command": "uv",
"inheritEnv": true
}
}
}
Linux
{
"env": {
"HOME_ASSISTANT_TOKEN": "your_home_assistant_token_here"
},
"args": [
"--directory",
"/path/to/your/home-assistant-mcp",
"run",
"main.py"
],
"command": "uv",
"inheritEnv": true
}
Macos
{
"env": {
"HOME_ASSISTANT_TOKEN": "your_home_assistant_token_here"
},
"args": [
"--directory",
"/path/to/your/home-assistant-mcp",
"run",
"main.py"
],
"command": "uv",
"inheritEnv": true
}
Windows
{
"env": {
"HOME_ASSISTANT_TOKEN": "your_home_assistant_token_here"
},
"args": [
"--directory",
"/path/to/your/home-assistant-mcp",
"run",
"main.py"
],
"command": "uv",
"inheritEnv": true
}
Get a Home Assistant Long-Lived Access Token
- Go to your Home Assistant instance - Navigate to your profile (click on your username in the sidebar) - Scroll down to "Long-Lived Access Tokens" - Create a new token with a descriptive name like "MCP Integration" - Copy the token (you'll only see it once)Add the following configuration to your MCP configuration in Cursor:
{ "mcpServers": { "home_assistant": { "command": "uv", "args": ](https://smithery.ai/server/@hpohlmann/home-assistant-mcp)[ "--directory", "/path/to/your/home-assistant-mcp", "run", "main.py" ], "env": { "HOME_ASSISTANT_TOKEN": "your_home_assistant_token_here" }, "inheritEnv": true } } }
- /path/to/your/home-assistantwith the actual path to this directory
- your_home_assistant_token_herewith your Home Assistant Long-Lived Access Token
By default, the MCP tries to connect to Home Assistant athttp://homeassistant.local:8123.
If your Home Assistant is at a different URL, you can modify theHA_URLvariable inapp/config.py.
Once configured, you can use Cursor AI to control your Home Assistant devices:
- Search for devices: "Find my living room lights"
- Control devices: "Turn on the kitchen light"
- Control light colors: "Set my living room lights to red"
- Adjust brightness: "Set my dining room lights to blue at 50% brightness"
The MCP now supports advanced light control capabilities:
-
Color Control: Set any RGB color for compatible lights
- Specify colors using RGB values (0-255 for each component)
- Example:set_device_color("light.living_room", 255, 0, 0)for red
Brightness Control: Adjust light brightness
- Optional brightness parameter (0-255)
- Can be combined with color changes
- Example:set_device_color("light.dining_room", 0, 0, 255, brightness=128)for medium-bright blue
- If you get authentication errors, verify your token is correct and has not expired
- Check that your Home Assistant instance is reachable at the configured URL
- For color control issues:
- Verify that your light entity supports RGB color control
- Check that the light is turned on before attempting to change colors
The current implementation requires a two-step process to control devices:
- Search for entities using natural language
- Control the entity using its specific entity_id
A planned enhancement is to create a more dynamic way to expose entities to the control devices tool, allowing the AI to:
- Directly control devices through more natural commands (e.g., "turn off the kitchen lights")
- Cache frequently used entities for faster access
- Support more complex operations like adjusting brightness, temperature, or other attributes
- Handle entity groups and scenes more intuitively
This would significantly reduce the time to action and create a more seamless user experience when controlling Home Assistant devices through an AI assistant.
A free, private, and secure remote MCP server for Home Assistant.
A safe-by-default MCP server that exposes your Control4 home automation (lights, scenes, locks, thermostats, and media) as structured tools over HTTP and Claude Desktop STDIO for reliable AI-powered control on your local network.
A Model Context Protocol (MCP) server that provides AI assistants with access to Home Assistant, enabling smart home control and automation management.
MCP server for Azure IoT Hub - device registry, twins, direct methods, jobs, messaging
MCP server for Google Cast — discover devices, play media, control volume, launch apps, and manage queues over stdio
Home automation you can just talk to. No dashboards, no app to learn.
MCP Server for deConz server developed by Dresden Elektronik (bridge between smart home automation platforms and wireless Zigbee networks)
Control and query the status of Ecovacs cleaning robots using the MCP protocol.
Control AVM FRITZ!Box routers - manage devices, WiFi, network settings, parental controls, and schedule time-delayed actions
Allows an LLM agent to control your Gaggimate espresso machine
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





