WLED MCP 服务器のロゴ

WLED MCP 服务器

コミュニティ
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…

公開者mrkprdo
リポジトリwled_mcp
言語Python
フォーク
4
スター
16
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    WLED MCP 服务器は、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには16件のスターと4件のフォークがあります。

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

インストール

TypingMind
前提条件:

Node.js 18+

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

WLED MCP 服务器のMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度WLED MCP 服务器に接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

WLED MCP 服务器をサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. WLED MCP 服务器のMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "mrkprdo-wled_mcp": {
      "command": "npx",
      "args": [
        "-y",
        "wled-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてWLED MCP 服务器のMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. WLED MCP 服务器のMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
WLED MCP 服务器を使ってこのタスクを手伝ってもらえますか?
WLED MCP 服务器
はい、読みました。
WLED MCP 服务器で調べた結果をお伝えします。

よくある質問

WLED MCP 服务器 MCPサーバーは何に使いますか?

WLED MCP 服务器は、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでWLED MCP 服务器 MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでWLED MCP 服务器を利用できます。

TypingMindでWLED MCP 服务器 MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。WLED MCP 服务器を接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

WLED MCP 服务器 MCPをTypingMindに接続するにはどうすればよいですか?

WLED MCP 服务器はTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでWLED MCP 服务器 MCPのどのようなツールを利用できますか?

WLED MCP 服务器はMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

WLED MCP 服务器 MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。WLED MCP 服务器で認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇