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
Prerequisites
- LIFX API Token: Get your token from LIFX Cloud Settings
- Node.js: Version 16 or higher
- MCP Client: Such as Claude Desktop or any MCP-compatible client
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 Claude Desktop
Add this server to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"lifx": {
"command": "node",
"args": ["C:/path/to/mcp-lifx/build/index.js"],
"env": {}
}
}
}
Direct Usage
You can also run the server directly:
npm start
Example Usage
Once connected to an MCP client, you can use commands like:
- "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"
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
βββ build/ # Compiled JavaScript output
βββ LIFX.md # LIFX API documentation
βββ mcp.md # MCP tutorial reference
βββ package.json # Project configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
Available Scripts
npm run build- Compile TypeScript to JavaScriptnpm start- Run the compiled servernpm run dev- Build and run in one command
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.
Related Servers
F1 MCP Server
Provides advanced Formula 1 data analysis, including real-time telemetry, tire performance, weather prediction, and race strategy simulation.
Volume Wall Detector
Provides real-time stock trading volume analysis, detects significant price levels (volume walls), and tracks trading imbalances.
MCP Minecraft Remote
Remotely control a Minecraft Java Edition server using the Model Context Protocol (MCP).
ιθ MCP ζε‘
Provides Chinese Tung Shing (almanac) data, including calendar conversions, auspicious activities, and traditional metaphysical elements.
Airplane.Live MCP Server
MCP server that connects to the Airplanes.live API to provide real-time flight and aircraft data for analysis or visualization.
mcp-datadog-server
Datadog MCP Server
Chess Stats
An MCP server that provides chess statistics for any player.
Δ°zmir UlaΕΔ±m
Access real-time public transportation data for the city of Δ°zmir, allowing AI assistants to query routes and schedules.
Adwords MCP
An MCP server that serves ads to developers in clients like Cursor and Claude.
Public Data Portal Short-term Forecast
Provides current weather information using the Korea Meteorological Administration's short-term forecast API.