WLED MCP 服务器 logo

WLED MCP 服务器

Community
mrkprdo

A Model Context Protocol (MCP) server for controlling WLED devices through LLM interactions. This server enables Claude and other LLMs to directly control your WLED smart lighting devices with…

Publishermrkprdo
Repositorywled_mcp
LanguagePython
Forks
4
Stars
16
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    WLED MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    16 stars and 4 forks from the linked repository.

WLED MCP Server

A Model Context Protocol (MCP) server for controlling WLED devices through LLM interactions. This server enables Claude and other LLMs to directly control your WLED smart lighting devices with natural language commands.

Features

  • Device Control: Turn WLED devices on/off, adjust brightness (0-255)
  • Color Management: Set RGB colors with precise control
  • Effects & Animation: Access 100+ built-in lighting effects with customizable speed and intensity
  • Presets: Create, list, and activate saved lighting presets
  • Palettes: Browse and apply color palettes for effects
  • Device Information: Get detailed device status, capabilities, and configuration
  • Advanced Control: Use raw JSON API for complex operations and custom states

⚠️ IMPORTANT DISCLAIMER

USE AT YOUR OWN RISK: This MCP server directly controls your WLED device and can modify its configuration, effects, colors, and settings. The author is NOT LIABLE for any damage, malfunction, or unintended behavior that may occur to your WLED device, LED strips, or related hardware when using this software.

STRONGLY RECOMMENDED BEFORE USE:

  • Backup your WLED configuration: Export your current WLED config via the web interface (Config → Security & Updates → Backup Configuration)
  • Save your presets: Document or export any custom presets you want to keep
  • Test on non-critical devices first: Try this software on a test setup before using on important lighting installations
  • Understand the risks: This software can change brightness, colors, effects, and potentially overwrite your saved presets

By using this software, you acknowledge that you understand these risks and agree that you are solely responsible for any consequences.

Installation

  1. Clone this repository:
bash
git clone https://github.com/mrkprdo/wled_mcp.git
cd wled_mcp
  1. Install dependencies:
bash
pip install -e .

Quick Start

1. Configure Your WLED Device

Set your WLED device IP address:

bash
export WLED_HOST=192.168.1.100

2. Test the Connection

Run the test script to verify connectivity:

bash
python examples/test_server.py

3. Use with Claude Desktop

Add this configuration to your Claude Desktop MCP settings:

json
{
  "mcpServers": {
    "wled": {
      "command": "python",
      "args": ["-m", "wled_mcp.server"],
      "env": {
        "WLED_HOST": "192.168.1.100"
      }
    }
  }
}

4. Start Controlling Your WLED

You can now ask Claude to control your WLED device with natural language:

  • "Turn on my WLED and set it to bright blue"
  • "Set a rainbow effect with medium speed"
  • "Dim the lights to 25% brightness"
  • "Show me the current device status"
  • "Activate my bedtime preset"
  • "Set the lights to a warm white color"
  • "List all available effects"

Available Tools

Basic Controls

  • wled_set_power(on: bool, host?: str) - Turn device on/off
  • wled_set_brightness(brightness: int, host?: str) - Set brightness (0-255)
  • wled_set_color(r: int, g: int, b: int, host?: str) - Set RGB color (0-255 each)

Effects & Animation

  • wled_set_effect(effect_id: int, speed?: int, intensity?: int, host?: str) - Set lighting effect with optional speed/intensity (0-255)
  • wled_get_effects(host?: str) - List all available effects with IDs and names
  • wled_get_palettes(host?: str) - List available color palettes

Presets

  • wled_get_presets(host?: str) - List all saved presets with IDs and names
  • wled_activate_preset(preset_id: int, host?: str) - Activate a preset by ID (1-250)

Device Information

  • wled_get_info(host?: str) - Get device information (name, version, LED count, capabilities)
  • wled_get_state(host?: str) - Get current device state (power, brightness, color, effect)

Advanced

  • wled_set_state(state_json: str, host?: str) - Set device state using raw JSON for complex operations

Note: All tools support an optional host parameter. If not provided, the WLED_HOST environment variable will be used.

Example Usage

Via Claude Desktop

Once configured, you can use natural language commands:

"Turn on my WLED lights and set them to a soft purple color"
"Set a rainbow effect with slow speed"
"Show me all available presets"
"Activate preset 5"
"Set brightness to 50%"

Direct API Usage

python
# Turn on and set to purple
await wled_set_power(True)
await wled_set_color(128, 0, 128)

# Set rainbow effect with custom speed
await wled_set_effect(9, speed=150, intensity=200)

# Get device info
info = await wled_get_info()

# Activate a preset
await wled_activate_preset(3)

Troubleshooting

Common Issues

  • Connection Errors:

    • Ensure your WLED device is powered on and connected to the same network
    • Verify the IP address is correct (check your router or WLED web interface)
    • Test connectivity with ping <WLED_IP>
  • Environment Variable Issues:

    • Make sure WLED_HOST is set correctly: export WLED_HOST=192.168.1.100
    • On Windows: set WLED_HOST=192.168.1.100
  • Tool/Command Errors:

    • Use wled_get_effects() to see available effect IDs (usually 0-100+)
    • Use wled_get_presets() to see available preset IDs (1-250)
    • Check device capabilities with wled_get_info()
  • Claude Desktop Integration:

    • Restart Claude Desktop after updating MCP configuration
    • Check that Python is in your system PATH
    • Verify the MCP server starts without errors

Testing Your Setup

Run the test script to verify everything works:

bash
python examples/test_server.py

This will test basic connectivity and functionality with your WLED device.

Development

Project Structure

wled_mcp/
├── wled_mcp/
│   ├── __init__.py
│   ├── server.py          # MCP server implementation
│   └── wled_client.py     # WLED HTTP client
├── examples/
│   └── test_server.py     # Test script
├── pyproject.toml         # Project configuration
└── README.md

Contributing

The server uses WLED's JSON API for reliable communication and supports all standard WLED features. Contributions welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License Summary

  • ✅ Commercial use allowed
  • ✅ Modification allowed
  • ✅ Distribution allowed
  • ✅ Private use allowed
  • ❌ No liability or warranty provided

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "mrkprdo-wled_mcp": {
      "command": "",
      "args": []
    }
  }
}

Use WLED MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once WLED MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add WLED MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the WLED MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mrkprdo-wled_mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wled-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the WLED MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the WLED MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use WLED MCP 服务器 to help me with this task?
WLED MCP 服务器
Sure. I read it.
Here is what I found using WLED MCP 服务器.

Frequently asked questions

What is the WLED MCP 服务器 MCP server used for?

WLED MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use WLED MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use WLED MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use WLED MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With WLED MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect WLED MCP 服务器 MCP to TypingMind?

WLED MCP 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does WLED MCP 服务器 MCP provide in TypingMind?

WLED MCP 服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use WLED MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If WLED MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇