LIFX
Control LIFX smart lights through the LIFX HTTP API.
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.
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-lifx
- Install dependencies:
npm install
- Build the project:
npm run build
Usage
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 build - Set your
LIFX_API_TOKENenvironment variable - The 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 start
Or in development mode:
npm run serve
Example 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.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 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.
相關伺服器
xcomet-mcp-server
Translation quality evaluation using xCOMET models. Provides quality scoring (0-1), error detection with severity levels, and optimized batch processing with 25x speedup.
Jilebi
A secure, extensible MCP runtime with JS plugins
Guesty MCP Server
First MCP server for Guesty property management. 38 tools for reservations, guests, messaging, pricing, financials, calendars, reviews, tasks, and webhooks. Free tier with 23 tools, Pro tier with all 38.
Admit Coach — University Finder
Search 3,500+ US universities, estimate admission chances, check financial aid by income bracket, and build balanced college lists. Free MCP server, no API key required. Data from IPEDS and College Scorecard
Fulcra Context
Fulcra Context MCP server for accessing your personal health, workouts, sleep, location, and more, all privately. Built around Context by Fulcra.
BTC & SOL Futures Analiz Dashboard
A real-time dashboard for comprehensive analysis of Bitcoin and Solana futures markets.
BrokerIA Imoveis
Search Brazilian real estate listings, simulate financing, qualify leads, and schedule visits directly from any LLM.
Github
The GoReleaser MCP
Barevalue MCP
AI podcast editing as a service. Upload raw audio or submit a URL, get back edited episodes with filler words removed, noise reduction, transcripts, show notes, and social clips. Includes webhooks for automation.
渠道洞察服务
Provides sales channel analysis, including distribution, dealer networks, and coverage, to help understand enterprise channel layouts.