🤝
@miguelg719
An MCP server for Home Assistant
Overview
What is Home Assistant MCP Server?
This server implements the Model Context Protocol (MCP) to integrate with Home Assistant, providing smart home control capabilities for AI assistants. It is designed for developers and smart home users who want to control Home Assistant through conversational interfaces.
How to use Home Assistant MCP Server?
Configure the server by setting HOMEASSISTANT_TOKEN and HOMEASSISTANT_BASE_URL in a .env file. Install via uv or uvx and add the server to your MCP host configuration (e.g., Claude Desktop) under mcpServers as home-assistant-server. Use the provided tools and prompts for each supported domain.
Key features of Home Assistant MCP Server
- Provides tools for lights, climate, locks, alarm panels, and humidifiers.
- Includes prompts for each supported domain.
- Requires only a Home Assistant long-lived access token and base URL.
- Supports setup with Claude Desktop and other MCP hosts.
- Published as a Python package on PyPI.
Use cases of Home Assistant MCP Server
- Turn lights on/off and adjust brightness via an AI assistant.
- Set temperature and HVAC mode using natural language.
- Lock or unlock doors through a conversational interface.
- Arm or disarm a home security system with voice commands.
- Control humidifier humidity levels remotely.
FAQ from Home Assistant MCP Server
What prerequisites are needed?
A running Home Assistant instance, a long-lived access token from your Home Assistant profile, and the base URL of your Home Assistant (e.g., http://homeassistant.local:8123).
How is authentication handled?
The server uses a long-lived access token set in the HOMEASSISTANT_TOKEN environment variable. The token must be generated from the Home Assistant instance after onboarding.
What transport does the server use?
The MCP server communicates over stdio, which is standard for MCP servers. Debugging can be done using the MCP Inspector.
Does the server support all Home Assistant entities?
No, currently only lights, climate, locks, alarm control panels, and humidifiers are supported. Other domains are not yet implemented.
How can I install the server?
The server can be run via uv for development or via uvx for the published version. Configuration examples for Claude Desktop are provided in the README.