openhue mcp server
Enables control of [Philips Hue](https://www.philips-hue.com/) lights through Claude and other LLM interfaces using the OpenHue CLI.
Enables control of [Philips Hue](https://www.philips-hue.com/) lights through Claude and other LLM interfaces using the OpenHue CLI.
An MCP server that enables control of Philips Hue lights through Claude and other LLM interfaces using the OpenHue CLI.
Before using the server, you need to set up the OpenHue CLI with your Hue Bridge:
Run the setup command:
# On Linux/macOS:
docker run -v "${HOME}/.openhue:/.openhue" --rm --name=openhue -it openhue/cli setup
# On Windows (PowerShell):
docker run -v "${env:USERPROFILE}.openhue:/.openhue" --rm --name=openhue -it openhue/cli setup
Follow the on-screen instructions:
Wait for confirmation that the setup is complete
Verify the setup by listing your lights:
# On Linux/macOS:
docker run -v "${HOME}/.openhue:/.openhue" --rm --name=openhue -it openhue/cli get lights
# On Windows (PowerShell):
docker run -v "${env:USERPROFILE}.openhue:/.openhue" --rm --name=openhue -it openhue/cli get lights
If you see your lights listed, the setup is complete and you're ready to use the MCP server.
Clone the repository:
git clone <your-repo-url>
cd claude-mcp-openhue
Install dependencies:
npm install
Build the project:
npm run build
Run the server:
npm start
This server exposes the following capabilities through MCP:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%Claudeclaude_desktop_config.json
Add the server configuration:
{
"mcpServers": {
"hue": {
"command": "node",
"args": ["/absolute/path/to/build/index.js"]
}
}
}
Restart Claude Desktop
Look for the hammer icon to verify the server is connected
Once connected, you can ask Claude natural language questions like:
Lists all lights or gets details for specific lights
{
lightId?: string; // Optional light ID or name
room?: string; // Optional room name filter
}
Controls individual lights
{
target: string; // Light ID or name
action: "on" | "off";
brightness?: number; // 0-100
color?: string; // Color name
temperature?: number; // 153-500 Mirek
}
Lists all rooms or gets specific room details
{
roomId?: string; // Optional room ID or name
}
Controls all lights in a room
{
target: string; // Room ID or name
action: "on" | "off";
brightness?: number;
color?: string;
temperature?: number;
}
Lists available scenes
{
room?: string; // Optional room name filter
}
Activates a specific scene
{
name: string; // Scene name or ID
room?: string; // Optional room name
mode?: "active" | "dynamic" | "static";
}
.
├── src/
│ └── index.ts # Main server implementation
├── build/ # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md
npm run build
npm start
MIT License
[
{
"description": "List all Hue lights or get details for a specific light",
"inputSchema": {
"properties": {
"lightId": {
"description": "Optional light ID or name to get specific light details",
"type": "string"
},
"room": {
"description": "Optional room name to filter lights",
"type": "string"
}
},
"type": "object"
},
"name": "get-lights"
},
{
"description": "Control a specific Hue light",
"inputSchema": {
"properties": {
"action": {
"description": "Turn light on or off",
"enum": [
"on",
"off"
],
"type": "string"
},
"brightness": {
"description": "Optional brightness level (0-100)",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"color": {
"description": "Optional color name (e.g., 'red', 'blue')",
"type": "string"
},
"target": {
"description": "Light ID or name",
"type": "string"
},
"temperature": {
"description": "Optional color temperature in Mirek",
"maximum": 500,
"minimum": 153,
"type": "number"
}
},
"required": [
"target",
"action"
],
"type": "object"
},
"name": "control-light"
},
{
"description": "List all rooms or get details for a specific room",
"inputSchema": {
"properties": {
"roomId": {
"description": "Optional room ID or name to get specific room details",
"type": "string"
}
},
"type": "object"
},
"name": "get-rooms"
},
{
"description": "Control all lights in a room",
"inputSchema": {
"properties": {
"action": {
"description": "Turn room lights on or off",
"enum": [
"on",
"off"
],
"type": "string"
},
"brightness": {
"description": "Optional brightness level (0-100)",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"color": {
"description": "Optional color name",
"type": "string"
},
"target": {
"description": "Room ID or name",
"type": "string"
},
"temperature": {
"description": "Optional color temperature in Mirek",
"maximum": 500,
"minimum": 153,
"type": "number"
}
},
"required": [
"target",
"action"
],
"type": "object"
},
"name": "control-room"
},
{
"description": "List all scenes or get details for specific scenes",
"inputSchema": {
"properties": {
"room": {
"description": "Optional room name to filter scenes",
"type": "string"
}
},
"type": "object"
},
"name": "get-scenes"
},
{
"description": "Activate a specific scene",
"inputSchema": {
"properties": {
"mode": {
"description": "Optional scene mode",
"enum": [
"active",
"dynamic",
"static"
],
"type": "string"
},
"name": {
"description": "Scene name or ID",
"type": "string"
},
"room": {
"description": "Optional room name for the scene",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"name": "activate-scene"
}
]