The Nanoleaf MCP Server provides comprehensive control over Nanoleaf smart lights, enabling programmatic management via Warp Terminal.
- Device Discovery & Connection: Automatically find devices on your network or connect to specific ones using IP addresses.
- Authorization: Securely pair with devices by putting them in pairing mode to obtain auth tokens.
- Light Control: Turn lights on/off, adjust brightness (0-100), set colors (hue 0-360, saturation 0-100), and apply effects.
- Effect Management: List and apply pre-defined lighting effects like 'Cyberpunk 2077' or 'Northern Lights'.
- Information Retrieval: Get detailed information about connected devices.
- Deployment: Dockerized for easy deployment.
- Compatibility: Works with Nanoleaf Canvas, Light Panels, Hexagons, and devices supporting the v1 API.
Allows deploying and running the Nanoleaf MCP server in a containerized environment for easier setup and network access
Supports environment variable configuration through .env files to store and manage Nanoleaf device connection details and authentication tokens
Enables controlling Nanoleaf smart lights directly from Warp terminal through MCP integration, supporting device discovery, power control, brightness/color adjustment, and effect application
Nanoleaf MCP Server
A Model Context Protocol (MCP) server for controlling Nanoleaf smart lights. This server provides tools to control your Nanoleaf devices through Warp terminal or any MCP-compatible client.
Features
- 🔍 Auto-discovery of Nanoleaf devices on your network
- 🔗 Direct IP connection for specific device targeting
- 🔐 Authorization support for secure device pairing
- 💡 Full control of lights, brightness, colors, and effects
- 🐳 Dockerized for easy deployment
- 🖥️ Warp terminal integration
Available Tools
get_nanoleaf_info
- Get detailed device informationturn_on_nanoleaf
/turn_off_nanoleaf
- Control power stateset_brightness
- Adjust brightness (0-100)set_color
- Set color using hue (0-360) and saturation (0-100)set_effect
- Apply lighting effectsget_effects
- List all available effectsdiscover_nanoleaf
- Discover devices on networkconnect_to_ip
- Connect to specific IP addressauthorize_nanoleaf
- Authorize with device in pairing mode
Quick Setup Guide
Automated Setup (Recommended)
For the easiest setup experience, use the included setup script:
This script will:
- Build the Docker image
- Scan for Nanoleaf devices on your network
- Help you get the authorization token
- Create all configuration files
- Test the setup
- Generate your Warp configuration
Manual Setup
Prerequisites
- Docker installed on your system
- Nanoleaf device(s) on your network
- Warp terminal (optional, for MCP integration)
Step 1: Clone and Build
Step 2: Find Your Nanoleaf Device
Option A: Auto-discovery
Option B: Manual IP scan
Option C: Check router admin panel for connected devices
Step 3: Get Authorization Token
- Put your Nanoleaf device in pairing mode:
- Hold the power button on your Nanoleaf device for 5-7 seconds
- Look for pairing indicator (usually a flashing light)
- Get the auth token immediately (within 30 seconds):You should get a response like:
Step 4: Configure Environment
Create a .env
file in the project directory:
Step 5: Test Your Setup
If successful, you'll see detailed information about your Nanoleaf device!
Step 6: Run Examples (Optional)
Test all functionality with the example script:
This will demonstrate all available features including turning lights on/off, changing colors, and applying effects.
Working Example
Here's a complete working example with real values (replace with your own):
- Device discovered at:
<DEVICE_IP>:16021
- Auth token obtained:
<AUTH_TOKEN>
- Warp configuration:
- Test command:
Warp Terminal Integration
Add to Warp MCP Configuration
Add this to your Warp MCP servers configuration (replace the values with your actual device IP and auth token):
Important:
- Replace
192.168.1.100
with your Nanoleaf device's IP address - Replace
YourAuthTokenHere123456789
with your actual auth token - Make sure you've built the Docker image with tag
nanoleaf-mcp-server-nanoleaf-mcp-server
Alternative Configuration (if path issues occur)
If you encounter path-related issues, you can also use this alternative approach:
Using in Warp
Once configured, you can use the Nanoleaf tools directly in Warp:
- Ask to turn lights on/off
- Change brightness and colors
- Apply cool effects like "Northern Lights" or "Cyberpunk"
- Get device information
Manual Usage Examples
Turn lights on/off
Set brightness
Apply an effect
Troubleshooting
Device Not Found
- Ensure device is on the same network
- Check firewall settings
- Try manual IP scanning:
nmap -p 16021 192.168.1.0/24
Authorization Failed
- Device must be in pairing mode (hold power button 5-7 seconds)
- Pairing mode only lasts ~30 seconds
- Make sure no other devices are already controlling it
Connection Issues
- Verify IP address is correct
- Check if device uses HTTPS (some newer models)
- Ensure Docker has network access (
--network=host
)
Environment Variables Not Working
- Check
.env
file exists and has correct values - Verify Docker command includes
--env-file .env
- Make sure file paths are absolute in Warp config
Warp Terminal Issues
"The system cannot find the path specified" error
- Use the direct environment variable configuration instead of
--env-file
- Make sure your Docker image tag matches exactly:
nanoleaf-mcp-server-nanoleaf-mcp-server
- Try the alternative bash configuration if path issues persist
MCP server not responding in Warp
- Verify the Docker image is built with the correct tag
- Check that your IP address and auth token are correct in the configuration
- Test the Docker command manually first:
"MCP server exited" in logs
- This usually indicates a configuration issue
- Check that all environment variables are properly set
- Ensure the Docker image exists:
docker images | grep nanoleaf
Device Compatibility
Tested with:
- Nanoleaf Canvas
- Nanoleaf Light Panels
- Nanoleaf Hexagons
Should work with most Nanoleaf devices that support the v1 API.
Contributing
Feel free to submit issues, feature requests, or pull requests!
License
MIT License - see LICENSE file for details.
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.
Tools
A Model Context Protocol server that enables controlling Nanoleaf smart lights through Warp terminal or any MCP-compatible client, providing tools for device discovery, authorization, and control of lights, brightness, colors, and effects.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.Last updated -PythonMIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that provides intelligent access to PowerPlatform/Dataverse entities and records. This tool offers context-aware assistance, entity exploration and metadata access.Last updated -4661JavaScriptMIT License
- -securityAlicense-qualityA lightweight Model Control Protocol server that allows agents like Cursor to interface with the Neon database REST API through Cloudflare Workers.Last updated -17JavaScript
- -securityFlicense-qualityA Model Context Protocol server for managing cloud servers, particularly DigitalOcean droplets, allowing users to identify providers via IP addresses and perform operations like power management, status monitoring, and resource usage tracking.Last updated -1Python