LIFX MCP Server

by burkeholland

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

git clone https://github.com/your-org/mcp-lifx.git cd mcp-lifx npm install

Build

npm run build

Run

You can start the server directly:

npm start

Or use MCP tooling (recommended):

npx fastmcp dev src/index.ts

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.

{ "mcp": { "inputs": [ { "type": "promptString", "id": "lifx_token", "description": "LIFX Cloud API Token", "password": true } ], "servers": { "lifx": { "command": "npx", "args": ["-y", "mcp-lifx"], "env": { "LIFX_TOKEN": "${input:lifx_token}" } } } } }

Configuration

The server requires a LIFX API token. You can provide it via:

  • .env file:
    LIFX_TOKEN=your_lifx_token_here
  • 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 selector
  • set-state: Set state (power, color, brightness, etc.)
  • set-states: Set multiple states at once
  • set-state-delta: Apply delta changes
  • toggle-lights: Toggle power
  • breathe-effect, move-effect, morph-effect, flame-effect: Run effects
  • get-scenes, activate-scene: Scene management
  • parse-color: Parse color strings

Example: Toggle a Light

{ "tool": "toggle-lights", "parameters": { "selector": "label:Lamp" } }

Development

Scripts

  • npm run build – Compile TypeScript to build/
  • npm start – Run the compiled server
  • npm run dev – Run with tsx for development
  • npm 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.

-
security - not tested
F
license - not found
-
quality - not tested

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.

  1. Features
    1. Getting Started
      1. Prerequisites
      2. Installation
      3. Build
      4. Run
      5. Usage with VS Code
      6. Configuration
    2. Usage
      1. Example: Toggle a Light
    3. Development
      1. Scripts
    4. API Reference
      1. License

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A 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 -
          3
          14
          JavaScript
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          A simple TypeScript library for creating Model Context Protocol (MCP) servers with features like type safety, parameter validation, and a minimal code API.
          Last updated -
          1
          TypeScript
          MIT License
        • -
          security
          -
          license
          -
          quality
          A 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 -
          2
          JavaScript
          MIT License
        • -
          security
          A
          license
          -
          quality
          A TypeScript framework for building MCP servers with client session management capabilities, supporting tools definition, authentication, image content, logging, and error handling.
          Last updated -
          6,371
          TypeScript
          MIT License

        View all related MCP servers

        ID: y5fwus74z3