Home Assistant Light MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "HA_URL=${HA_URL}" -e "HA_TOKEN=${HA_TOKEN}" home-assistant-light -- npx -y ha-mcp-server
Required:HA_URLHA_TOKEN
README.md

A specialized MCP server for detailed control of Home Assistant lights

Home Assistant Light MCP

A Model Context Protocol (MCP) server for controlling Home Assistant lights and managing scenes. Complements the official Home Assistant MCP by providing detailed light control with colors and scene management.

Like this project? Give it a ⭐ on GitHub and help others discover it!

Design Philosophy: Lights Only

This MCP intentionally controls only lights - not switches, not other entities. This is a deliberate safety decision:

  • Switches can control critical systems - HVAC, heaters, air conditioning, water pumps
  • Accidental activation could be dangerous - turning on a heater while away, disabling AC in summer
  • Lights are safe - worst case is lights turn on/off unexpectedly

If you need to control switches or other entities, use the official Home Assistant MCP or automations with appropriate safeguards.

Features

  • Show Lights - View all lights with full details:
    • State, brightness, RGB colors, color temperature
    • Color mode and supported modes
    • Available effects (colorloop, etc.)
    • Color temperature range (min/max Kelvin)
  • Adjust Light - Control lights (on/off, brightness, RGB color, color temperature, effects)
  • Create Scene - Save current lighting as a scene with two modes:
    • exclusive - Turns off other lights when activated
    • additive - Only affects lights in the scene
  • List Scenes - View all saved scenes
  • Activate Scene - Activate a saved scene (with IKEA Tradfri support)
  • Update Scene - Update an existing scene with current light states
  • Delete Scene - Remove a scene
  • Blackout - Turn off all lights (with optional exclusions)

Why This MCP?

The official Home Assistant MCP is limited - it can't show light colors or provide detailed state information. This MCP fills that gap:

Feature Official HA MCP This MCP
Show light colors No Yes
Show brightness Limited Full detail
Show color modes No Yes
Show effects No Yes
Set RGB colors No Yes
Color temperature No Yes
Set effects No Yes
Create scenes No Yes
IKEA Tradfri fixes No Yes

Installation

npm install -g ha-mcp-server

Or clone and build:

git clone https://github.com/Koneisto/HomeAssistant-Light-MCP.git
cd HomeAssistant-Light-MCP
npm install
npm run build

Configuration

Add to your MCP client configuration:

Claude Desktop

Edit config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Option 1: Using npx (recommended, no global install needed)

{
  "mcpServers": {
    "ha-light-scenes": {
      "command": "npx",
      "args": ["-y", "ha-mcp-server"],
      "env": {
        "HA_URL": "http://your-home-assistant-ip:8123",
        "HA_TOKEN": "your-long-lived-access-token"
      }
    }
  }
}

Option 2: Global install

npm install -g ha-mcp-server
{
  "mcpServers": {
    "ha-light-scenes": {
      "command": "ha-mcp-server",
      "env": {
        "HA_URL": "http://your-home-assistant-ip:8123",
        "HA_TOKEN": "your-long-lived-access-token"
      }
    }
  }
}

Other MCP Clients

The same configuration structure works with any MCP-compatible client.

Get your Home Assistant token

  1. Go to Home Assistant → Profile (bottom left)
  2. Scroll to "Long-Lived Access Tokens"
  3. Click "Create Token"
  4. Copy the token

Usage Examples

Show lights

"Show me all the lights"

"What lights are on?"

Control lights

"Turn on living room light"

"Set bedroom to 50% brightness"

"Make the kitchen light red"

"Set studio lights to warm white"

"Start colorloop on the hallway light"

Create a scene

"Save this as Movie Night"

Activate a scene

"Activate Movie Night"

Update a scene

"Update Evening Lights with current settings"

Blackout

"Turn off all lights"

"Turn off all lights except the balcony"

Tools Reference

Tool Description
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 exc

Tools (8)

scene_show_lightsShow all lights with state, brightness, colors, effects, color modes
scene_adjust_lightControl a light (on/off, brightness, color, effects)
scene_createCreate a new scene from current light states
scene_listList all scenes
scene_activateActivate a scene
scene_updateUpdate existing scene with current lights
scene_deleteDelete a scene
scene_blackoutTurn off all lights (supports exclusions)

Environment Variables

HA_URLrequiredThe URL of your Home Assistant instance
HA_TOKENrequiredLong-lived access token from Home Assistant

Configuration

claude_desktop_config.json
{"mcpServers": {"ha-light-scenes": {"command": "npx", "args": ["-y", "ha-mcp-server"], "env": {"HA_URL": "http://your-home-assistant-ip:8123", "HA_TOKEN": "your-long-lived-access-token"}}}}

Try it

Show me all the lights and their current status.
Set the living room light to 50% brightness and warm white.
Save the current lighting configuration as Movie Night.
Activate the Movie Night scene.
Turn off all lights except for the balcony.

Frequently Asked Questions

What are the key features of Home Assistant Light MCP?

Detailed light control including RGB colors and color temperature. Advanced scene management with exclusive and additive modes. Built-in IKEA Tradfri device compatibility fixes. Safety-focused design that exclusively controls lights. Comprehensive state reporting including color modes and effects.

What can I use Home Assistant Light MCP for?

Creating complex lighting scenes for home cinema or reading. Quickly adjusting light color and temperature via natural language. Managing lighting states across multiple rooms simultaneously. Performing a quick blackout of all lights when leaving the house.

How do I install Home Assistant Light MCP?

Install Home Assistant Light MCP by running: npx -y ha-mcp-server

What MCP clients work with Home Assistant Light MCP?

Home Assistant Light MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Home Assistant Light MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare