Home Assistant

v1.0.0Cloud Servicesstable

Enables control and monitoring of Home Assistant smart home devices through MCP protocol. Automatically manages authentication tokens and provides simplified tools for device discovery, switch control, and light brightness adjustment.

home-assistantmodel-context-protocol
Share:
67
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 control and monitoring of home assistant smart home devices through mcp protocol. automatically manages authentication tokens and provides simplified tools for device discovery, switch control...

Enables control and monitoring of Home Assistant smart home devices through MCP protocol. Automatically manages authentication tokens and provides simplified tools for device discovery, switch control, and light brightness adjustment.

This server falls under the Cloud Services and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables control and monitoring of Home Assistant smart home

Use Cases

Control smart home devices via natural language.
Discover and manage connected devices.
Automate home lighting, switches, and appliances.
allenporter

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedApr 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx home-assistant-mcp

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 bridges AI assistants with a local Home Assistant instance, enabling natural language control and monitoring of smart home devices over the Home Assistant WebSocket API. It authenticates using a Long Lived Access Token and provides tools for device discovery, switch control, and light brightness adjustment — allowing an AI agent to query the state of all connected devices and issue commands through conversation. Note that the standalone repository is archived (March 2025), as its functionality is being integrated directly into Home Assistant Core.

Prerequisites

  • A running Home Assistant instance (local or remote) accessible via WebSocket at port 8123
  • The home-assistant-model-context-protocol custom component installed in Home Assistant (from github.com/allenporter/home-assistant-model-context-protocol)
  • A Long Lived Access Token generated from your Home Assistant user profile
  • Python with the uv package manager installed
  • An MCP client such as Claude Desktop
1

Install the Home Assistant custom component

Install the home-assistant-model-context-protocol custom component into your Home Assistant instance. This component enables the WebSocket endpoints the MCP server uses.

2

Generate a Long Lived Access Token

In Home Assistant, go to your user profile (bottom-left avatar), scroll to Long Lived Access Tokens, and create a new token. Copy it — it will not be shown again.

3

Clone the MCP server repository

Clone the mcp-server-home-assistant repository to a local path where uv can run it.

git clone https://github.com/allenporter/mcp-server-home-assistant.git
cd mcp-server-home-assistant
4

Test the server manually

Run the server directly with uv to verify it connects to your Home Assistant WebSocket endpoint before adding it to your MCP client.

HOME_ASSISTANT_WEB_SOCKET_URL=http://localhost:8123/api/websocket \
HOME_ASSISTANT_API_TOKEN=your_token_here \
uv --directory /path/to/mcp-server-home-assistant run mcp-server-home-assistant -v -v
5

Add the server to your MCP client config

Edit your claude_desktop_config.json to register the Home Assistant MCP server with your connection details and token.

6

Restart Claude Desktop and test

Restart Claude Desktop and ask it to list your smart home devices or turn on a light to confirm everything is working.

Home Assistant Examples

Client configuration

Add this to claude_desktop_config.json. Replace /path/to/mcp-server-home-assistant with the absolute path to your cloned repository.

{
  "mcpServers": {
    "Home-assistant": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-home-assistant",
        "run",
        "mcp-server-home-assistant",
        "-v",
        "-v"
      ],
      "env": {
        "HOME_ASSISTANT_WEB_SOCKET_URL": "http://localhost:8123/api/websocket",
        "HOME_ASSISTANT_API_TOKEN": "your_long_lived_access_token"
      }
    }
  }
}

Prompts to try

Control and monitor your smart home using natural language through Claude Desktop.

- "List all the smart devices connected to my Home Assistant"
- "Turn on the living room lights"
- "Set the bedroom light brightness to 40%"
- "What is the current state of the front door lock?"
- "Turn off all the switches in the kitchen"

Troubleshooting Home Assistant

Connection refused or WebSocket timeout errors

Verify that HOME_ASSISTANT_WEB_SOCKET_URL is correct — it should be the full WebSocket URL including '/api/websocket'. If Home Assistant is on a different machine, use its network IP instead of localhost.

Authentication errors with the access token

Long Lived Access Tokens can only be viewed once when created. If you lost the token, generate a new one in Home Assistant under your user profile > Long Lived Access Tokens, then update HOME_ASSISTANT_API_TOKEN in your MCP config.

Server starts but no devices are discovered

The home-assistant-model-context-protocol custom component must be installed and active in Home Assistant. Verify it appears in Settings > Integrations. Check the MCP server logs at ~/Library/Logs/Claude/mcp-server-Home-assistant.log for details.

Frequently Asked Questions about Home Assistant

What is Home Assistant?

Home Assistant is a Model Context Protocol (MCP) server that enables control and monitoring of home assistant smart home devices through mcp protocol. automatically manages authentication tokens and provides simplified tools for device discovery, switch control, and light brightness adjustment. 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.

Browse More Cloud Services MCP Servers

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

Quick Config Preview

{ "mcpServers": { "home-assistant-mcp": { "command": "npx", "args": ["-y", "home-assistant-mcp"] } } }

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