LedFX MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LedFX MCP Serverapply a rainbow effect to the living room virtual"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LedFX MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to interact with and control a local LedFX instance.
Overview
This MCP server provides a bridge between AI assistants (like Claude) and LedFX, allowing you to control your LED lighting setup through natural language. The server exposes LedFX's functionality as MCP tools that AI assistants can use to:
Query device and virtual information
List and manage LED devices and virtuals
Apply effects to virtuals (virtual LED strips)
Manage and activate scenes
Create custom palettes and playlists
Get AI-powered effect recommendations
Get system information
Features
🎨 Control LED effects through natural language
🔧 Manage multiple LED devices and virtuals
🎭 Activate pre-configured scenes
📊 Query device and system information
🔒 Type-safe TypeScript implementation
🏗️ Built following software design best practices
🎨 LedFX colors & gradients via
/api/colors(builtin + user-defined)🗂️ Palette management stored as user gradients in LedFX
🤖 AI-powered scene creation from natural language descriptions
📝 Playlist support for scene sequences
💡 Effect recommendations based on mood and description
📚 LedFX feature explanations - learn about any LedFX concept
🔄 Correct API implementation - uses virtuals (not devices) for effects
Design Principles
This project follows principles from:
Grokking Simplicity
Separation of Concerns: Actions (I/O operations) are clearly separated from calculations (pure functions)
Stratified Design: Clear abstraction layers (tools → client → API)
Immutability: Data transformations use pure functions where possible
A Philosophy of Software Design
Deep Modules: Complex LedFX API interactions hidden behind simple interfaces
Information Hiding: Implementation details abstracted from callers
Minimize Complexity: Each module has a single, focused responsibility
✅ Implementation Status
Current Status: Implemented with Comprehensive Test Suite
This MCP server is implemented against current LedFX APIs and validated with automated tests plus continuous integration checks. The implementation fixes critical API issues (virtuals vs devices) and adds advanced features like palette management, natural language scene creation, and AI-powered recommendations.
Important Notes
API Corrections Applied: Effects are correctly applied to virtuals (not devices), matching current LedFX API behavior
Comprehensive Testing: 34 tests covering unit and E2E scenarios - all passing
CI/CD Pipeline: GitHub Actions workflow with lint, build, test, and coverage jobs
Production Ready: Fully documented with installation guide, usage examples, and architecture docs
Documentation
API Specification - Complete LedFX API reference
Test Specification - Comprehensive test plans
Implementation Notes - Design decisions and technical notes
References - LedFX resources and links
Installation Guide - Step-by-step setup instructions
Usage Guide - How to use all features
Status: Ready for production use with LedFX 2.1.4+
Prerequisites
Node.js 24 or 25
A running LedFX instance (default:
localhost:8888)An MCP-compatible AI assistant (e.g., Claude Desktop)
Running LedFX for Testing
Using Docker (Recommended):
# Using docker-compose (included in this repository)
docker-compose up -d
# Or using docker run
docker run -d --name ledfx -p 8888:8888 ledfxorg/ledfx:latestUsing pip:
pip install ledfx
ledfx --host 0.0.0.0 --port 8888See the official LedFX links in REFERENCES.md for current installation docs.
Installation
# Clone the repository
git clone https://github.com/abossard/ledfx-mcp.git
cd ledfx-mcp
# Install dependencies
npm install
# Build and run in one command
npm run dev
Configuration
The server connects to LedFX using the following environment variables:
LEDFX_HOST: LedFX server host (default:localhost)LEDFX_PORT: LedFX server port (default:8888)
You can set these in your MCP client configuration or as environment variables.
Usage
Claude Desktop Configuration
Add the following to your Claude Desktop configuration file:
Claude Desktop launches this MCP server over stdio.
Use Node.js 24 or 25.
The path must be absolute when using
nodewithdist/index.js.
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"ledfx": {
"command": "node",
"args": ["/absolute/path/to/ledfx-mcp/dist/index.js"],
"env": {
"LEDFX_HOST": "localhost",
"LEDFX_PORT": "8888"
}
}
}
}Auto-recompile on every start (recommended for development):
Using npm run start ensures the TypeScript source is recompiled (prestart hook) each time the MCP client launches the server, so you never run stale code:
{
"mcpServers": {
"ledfx": {
"command": "npm",
"args": ["run", "start", "--prefix", "/absolute/path/to/ledfx-mcp"],
"env": {
"LEDFX_HOST": "localhost",
"LEDFX_PORT": "8888"
}
}
}
}If you prefer to run from Git without a local build, use npx as the command:
{
"mcpServers": {
"ledfx": {
"command": "npx",
"args": ["github:abossard/ledfx-mcp"],
"env": {
"LEDFX_HOST": "localhost",
"LEDFX_PORT": "8888"
}
}
}
}Example Interactions
Once configured, you can interact with your LedFX setup through natural language:
Basic Operations:
"List all my LED virtuals"
"Activate the rainbow effect on my desk light virtual"
"Show me all available scenes"
"Clear effects from all virtuals"
Natural Language Scene Creation:
"Create a calm ocean scene with slow blue waves"
"Make an energetic party scene with fast rainbow colors"
"Create a romantic scene with dim pink and purple gradients"
"Build a focus scene with steady white light at medium brightness"
Color and Palette Management:
"List all LedFX colors and gradients"
"Get color or gradient 'sunset'"
"Create a user color 'my-magenta' = #FF00FF"
"Create a new palette called 'Sunset Vibes' with #FFA500, #FF69B4, #800080"
"Save a playlist of my party scenes"
Effect Recommendations:
"Recommend effects for a relaxing evening"
"What effects work well with music?"
"Suggest something energetic for a party"
Learning LedFX:
"Explain what virtuals are in LedFX"
"What's the difference between devices and virtuals?"
"How do audio-reactive effects work?"
"Tell me about WLED devices"
"List all available effect types"
Available Tools
The server exposes 85+ MCP tools organized into categories:
Core Management
Tool | Description |
| Get LedFX server information (version, features) |
| List all physical LED devices |
| Get details about a specific device |
| List all virtual LED strips (includes global paused state) |
| Get details about a specific virtual |
| Activate/deactivate a virtual |
| Update virtual config (transitions, brightness, frequency range, matrix) |
| Trigger network device discovery |
| Check if all virtuals are globally paused |
| Toggle global pause on all virtuals |
| Get global brightness value (0-1) |
| Set global brightness for all virtuals |
| Set scene to activate on LedFX startup |
| Send notification to LedFX frontend UI |
Effect Control (CORRECTED - uses virtuals)
Tool | Description |
| Apply an effect to a virtual (not device) |
| Update effect configuration |
| Remove effects from a virtual |
| Get schemas for all effect types |
Scene Management
Tool | Description |
| List all available scenes |
| Activate a pre-configured scene |
| Create new scene from current config |
| Delete a saved scene |
| AI-powered scene creation from natural language |
Palette Management (LedFX /api/colors)
Tool | Description |
| List all palettes stored as user gradients |
| Create/update a palette (stored as user gradient) |
| Get palette by name |
| Delete a palette by name |
Playlist Management
Tool | Description |
| List all playlists |
| Create scene sequence playlist |
| Get specific playlist |
| Delete a playlist |
Color Management (LedFX /api/colors)
Tool | Description |
| List all colors and gradients from LedFX |
| Get a specific color or gradient by ID |
| Create/update a user color or gradient |
| Delete a user color or gradient |
| Delete all user-defined gradients (includes palettes) |
AI Features
Tool | Description |
| Get effect recommendations based on mood/description |
| Get detailed explanation of any LedFX feature |
| List all explainable features |
| List all effect types with descriptions |
Preset Management
Tool | Description |
| Get presets for a virtual's effect |
| Apply a preset to a virtual |
| Save current effect as a user preset |
| Delete a preset for a virtual |
Audio Management
Tool | Description |
| List audio input devices |
| Set active audio device |
Development
# Install dependencies
npm install
# Build the project
npm run build
# Build and run in one command
npm run dev
# Watch mode for development
npm run watch
# Build and run in one command
npm run dev
# Lint the code
npm run lint
# Fix linting issues
npm run lint:fixProject Structure
ledfx-mcp/
├── src/
│ ├── index.ts # Main server entry point
│ ├── ledfx-client.ts # LedFX API client
│ └── tools.ts # MCP tool definitions and handlers
├── docs/ # Comprehensive documentation
│ ├── API_SPECIFICATION.md # LedFX API reference
│ ├── TEST_SPECIFICATION.md # Test plans and requirements
│ ├── IMPLEMENTATION_NOTES.md # Known issues and fixes needed
│ └── REFERENCES.md # LedFX resources and links
├── dist/ # Compiled JavaScript (generated)
├── docker-compose.yml # Docker setup for testing
├── package.json # Project configuration
├── tsconfig.json # TypeScript configuration
└── README.md # This fileDocumentation
Comprehensive documentation is available in the docs/ directory:
API Specification
Complete reference for LedFX REST API endpoints (verified against LedFX 2.1.4 and upstream source):
All endpoint paths, methods, and parameters
Data model and orchestration caveats (virtuals, presets, scenes, playlists, blender)
API behavior quirks and compatibility notes
Test Specification
Comprehensive test requirements and test cases:
Unit test cases for all components
Integration test scenarios
End-to-end workflows
Performance test criteria
Compatibility test matrix
Mock strategies and test fixtures
Docker-based test environment setup
Implementation Notes
Critical analysis of current implementation vs actual API:
Known issues and bugs (devices vs virtuals confusion)
Required fixes before production use
Missing features and functionality gaps
Recommended implementation phases
Migration path for future versions
References
Concise source index for API verification:
Official LedFX documentation links
Release/version links
Upstream source files used to validate API behavior
Architecture
The server is organized into three main layers:
MCP Server Layer (
index.ts): Handles MCP protocol communicationTools Layer (
tools.ts): Defines available tools and routes requestsClient Layer (
ledfx-client.ts): Abstracts LedFX HTTP API interactions
This layered architecture ensures:
Clear separation of concerns
Easy testing and maintenance
Extensibility for new features
Contributing
Contributions are welcome! Please ensure your code:
Follows the existing code style
Includes appropriate comments
Passes linting (
npm run lint)Builds successfully (
npm run build)
License
MIT License - see LICENSE file for details
Resources
Troubleshooting
Server won't connect to LedFX
Ensure LedFX is running and accessible at the configured host/port
Check firewall settings
Verify the
LEDFX_HOSTandLEDFX_PORTenvironment variables
Tools not appearing in Claude
Restart Claude Desktop after configuration changes
Verify the path to
dist/index.jsis absoluteCheck Claude Desktop logs for errors
Support
For issues and questions:
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/abossard/ledfx-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server