Home Assistant MCP Server
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.
Overview
Home Assistant MCP Server is a Model Context Protocol (MCP) server that facilitates interaction with Home Assistant by providing tools for controlling and monitoring smart devices through MCP-enabled applications.
To use the server, clone the repository, install dependencies, build the project, and configure it with your Home Assistant settings. Interact with the server by utilizing various MCP tools in your code.
- Query and get device states - Control device states (turn on/off) - Trigger automations - List available entities in Home Assistant
- Monitoring the status of home devices.
- Automating light management based on specific criteria.
- Triggering predefined routines within a smart home setup.
Add to your AI client
Use these steps to connect Home Assistant MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"homeassistant-server-mcp-hekmon8": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-homeassistant-server-mcp-hekmon8"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"homeassistant-server-mcp-hekmon8": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-homeassistant-server-mcp-hekmon8"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"homeassistant-server-mcp-hekmon8": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-homeassistant-server-mcp-hekmon8"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"homeassistant-server-mcp-hekmon8": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-homeassistant-server-mcp-hekmon8"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"homeassistant-server-mcp-hekmon8": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-homeassistant-server-mcp-hekmon8"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"homeassistant-server-mcp-hekmon8": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-homeassistant-server-mcp-hekmon8"
]
}
}
}FAQ
Can I control all my Home Assistant devices?
Yes! The MCP server can manage any devices integrated with your Home Assistant instance.
Is there any cost associated with using the MCP server?
No, this server is free and open-source to use.
How do I keep my Home Assistant secure?
Always use HTTPS, keep your access tokens private, and rotate them regularly.