nanoleaf-mcp-server is an MCP server designed to control Nanoleaf smart lights through the Warp terminal or any MCP-compatible client. It provides a set of tools for device discovery, connection, authorization, and light control.
Main capabilities include: automatically discovering Nanoleaf devices on the network; directly connecting to a specified device via IP; supporting authorization pairing for secure connections; full control of light on/off, brightness (0-100), color (hue 0-360, saturation 0-100), color temperature (1200-6500K), and applying light effects; listing all available effects; and retrieving detailed device information.
Usage: The automated setup script is recommended; it builds the Docker image, scans for devices, helps obtain an authorization token, creates a configuration file, and generates the Warp configuration. Manual steps are also available: clone and build the Docker image; find the device IP through automatic discovery, manual IP scanning, or the router management panel; put the device into pairing mode (hold the power button for 5-7 seconds), then obtain an authorization token via a curl command within 30 seconds; create a .env file to configure environment variables; test the setup; and run the example script. For scheduled tasks, the provided scheduling script can be used, supporting only brightness and power control to avoid device restarts caused by effect switching.
Warp terminal integration: Add the server configuration to Warp's MCP configuration, replacing it with the actual device IP and authorization token, and you can use the tools directly in Warp to control the lights.
Use cases: smart home control, automated light management via terminal or MCP client, scheduled brightness adjustment, etc.
Limitations: The authorization token grants full control of the device and cannot have its permissions or rate limited, so it must be kept secure; the HTTPS transport path accepts self-signed certificates and is only recommended for use on trusted local networks; switching effects on some firmware versions may cause the panels to briefly restart; device compatibility includes Nanoleaf Canvas, Light Panels, Hexagons, and other devices that support the v1 API. The project is licensed under the MIT License.