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.
This project is part of the AI Model Context Protocol (MCP) ecosystem. For more information and documentation about MCP tools, visit www.aimcp.info.
- Get device states
- Control device states (on/off)
- Trigger automations
- List available entities
- Clone this repository:
git clone https://github.com/yourusername/homeassistant-server-mcp.git
cd homeassistant-server-mcp- Install dependencies:
npm install- Build the project:
npm run build- Configure the MCP server by adding the following to your MCP settings file (typically located at
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.jsonfor VSCode):
{
"mcpServers": {
"homeassistant": {
"command": "node",
"args": ["/path/to/homeassistant-mcp/homeassistant-server/build/index.js"],
"env": {
"HA_URL": "http://your-homeassistant-url:8123",
"HA_TOKEN": "your-long-lived-access-token"
}
}
}
}Replace your-homeassistant-url and your-long-lived-access-token with your Home Assistant instance URL and access token.
The server provides the following tools: