Labsco
lenvolk logo

LIFX

โ˜… 2

from lenvolk

Control LIFX smart lights through the LIFX HTTP API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

LIFX MCP Server

A Model Context Protocol (MCP) server that provides tools for controlling LIFX smart lights through the LIFX HTTP API.

Features

This MCP server exposes the following LIFX API functionality as tools:

  • ๐Ÿ” list_lights - Get all lights or filter by selector
  • โšก set_state - Control power, color, brightness of lights
  • ๐Ÿ”„ toggle_power - Toggle lights on/off
  • ๐Ÿซ breathe_effect - Create breathing light effects
  • ๐Ÿ’ซ pulse_effect - Create pulsing light effects
  • ๐ŸŽฌ list_scenes - List all saved scenes
  • โ–ถ๏ธ activate_scene - Activate a specific scene
  • โœ… validate_color - Validate color string formats
  • โน๏ธ effects_off - Turn off any running effects

๐ŸŽจ Interactive MCP App

NEW! This server includes an interactive web-based UI that provides:

  • Visual controls for all your LIFX lights
  • Real-time power, color, and brightness adjustments
  • One-click color presets
  • Visual effects (breathe & pulse) controls
  • Theme-aware design that adapts to your client

See MCP_APP_GUIDE.md for details on using the interactive UI.

LIFX Selectors

Use selectors to target specific lights:

  • all - All lights
  • label:Kitchen - Lights labeled "Kitchen"
  • group:Living Room - Lights in "Living Room" group
  • location:Home - Lights at "Home" location
  • id:d073d5000000 - Specific light by ID

Color Formats

The server supports various color formats:

  • Named colors: red, blue, green, purple, etc.
  • RGB: rgb:255,0,0 (red)
  • HSB: hue:120 saturation:1.0 brightness:0.5
  • Kelvin: kelvin:3500 (warm white)

Development

Project Structure

mcp-lifx/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts          # Main MCP server implementation
โ”‚   โ”œโ”€โ”€ mcp-app.tsx       # React MCP app UI
โ”‚   โ””โ”€โ”€ mcp-app.html      # HTML entry point for app
โ”œโ”€โ”€ build/
โ”‚   โ”œโ”€โ”€ index.js          # Compiled server
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ””โ”€โ”€ mcp-app.html  # Bundled single-file app UI
โ”œโ”€โ”€ LIFX.md               # LIFX API documentation
โ”œโ”€โ”€ MCP_APP_GUIDE.md      # Interactive UI usage guide
โ”œโ”€โ”€ mcp.md                # MCP tutorial reference
โ”œโ”€โ”€ vite.config.ts        # Vite build configuration
โ”œโ”€โ”€ package.json          # Project configuration
โ”œโ”€โ”€ tsconfig.json         # TypeScript configuration
โ””โ”€โ”€ README.md             # This file

Available Scripts

  • npm run build - Build both the MCP app UI and server
  • npm run build:app - Build only the React UI
  • npm run build:server - Build only the TypeScript server
  • npm start - Run the compiled server
  • npm run serve - Run server in development mode (with tsx)
  • npm run dev - Build and run in one command
  • npm run clean - Remove build directory
  • npm run rebuild - Clean and rebuild everything

API Reference

All LIFX API endpoints and parameters are documented in LIFX.md.

Support

For issues with this MCP server, please open an issue on GitHub. For LIFX API issues, refer to the official LIFX API documentation.


Note: This is an unofficial LIFX MCP server. LIFX is a trademark of LIFX Pty Ltd.