Home Assistant

v1.0.0Business Applicationsstable

Enables AI agents to control and monitor Home Assistant smart home devices through natural language interactions. Supports device control, entity state monitoring, history access, and automation generation with both MCP protocol and standalone HTTP R

home-assistant-mcp-servermcpai-integration
Share:
48
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 enables ai agents to control and monitor home assistant smart home devices through natural language interactions. supports device control, entity state monitoring, history access, and automation gener...

Enables AI agents to control and monitor Home Assistant smart home devices through natural language interactions. Supports device control, entity state monitoring, history access, and automation generation with both MCP protocol and standalone HTTP R

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

Features

  • Enables AI agents to control and monitor Home Assistant smar

Use Cases

Control smart home devices through natural language commands
Monitor device status and generate automations with AI assistance
hekmon8

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedApr 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx home-assistant-mcp-server

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 Home Assistant MCP Server provides AI agents with full natural language control over smart home devices managed by Home Assistant, exposing tools to query entity states, toggle devices, trigger automations, and list all available entities with domain filtering. It connects to any Home Assistant instance over its REST API using a long-lived access token, making it compatible with both local and cloud-proxied installations. Smart home power users and developers who want to manage their entire home — lights, climate, locks, sensors, and more — through conversational AI commands will benefit most from this integration.

Prerequisites

  • A running Home Assistant instance (local or Nabu Casa cloud) reachable via HTTP or HTTPS
  • A Home Assistant long-lived access token (created in your HA profile under Security > Long-Lived Access Tokens)
  • Node.js 18+ installed on the machine that will run the MCP server
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Clone and build the server

Clone the Homeassistant-server-mcp repository and install dependencies, then build the project.

git clone https://github.com/hekmon8/Homeassistant-server-mcp.git
cd Homeassistant-server-mcp
npm install
npm run build
2

Generate a long-lived access token in Home Assistant

Log into Home Assistant, click your username in the bottom-left, scroll to the Security section, and click 'Create Token'. Name it something descriptive like 'Claude MCP' and copy the token immediately — it is only shown once.

3

Confirm your Home Assistant URL

Identify the base URL for your Home Assistant instance. Common local addresses are http://homeassistant.local:8123 or http://192.168.x.x:8123. For Nabu Casa, use your remote.nabu.casa URL. The server must be able to reach this address from your MCP host machine.

4

Configure your MCP client

Edit your Claude Desktop config to launch the built server with HA_URL and HA_TOKEN set as environment variables.

{
  "mcpServers": {
    "homeassistant": {
      "command": "node",
      "args": ["/absolute/path/to/Homeassistant-server-mcp/dist/index.js"],
      "env": {
        "HA_URL": "http://homeassistant.local:8123",
        "HA_TOKEN": "your-long-lived-access-token"
      }
    }
  }
}
5

Restart and verify with entity listing

Restart Claude Desktop and ask it to list your Home Assistant entities. A successful listing confirms the server can reach your instance and the access token is valid.

Home Assistant Examples

Client configuration

Full Claude Desktop config for the Home Assistant MCP server with HA_URL and HA_TOKEN environment variables.

{
  "mcpServers": {
    "homeassistant": {
      "command": "node",
      "args": ["/Users/yourname/Homeassistant-server-mcp/dist/index.js"],
      "env": {
        "HA_URL": "http://homeassistant.local:8123",
        "HA_TOKEN": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
      }
    }
  }
}

Prompts to try

Natural language prompts covering entity state queries, device toggling, automation triggers, and multi-domain listing.

- "List all my smart lights and their current states"
- "Turn on the living room lights"
- "What is the current temperature in the bedroom?"
- "Toggle the garage door switch"
- "Trigger my 'Good Morning' automation"
- "Show all entities in the climate domain with their current modes and target temperatures"

Troubleshooting Home Assistant

401 Unauthorized when the server tries to connect to Home Assistant

The access token is invalid or has been deleted. Go to your Home Assistant profile, delete the old token entry, and generate a new long-lived access token. Update HA_TOKEN in your MCP client config and restart.

Connection timeout or ECONNREFUSED — cannot reach Home Assistant URL

Verify the HA_URL value is reachable from the machine running the MCP server. Open the URL in a browser on the same machine. If using a hostname like homeassistant.local, try the IP address instead. For HTTPS with a self-signed certificate, ensure the certificate is trusted by the system.

Entity ID not found when trying to toggle or query a device

Use the list_entities tool first to get the exact entity ID including its domain prefix (e.g. light.kitchen_ceiling, switch.garden_pump). Entity IDs are lowercase and may differ from the friendly name shown in the HA dashboard. Copy the entity_id value exactly as returned by list_entities.

Frequently Asked Questions about Home Assistant

What is Home Assistant?

Home Assistant is a Model Context Protocol (MCP) server that enables ai agents to control and monitor home assistant smart home devices through natural language interactions. supports device control, entity state monitoring, history access, and automation generation with both mcp protocol and standalone http r 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 MIT License 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": { "home-assistant-mcp-server": { "command": "npx", "args": ["-y", "home-assistant-mcp-server"] } } }

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