Logo vun WLED MCP 服务器

WLED MCP 服务器

Communautéit
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…

Editeurmrkprdo
Repositorywled_mcp
SproochPython
Forks
4
Stären
16
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    WLED MCP 服务器 stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    16 Stären an 4 Forks aus dem verlinkte 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

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

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

WLED MCP 服务器 MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal WLED MCP 服务器 verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

WLED MCP 服务器 als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu WLED MCP 服务器 an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "mrkprdo-wled_mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wled-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu WLED MCP 服务器. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu WLED MCP 服务器.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat WLED MCP 服务器?
WLED MCP 服务器
Jo. Ech hunn et gelies.
Dat hunn ech mat WLED MCP 服务器 fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server WLED MCP 服务器 benotzt?

WLED MCP 服务器 ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech WLED MCP 服务器 MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir WLED MCP 服务器 mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat WLED MCP 服务器 MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann WLED MCP 服务器 verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech WLED MCP 服务器 MCP mat TypingMind?

WLED MCP 服务器 leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt WLED MCP 服务器 MCP an TypingMind zur Verfügung?

WLED MCP 服务器 stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir WLED MCP 服务器 MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann WLED MCP 服务器 eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇