Home Assistant MCP Server
by oleander
A Model Context Protocol (MCP) server for integrating with Home Assistant, allowing LLMs to control and query your smart home. It provides a bridge between natural language processing and smart home automation.
Last updated: N/A
What is Home Assistant MCP Server?
Home Assistant MCP Server is a server that implements the Model Context Protocol (MCP) to enable Large Language Models (LLMs) to interact with and control your Home Assistant smart home setup. It acts as an intermediary, translating natural language commands into actions within your Home Assistant environment.
How to use Home Assistant MCP Server?
First, install the server using bun or from source. Configure it by creating a .env
file with your Home Assistant URL and a long-lived access token. Then, run the server in standard or demo mode. Finally, configure your MCP-compatible client (like Claude Desktop) to connect to the server.
Key features of Home Assistant MCP Server
Query and control Home Assistant entities via natural language
Works with any MCP-compatible client
Provides tools for state management, service calls, history, and more
Secure authentication using Home Assistant long-lived access tokens
Multiple transport options (stdio, SSE)
Demo mode with mock data
Use cases of Home Assistant MCP Server
Controlling lights and other smart devices using voice commands through an LLM.
Querying the current state of your smart home devices using natural language.
Automating complex tasks by combining natural language understanding with Home Assistant's automation capabilities.
Integrating your smart home with LLM-powered applications for personalized experiences.
FAQ from Home Assistant MCP Server
What is a long-lived access token?
What is a long-lived access token?
A long-lived access token is a persistent authentication token in Home Assistant that allows applications to access your Home Assistant instance without requiring you to log in repeatedly.
How do I get a long-lived access token?
How do I get a long-lived access token?
Log in to your Home Assistant instance, click on your profile, scroll down to 'Long-Lived Access Tokens', create a new token, and copy the token value.
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It's a protocol that enables LLMs to interact with external systems and services.
What is demo mode?
What is demo mode?
Demo mode uses mock data, allowing you to test the server without a running Home Assistant instance. This is useful for development or demonstration purposes.
What tools are available?
What tools are available?
The server exposes several tools for interacting with Home Assistant: states
, lights
, light
, service
, history
, services
, config
, domains
, error_log
, and devices
.