LIFX MCP Server
The LIFX MCP Server provides comprehensive control over LIFX smart lights through the LIFX HTTP API, offering both programmatic tools and an interactive web-based UI.
Core Capabilities:
Light Discovery & Control: List all lights or filter by selector (label, group, location, ID). Control power state (on/off/toggle), brightness (0.0-1.0), color (named colors, RGB, HSB, Kelvin), and infrared levels for compatible bulbs. Apply changes instantly or with smooth transitions.
Visual Effects: Create breathe and pulse effects with customizable color, speed, cycles, and brightness. Turn off any running effects.
Scene Management: List all saved scenes in your LIFX account and activate them by UUID with optional transition duration.
Utilities: Validate color strings in various formats before applying them.
Interactive Web UI: Launch a visual control panel with real-time adjustments for power, brightness, and color. Access one-click color presets, visual effect controls, and a theme-aware design that adapts to your client interface.
Integration: Works seamlessly with VS Code and GitHub Copilot via MCP, controllable through text commands or the interactive UI.
Provides tools for controlling LIFX smart lights through the LIFX HTTP API, including power control, color and brightness adjustments, lighting effects (breathe, pulse), scene management, and light discovery using selectors.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LIFX MCP Server turn on the living room lights and set them to warm white"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: LedFX MCP Server
Prerequisites
LIFX API Token: Get your token from LIFX Cloud Settings
Node.js: Version 16 or higher
VS Code with GitHub Copilot extension
Installation
Clone this repository:
git clone https://github.com/lenvolk/mcp-lifx.git
cd mcp-lifxInstall dependencies:
npm installBuild the project:
npm run buildUsage
With VS Code and GitHub Copilot
The LIFX MCP server works seamlessly with VS Code's GitHub Copilot:
Ensure the server is built:
npm run buildSet your
LIFX_API_TOKENenvironment variableThe server will be automatically discovered by VS Code's MCP integration
Open GitHub Copilot Chat and interact with your lights
Example interactions:
"List all my LIFX lights"
"Open LIFX control" - launches the interactive UI with visual controls
"Show LIFX app" - alternative way to open the control interface
"Turn on the kitchen lights"
"Set living room lights to blue"
"Launch LIFX dashboard" - opens the visual control panel
Running the Server
You can run the server directly with:
npm startOr in development mode:
npm run serveExample Usage
Once connected to an MCP client, you can use commands like:
Text Commands
"List all my LIFX lights"
"Turn on the kitchen lights"
"Set living room lights to blue"
"Start a breathe effect on all lights with red color"
"Show me all my saved scenes"
"Activate the movie night scene"
Interactive UI
Launch the visual control interface with any of these prompts:
"Open LIFX control" - Primary command to launch the UI
"Show LIFX app" - Alternative prompt
"Launch LIFX interface" - Opens the interactive controls
"Open LIFX dashboard" - Displays the visual UI
"Show me LIFX controls" - Launches the control panel
"Open the LIFX control panel" - Starts the interactive interface
"I want to control my LIFX lights visually" - Opens the UI
"Show LIFX remote" - Alternative way to access controls
The interactive UI provides visual controls for power, brightness, colors, and effects without needing text commands. See MCP_APP_GUIDE.md for details.
LIFX Selectors
Use selectors to target specific lights:
all- All lightslabel:Kitchen- Lights labeled "Kitchen"group:Living Room- Lights in "Living Room" grouplocation:Home- Lights at "Home" locationid: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.5Kelvin:
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 fileAvailable Scripts
npm run build- Build both the MCP app UI and servernpm run build:app- Build only the React UInpm run build:server- Build only the TypeScript servernpm start- Run the compiled servernpm run serve- Run server in development mode (with tsx)npm run dev- Build and run in one commandnpm run clean- Remove build directorynpm run rebuild- Clean and rebuild everything
API Reference
All LIFX API endpoints and parameters are documented in LIFX.md.
Contributing
Fork the repository
Create a feature branch
Make your changes
Test thoroughly
Submit a pull request
License
ISC License
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.
Available Tools
9 toolsactivate_sceneC
Activate a scene
Inputs: token (required), scene_uuid (required), duration, fast.
breathe_effectC
Perform a breathe effect
Inputs: token (required), color (required), selector, from_color, +5 more.
effects_offC
Turn off any running effects
Inputs: token (required), selector, power_off.
list_lightsC
Get lights belonging to the authenticated account
Inputs: token (required), selector.
list_scenesC
List all scenes available in the account
Inputs: token (required).
pulse_effectC
Perform a pulse effect
Inputs: token (required), color (required), selector, from_color, +5 more.
set_stateC
Set the state of lights
Inputs: token (required), selector, power, color, +4 more.
toggle_powerC
Toggle power state of lights
Inputs: token (required), selector, duration.
validate_colorC
Validate a color string
Inputs: token (required), color (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 9 tools
Most tools have distinct purposes, such as list_lights vs. set_state, but breathe_effect and pulse_effect could be confused as both are light effects. The descriptions are clear, but the overlap in effect types might cause occasional misselection.
All tool names follow a consistent snake_case pattern with clear verb_noun structure (e.g., activate_scene, list_lights, toggle_power). There are no deviations in naming conventions, making the set predictable and readable.
With 9 tools, the count is well-scoped for a LIFX lighting control server. It covers core operations like listing, state management, effects, and scenes without being overwhelming or too sparse.
The toolset provides good coverage for light control, including listing, state changes, effects, and scenes. A minor gap is the lack of a dedicated tool for deleting or managing scenes beyond activation, but agents can likely work around this using existing tools.
Related MCP Connectors
Control your Tesla from your AI assistant - climate, charging, access, and security.
Control your existing Philips lights, Sonos speakers, Roborock vacuums and other supported devices through Port OS cloud. Give ChatGPT, Claude and other MCP-compatible assistants access to the devices you connect. Turn off the living room lights, play music on your speakers, adjust the thermostat, run a vacuum in a room, check a camera snapshot or find a connected tracker. Available actions depend on your linked provider accounts and each deviceβs supported capabilities. Port OS runs in the cloud; no local server is required. You choose the account, device and capability permissions each assistant receives. Device operations require user OAuth; public tool discovery does not grant device access. Port OS is in alpha. Setup: https://portoperatingsystem.com/docs/getting-started/ Support: https://portoperatingsystem.com/contact/
Make, find, pause and track short links and QR codes from your AI assistant. Create short links with an optional custom address, title and tags; find links and QR codes; update, pause, resume, archive or restore them; and read click analytics (clicks, unique visitors, countries, referrers, devices, browsers) for a link, a QR code or the whole account. Sign in with OAuth and choose what the assistant may do. Every change can be undone; nothing is ever permanently deleted. Works on every plan, including Free.
Connects an AI assistant to your Lingard account (lingard.app), an app for learning languages with books, news and flashcards. Create topic word collections and add complete cards: translation, part of speech, pronunciation, synonyms, example sentences with translations, and images. Fill in missing fields on existing cards, rewrite example translations, and pause or resume collections, books and news in your daily study sessions. Every change can be previewed before it is saved, and saved words appear in the Lingard apps on iOS, Android and the web. Requires a Lingard account; sign-in uses OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Philips Hue smart lighting systems, including individual lights, groups, scenes, brightness, and color adjustments through natural language commands.-
- AlicenseBqualityDmaintenanceEnables AI assistants to control a local LedFX instance through natural language, allowing management of LED devices, virtuals, effects, scenes, palettes, and playlists.834MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to control Govee smart devices, including lights, via natural language. Supports turning on/off, changing colors, adjusting brightness, and activating scenes through the Govee API or local network.91MIT
- AlicenseAqualityCmaintenanceEnables users to control Philips Hue lights through natural language, set moods, save favorites, and learn preferences over time.2110 npmMIT