Model Context Protocol Server for Home Assistant
by tevonsb
This server bridges Home Assistant with Language Learning Models (LLMs) using the Model Context Protocol (MCP). It provides a comprehensive API for natural language control and monitoring of your smart home devices.
Last updated: N/A
What is Model Context Protocol Server for Home Assistant?
The Model Context Protocol Server for Home Assistant is a bridge that enables communication between a local Home Assistant instance and LLM applications using the MCP protocol. It allows for natural language control and monitoring of smart home devices.
How to use Model Context Protocol Server for Home Assistant?
To use this server, you need to install it using either the basic setup or the recommended Docker setup. Configure the environment variables with your Home Assistant credentials and server settings. Then, you can use the API endpoints to control devices, manage add-ons and packages, and create automations. Real-time updates are available through Server-Sent Events (SSE).
Key features of Model Context Protocol Server for Home Assistant
Device Control through natural language
Real-time Updates via Server-Sent Events (SSE)
Automation Management (create, update, manage)
State Monitoring (track and query device states)
Secure (Token-based authentication and rate limiting)
Mobile Ready (Works with any HTTP-capable client)
Use cases of Model Context Protocol Server for Home Assistant
Control lights, climate, covers, and switches using natural language commands.
Create and manage Home Assistant automations through an LLM interface.
Monitor the state of sensors and other devices in real-time.
Integrate your smart home with AI-powered assistants for voice control.
Manage Home Assistant add-ons and packages (HACS) programmatically.
FAQ from Model Context Protocol Server for Home Assistant
What is the Model Context Protocol (MCP)?
What is the Model Context Protocol (MCP)?
MCP is a protocol designed to share access to a local Home Assistant instance with an LLM application.
What are the prerequisites for installing this server?
What are the prerequisites for installing this server?
You need Node.js 20.10.0 or higher, NPM, Docker Compose (for Docker setup), a running Home Assistant instance, a Home Assistant long-lived access token, HACS installed for package management, and Supervisor access for add-on management.
How do I configure the server?
How do I configure the server?
You configure the server using environment variables defined in the .env
file. You need to set the Home Assistant URL, access token, WebSocket URL, server port, environment, and debug mode.
How do I get real-time updates from Home Assistant?
How do I get real-time updates from Home Assistant?
The server uses Server-Sent Events (SSE) to provide real-time updates. You can subscribe to specific domains or entities to receive instant state changes and monitor automation triggers.
What do I do if I get a toSorted is not a function
error?
What do I do if I get a toSorted is not a function
error?
This error indicates that you are using an older version of Node.js. You need to update to Node.js 20.10.0 or higher.