Home Assistant MCP Server
by hekmon8
A Model Context Protocol (MCP) server for interacting with Home Assistant. This server provides tools to control and monitor your Home Assistant devices through MCP-enabled applications.
Last updated: N/A
What is Home Assistant MCP Server?
This is a Model Context Protocol (MCP) server designed to interface with Home Assistant. It allows MCP-enabled applications to control and monitor devices connected to your Home Assistant instance.
How to use Home Assistant MCP Server?
First, clone the repository and install the dependencies using npm install
. Then, build the project with npm run build
. Configure the MCP server in your MCP settings file, providing the path to the built index.js file, your Home Assistant URL, and a long-lived access token. Finally, use the provided code snippets with use_mcp_tool
to interact with your Home Assistant devices.
Key features of Home Assistant MCP Server
Get device states
Control device states (on/off)
Trigger automations
List available entities
Use cases of Home Assistant MCP Server
Controlling lights and switches via voice commands
Triggering automations based on context
Monitoring the state of sensors
Integrating Home Assistant with other MCP-enabled applications
FAQ from Home Assistant MCP Server
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It's a framework for interacting with different services and devices through a standardized interface.
How do I get a Home Assistant access token?
How do I get a Home Assistant access token?
You can generate a long-lived access token in your Home Assistant profile settings under the 'Long-Lived Access Tokens' section.
Where is the MCP settings file located?
Where is the MCP settings file located?
The MCP settings file is typically located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
for VSCode.
What if I get an error connecting to Home Assistant?
What if I get an error connecting to Home Assistant?
Double-check your Home Assistant URL and access token in the MCP settings file. Ensure that your Home Assistant instance is accessible from the machine running the MCP server.
How can I contribute to this project?
How can I contribute to this project?
Fork the repository, create a feature branch, commit your changes, push to the branch, and open a pull request. Make sure to update tests as appropriate and follow the existing code style.