- Home
- MCP servers
- Home Assistant
Home Assistant
- python
3
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"miguelg719-home-assistant-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/home-assistant-server",
"run",
"home-assistant-server"
],
"env": {
"HOMEASSISTANT_TOKEN": "YOUR_TOKEN",
"HOMEASSISTANT_BASE_URL": "http://YOUR_HOME_ASSISTANT_URL:8123"
}
}
}
}You can connect Home Assistant with MCP to control lights, climate, locks, alarms, and humidifiers through a standardized, extensible interface. This MCP server lets you issue high‑level commands to Home Assistant domains and receive status and responses in a consistent way, making it easier to build cross‑domain automations and tools.
How to use
Set up your MCP client to connect to the Home Assistant MCP server. You can issue prompts that map to Home Assistant domains such as Lights, Climate, Locks, Alarm Control Panel, and Humidifier. Use the provided tool actions to turn devices on or off, adjust brightness or temperature, arm or disarm security, and manage humidity levels. Your client can orchestrate multiple actions in sequence, query current states, and respond to prompts with context‑aware results.
How to install
Prerequisites: you need to have an MCP runtime available on your system (the examples use the MCP runtime commands shown in the configuration). You should also have a running Home Assistant instance and a long‑lived access token ready.
# Example: general steps to prepare and run the server locally
# 1) Ensure you have the MCP runtime available (uv/uvx) and Python/npm as needed by your environment
# 2) Place the Home Assistant MCP server configuration in your MCP setup
# 3) Start the server using the standard MCP runtime commands shown below
Configuration
Configure the MCP server entries to run the Home Assistant MCP server locally. Use the following two runtime configurations to run the server in development or in production mode.
{
"mcpServers": {
"home_assistant_mcp_dev": {
"command": "uv",
"args": ["--directory", "/path/to/home-assistant-server", "run", "home-assistant-server"]
},
"home_assistant_mcp_prod": {
"command": "uvx",
"args": ["home-assistant-server"]
}
}
}
Environment variables
You must configure access to Home Assistant using a long‑lived access token and your Home Assistant base URL. These values are shared by the MCP server so you can connect securely and control devices.
HOMEASSISTANT_TOKEN=your_long_lived_access_token_here
HOMEASSISTANT_BASE_URL=http://homeassistant.local:8123
Notes on operation
The server exposes actions for each supported domain: Lights, Climate, Locks, Alarm Control Panel, and Humidifier. Use the corresponding tool names to perform actions, query state, or adjust settings. If you are debugging, you can enable verbose logs to help trace command flow and responses.
Available tools
light_turn_on
Turn a light on in Home Assistant; optionally specify brightness or color.
light_turn_off
Turn a light off in Home Assistant.
climate_turn_on
Activate climate control or set a target temperature.
climate_turn_off
Disable climate control for a zone or entity.
alarm_control_panel_arm
Arm the alarm system or set a specific mode.
alarm_control_panel_disarm
Disarm the alarm system.
lock_lock
Lock a door or lock entity.
lock_unlock
Unlock a door or lock entity.
humidifier_turn_on
Activate humidifier and set humidity if supported.
humidifier_turn_off
Turn off humidifier.