LIFX MCP Server
A TypeScript-based MCP server for controlling LIFX smart lights via the official LIFX HTTP API.
Features
- Control LIFX lights using MCP tools
- Set state, toggle, and apply effects (breathe, move, morph, flame)
- Activate scenes and parse color strings
- Built with FastMCP for easy integration
Getting Started
Prerequisites
- Node.js (v16+ recommended)
- A LIFX Cloud API token (get one here)
- MCP-compatible client (e.g., VS Code)
Installation
Build
Run
You can start the server directly:
Or use MCP tooling (recommended):
Usage with VS Code
For quick installation, use one of the one-click install buttons at the top of this README.
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P
and typing Preferences: Open User Settings (JSON)
.
Optionally, you can add it to a file called .vscode/mcp.json
in your workspace. This will allow you to share the configuration with others.
Note that the
mcp
key is not needed in the.vscode/mcp.json
file.
Configuration
The server requires a LIFX API token. You can provide it via:
.env
file:Copy- Or via the VS Code MCP extension prompt (see
.vscode/mcp.json
).
Usage
The server exposes the following MCP tools:
get-lights
: Get state of lights by selectorset-state
: Set state (power, color, brightness, etc.)set-states
: Set multiple states at onceset-state-delta
: Apply delta changestoggle-lights
: Toggle powerbreathe-effect
,move-effect
,morph-effect
,flame-effect
: Run effectsget-scenes
,activate-scene
: Scene managementparse-color
: Parse color strings
Example: Toggle a Light
Development
- TypeScript source:
src/
- Build output:
build/
- Types and schemas:
src/types.ts
- FastMCP server:
src/index.ts
Scripts
npm run build
– Compile TypeScript tobuild/
npm start
– Run the compiled servernpm run dev
– Run with tsx for developmentnpm run inspect
– Inspect with FastMCP Inspector
API Reference
See .docs/lifxapi.md
for full LIFX API details and color formats.
License
ISC
This project is not affiliated with LIFX. Use at your own risk.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A TypeScript-based MCP server for controlling LIFX smart lights via the official LIFX HTTP API, allowing users to manage light states, toggle power, apply effects, and activate scenes.
Related MCP Servers
- AsecurityAlicenseAqualityA TypeScript-based server that allows calling other MCP clients from your own MCP client, facilitating task delegation and context window offloading for enhanced multi-agent interactions.Last updated -314JavaScriptMIT License
- -securityFlicense-qualityA simple TypeScript library for creating Model Context Protocol (MCP) servers with features like type safety, parameter validation, and a minimal code API.Last updated -1TypeScriptMIT License
- -security-license-qualityA TypeScript-based server that connects MCP Clients to Dify applications, dynamically exposing Dify applications as tools that can be used directly within the MCP Client.Last updated -2JavaScriptMIT License
- -securityAlicense-qualityA TypeScript framework for building MCP servers with client session management capabilities, supporting tools definition, authentication, image content, logging, and error handling.Last updated -6,371TypeScriptMIT License