YM

ykhli/mcp-light-control

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

22 stars 3 forks 品質 58 トレンド 10

MCP server to control Philips Hue lights, including sending Morse code through them

概要

This MCP server allows Cursor or Claude Desktop to . 💡💡: tell Cursor agent to send a Morse code message to you when it's done with a task. https://www.youtube.com/watch?v=GM1l98TtZmk - Philips Hue bridge and lights - Hue bridge username (API key) - Node.js (v14 or higher) - Cursor or Claude Desktop 1. Clone this repository locally. 2. Obtain your Philips Hue bridge IP address and username. If you don't have one, run the discovery script: Follow the prompts to press the link button on your Hue bridge and receive your API key. 3. Run npm install followed by npm run build in the project directory. This will generate the MCP server script in the /build directory. 4. Add the following MCP configuration. In Cursor it's under Settings -> MCP -> Add new MCP server. In Claude Desktop it's under Settings -> MCP -> Add new MCP server.

README

以下は原文 README の抜粋です。原文を見る。

Morse Code Light MCP Server (Philips Hue) 💡

This MCP server allows Cursor or Claude Desktop to control Philips Hue lights and send messages through them using Morse code.

💡Example use case💡: tell Cursor agent to send a Morse code message to you when it’s done with a task.

Demo

https://www.youtube.com/watch?v=GM1l98TtZmk

Built with:

Setup

Prerequisites

  • Philips Hue bridge and lights
  • Hue bridge username (API key)
  • Node.js (v14 or higher)
  • Cursor or Claude Desktop

Local API Setup

  1. Clone this repository locally.

  2. Obtain your Philips Hue bridge IP address and username. If you don’t have one, run the discovery script:

    node build/discover-bridge.js
    

    Follow the prompts to press the link button on your Hue bridge and receive your API key.

  3. Run npm install followed by npm run build in the project directory. This will generate the MCP server script in the /build directory.

  4. Add the following MCP configuration. In Cursor it’s under Settings -> MCP -> Add new MCP server. In Claude Desktop it’s under Settings -> MCP -> Add new MCP server.

{
  "mcpServers": {
    "control_lights": {
      "command": "node",
      "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js"],
      "env": {
        "HUE_USERNAME": "YOUR_HUE_USERNAME",
        "BRIDGE_IP": "YOUR_BRIDGE_IP"
      }
    }
  }
}

Remote API Setup

This project supports controlling your Philips Hue lights remotely (from outside your local network) using the Hue Remote API. This enables you to control your lights from anywhere with an internet connection.

Getting Remote API Credentials

  1. Create a Hue Developer Account:

  2. Create a Remote Hue API App:

    • Go to https://developers.meethue.com/my-apps/
    • Create a new app with these details:
      • App name: Choose a name for your app
      • Callback URL: Use http://localhost/ for simple testing
      • Application description: Brief description of your app
    • After creating the app, you’ll receive:
      • Client ID
      • Client Secret
  3. Get Access and Refresh Tokens:

    a. Construct an authorization URL and open it in your browser:

    https://api.meethue.com/oauth2/auth?clientid=YOUR_CLIENT_ID&response_type=code&state=anystring&appid=YOUR_APP_NAME&deviceid=test-device&devicename=TestDevice
    

    Replace YOUR_CLIENT_ID and YOUR_APP_NAME with your values.

    b. Log in with your Hue developer account and authorize the app.

    c. You’ll be redirected to your callback URL with a code parameter.

    d. Extract the code from the URL (e.g., ?code=abcd1234&state=anystring).

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "control_lights": { "command": "node", "args": ["ABSOLUTE_PATH_TO_MCP_SERVER/build/index.js"], "env": { "HUE_USERNAME": "YOUR_HUE_USERNAME", "BRIDGE_IP": "YOUR_BRIDGE_IP" } } } }