Home Assistant

v1.0.0Business Applicationsstable

Home Assistant MCP Server - Control your smart home with AI assistants via the Model Context Protocol

homeassistantmcpai-integration
Share:
573
Stars
0
Downloads
0
Weekly
0/5

What is Home Assistant?

Home Assistant is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to home assistant mcp server - control your smart home with ai assistants via the model context protocol

Home Assistant MCP Server - Control your smart home with AI assistants via the Model Context Protocol

This server falls under the Business Applications category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Home Assistant MCP Server - Control your smart home with AI

Use Cases

Control your smart home devices through natural language AI commands.
tevonsb

Maintainer

LicenseApache 2.0
Languagetypescript
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx homeassistant

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Home Assistant

The homeassistant-mcp server connects AI assistants to your Home Assistant smart home instance via the Model Context Protocol, enabling natural language control over lights, climate, media players, locks, vacuums, and more. It supports real-time state updates via Server-Sent Events, automation management, add-on lifecycle operations, and HACS package management. Developers and home automation enthusiasts use it to script complex routines or control their home through conversational AI without writing manual API calls.

Prerequisites

  • Node.js 18+ or Docker and Docker Compose installed
  • A running Home Assistant instance accessible on your network
  • A Home Assistant long-lived access token (Profile > Security > Long-lived access tokens)
  • An MCP-compatible client such as Claude Desktop
1

Clone the repository

Clone the homeassistant-mcp repository to your local machine and navigate into it.

git clone https://github.com/tevonsb/homeassistant-mcp.git
cd homeassistant-mcp
2

Configure environment variables

Copy the example environment file and fill in your Home Assistant URL, long-lived access token, and WebSocket URL. These are required for the server to authenticate and communicate with your Home Assistant instance.

cp .env.example .env
# Edit .env and set:
# HASS_HOST=http://homeassistant.local:8123
# HASS_TOKEN=your_long_lived_token
# HASS_SOCKET_URL=ws://homeassistant.local:8123/api/websocket
# PORT=3000
3

Install dependencies and build

Install Node.js dependencies and compile the TypeScript source to the dist directory.

npm install
npm run build
4

Start with Docker (recommended)

Use Docker Compose to start the server in a containerized environment. This is the recommended approach for stable deployments.

docker compose up -d
5

Configure your MCP client

Add the server to your claude_desktop_config.json (or equivalent MCP client config), pointing to the compiled dist directory and supplying environment credentials.

Home Assistant Examples

Client configuration

Add this block to your claude_desktop_config.json. Replace the path, token, and host values with your actual setup. The server requires HASS_HOST, HASS_TOKEN, and HASS_SOCKET_URL at minimum.

{
  "mcpServers": {
    "homeassistant": {
      "command": "node",
      "args": ["/path/to/homeassistant-mcp/dist/index.js"],
      "env": {
        "HASS_HOST": "http://homeassistant.local:8123",
        "HASS_TOKEN": "your_long_lived_access_token",
        "HASS_SOCKET_URL": "ws://homeassistant.local:8123/api/websocket",
        "PORT": "3000",
        "NODE_ENV": "production"
      }
    }
  }
}

Prompts to try

After connecting, use these prompts to control your smart home through your AI assistant.

- "Turn on the living room lights and set brightness to 50%."
- "What is the current temperature in the bedroom?"
- "Create an automation that turns off all lights at midnight."
- "List all installed Home Assistant add-ons and their status."
- "Lock the front door and check its current state."

Troubleshooting Home Assistant

Connection refused or ECONNREFUSED error

Verify that HASS_HOST points to the correct IP or hostname of your Home Assistant instance and that port 8123 is accessible from the machine running the MCP server. Check that Home Assistant is running.

401 Unauthorized when calling tools

Regenerate your long-lived access token from Home Assistant Profile > Security > Long-lived access tokens. Make sure the token is copied completely without trailing whitespace in your .env file.

WebSocket disconnects frequently

Set HASS_SOCKET_URL to use the same host as HASS_HOST. If you're behind a reverse proxy, ensure WebSocket upgrade headers are passed through. Setting DEBUG=true in .env shows detailed connection logs.

Frequently Asked Questions about Home Assistant

What is Home Assistant?

Home Assistant is a Model Context Protocol (MCP) server that home assistant mcp server - control your smart home with ai assistants via the model context protocol It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Home Assistant?

Follow the installation instructions on the Home Assistant GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Home Assistant?

Home Assistant works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Home Assistant free to use?

Yes, Home Assistant is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Home Assistant Alternatives — Similar Business Applications Servers

Looking for alternatives to Home Assistant? Here are other popular business applications servers you can use with Claude, Cursor, and VS Code.

n8n

189.1k

A comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and dou

LobeHub

77.5k

🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.

Jeecgboot

46.4k

AI 低代码平台,「低代码 + 零代码」双模式驱动:低代码一键生成前后端代码,零代码 5 分钟搭建系统,AI Skills 一句话画流程、设计表单、生成整套系统。内置 AI聊天、知识库、流程编排、MCP插件等,兼容主流大模型。引领「AI 生成 → 在线配置 → 代码生成 → 手工合并->AI修改」开发模式,消除 Java 项目 80% 的重复工作,提效而不失灵活。

CowAgent

44.7k

CowAgent (chatgpt-on-wechat) 是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、通过长期记忆和知识库不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页等接入,可选择DeepSeek/OpenAI/Claude/Gemini/ MiniMax/Qwen/GLM/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助理和企业数字员工。

Minds Platform

39.2k

Platform dedicated to building an open foundation for applied Artificial Intelligence, designed for people seeking production-ready AI systems they can truly control, extend and deploy anywhere.

Astrbot

32.8k

AI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨

Browse More Business Applications MCP Servers

Explore all business applications servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "homeassistant": { "command": "npx", "args": ["-y", "homeassistant"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Home Assistant?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides