Homeassistant-server-mcp

MCP.Pizza Chef: hekmon8

Homeassistant-server-mcp is a Model Context Protocol (MCP) server designed to integrate Home Assistant smart home devices with MCP-enabled applications. It enables real-time interaction by providing tools to retrieve device states, control devices (turn on/off), trigger automations, and list all available entities within the Home Assistant ecosystem. This server facilitates seamless smart home management through AI agents and workflows, enhancing automation and monitoring capabilities. Easy to install and configure, it supports developers and users looking to extend Home Assistant functionality with advanced AI-driven context and control.

Use This MCP server To

Retrieve real-time states of Home Assistant devices Turn Home Assistant devices on or off remotely Trigger Home Assistant automations programmatically List all entities managed by Home Assistant Integrate Home Assistant control into AI workflows Monitor smart home device status via MCP clients

README

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.

Home Assistant Server MCP server

This project is part of the AI Model Context Protocol (MCP) ecosystem. For more information and documentation about MCP tools, visit www.aimcp.info.

Features

  • Get device states
  • Control device states (on/off)
  • Trigger automations
  • List available entities

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/homeassistant-server-mcp.git
cd homeassistant-server-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. 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.json for 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.

Usage

The server provides the following tools:

Homeassistant-server-mcp FAQ

How do I install the Homeassistant-server-mcp?
Clone the GitHub repository, install dependencies with npm, build the project, and configure the server as per the README instructions.
Can I control device states using this MCP server?
Yes, you can turn devices on or off and monitor their current states through MCP-enabled applications.
Does this server support triggering Home Assistant automations?
Yes, it provides tools to trigger automations configured in your Home Assistant setup.
How do I configure the server to connect to my Home Assistant instance?
Configuration details are provided in the README, typically involving setting your Home Assistant URL and access token.
Is this MCP server compatible with multiple LLM providers?
Yes, it works with MCP clients that can use models from OpenAI, Anthropic Claude, and Google Gemini, among others.
What entities can I list using this server?
You can list all entities registered in your Home Assistant environment, including sensors, switches, lights, and more.
Does this server provide real-time updates of device states?
It allows querying current states; real-time push updates depend on the MCP client implementation.
Is the Homeassistant-server-mcp open source?
Yes, it is available on GitHub for community use and contributions.