# HomeAssistant-Light-MCP [Health: Active]

**Category:** 🏠 Home Automation  
**Repository:** https://github.com/Koneisto/HomeAssistant-Light-MCP  
**GitHub Stars:** 0  
**npm Downloads (last month):** 176  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/homeassistant-light-mcp

## Description
Control Home Assistant lights and scenes. Lights only by design for safety.

## Tools
Capabilities this server exposes over MCP:

- **scene_show_lights** — Show all lights with state, brightness, colors, effects, color modes
- **scene_adjust_light** — Control a light (on/off, brightness, color, effects)
- **scene_create** — Create a new scene from current light states
- **scene_list** — List all scenes
- **scene_activate** — Activate a scene
- **scene_update** — Update existing scene with current lights
- **scene_delete** — Delete a scene
- **scene_blackout** — Turn off all lights (supports exclusions)
- **scene_diagnose** — Diagnose lights and scenes, check connectivity
- **scene_fix** — Fix scene problems, restore from backup
- **scene_configure** — Set Home Assistant URL and token

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "homeassistant-light-mcp": {
    "command": "npx",
    "args": ["-y","ha-mcp-server"],
    "env": {
      "HA_URL": "",
      "HA_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `HA_URL`, `HA_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What HomeAssistant-Light-MCP MCP server does

HomeAssistant-Light-MCP MCP server gives an AI client access to Home Assistant lights and scenes through a local MCP process. Its scope is deliberately limited to lights and scene management; it does not control switches, sensors, locks, cameras, HVAC equipment, or other Home Assistant entities. This restriction reduces the risk of an accidental command affecting a critical system.

The server can report each light's on/off state, brightness, RGB value, color temperature, active color mode, supported modes, effects, available effects, and supported temperature range. It can also change a light's power state, brightness, RGB color, color temperature, or effect.

## How it works

The server communicates directly with the Home Assistant instance configured by the user. It runs locally over stdio, so it does not open a network port or send Home Assistant data to an external service. Authentication uses a Home Assistant long-lived access token.

Scene operations use the current light states as their source. A scene can be exclusive, which turns off lights outside the scene when activated, or additive, which changes only the lights included in it. Local scene backups are stored at `~/.config/ha-mcp-server/scenes-backup.json`. The server can compare local backup data with Home Assistant scenes and merge changes from multiple sources.

HomeAssistant-Light-MCP MCP server includes handling for IKEA Tradfri timing issues. It detects Tradfri devices by manufacturer and waits between mode changes and subsequent color, temperature, or brightness commands. This addresses bulbs that may otherwise ignore or misapply commands when switching modes.

## Setup and configuration

Install the published package globally with `npm install -g ha-mcp-server`, or run it through `npx` in an MCP client configuration. A source installation requires cloning the repository, running `npm install`, and then `npm run build`.

Configure the MCP client with the server command and these environment variables:

- `HA_URL`: The URL of the Home Assistant instance, such as `http://your-home-assistant-ip:8123`.
- `HA_TOKEN`: A Home Assistant long-lived access token.

The token can be created from Home Assistant under Profile and Long-Lived Access Tokens. The same MCP configuration structure is documented for other MCP-compatible clients, not only Claude Desktop.

## Tools and capabilities

Available tools include:

- `scene_show_lights`: Inspect light states and supported capabilities.
- `scene_adjust_light`: Change power, brightness, colors, temperature, or effects.
- `scene_create`, `scene_list`, `scene_activate`, `scene_update`, and `scene_delete`: Manage saved scenes.
- `scene_blackout`: Turn off all lights, optionally excluding selected lights.
- `scene_diagnose`: Check connectivity, response times, scene consistency, backups, and missing lights.
- `scene_fix`: Repair scenes, test activation, or restore scenes from the local backup.
- `scene_configure`: Set the Home Assistant URL and token.

## Limitations and notes

HomeAssistant-Light-MCP MCP server is limited to lights and scenes by design. Use the official Home Assistant MCP or Home Assistant automations when control of switches or other entity types is required. Scene diagnostics can identify null values, missing lights, differences from the local backup, and lights absent from exclusive scenes; repair actions can remove some problems or restore backed-up scenes. The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/homeassistant-light-mcp/readme_

