OpenHue MCP Server
OpenHue MCP 服务器
MCP 服务器可使用 OpenHue CLI 通过 Claude 和其他 LLM 接口控制飞利浦 Hue 灯。
先决条件
Node.js (v16 或更高版本)
Claude 桌面版(可选,用于测试)
Related MCP server: Philips Hue MCP Service
桥接设置
在使用服务器之前,您需要使用 Hue Bridge 设置 OpenHue CLI:
运行安装命令:
# 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按照屏幕上的说明进行操作:
CLI 将搜索您的 Hue Bridge
出现提示时,按下 Hue Bridge 上的链接按钮
等待确认设置完成
通过列出灯光来验证设置:
# 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如果您看到列出的灯光,则设置已完成,您可以使用 MCP 服务器了。
安装
克隆存储库:
git clone <your-repo-url>
cd claude-mcp-openhue安装依赖项:
npm install构建项目:
npm run build运行服务器:
npm start特征
该服务器通过 MCP 公开以下功能:
灯光控制
列出所有灯光或获取特定灯光的详细信息
打开/关闭灯
调整亮度
设置颜色
控制色温
房间控制
列出所有房间或获取房间详细信息
同时控制房间内的所有灯光
设置整个房间的亮度和颜色
场景管理
列出可用场景
使用不同模式激活场景
按房间过滤场景
与 Claude Desktop 一起使用
打开您的 Claude Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
添加服务器配置:
{
"mcpServers": {
"hue": {
"command": "node",
"args": ["/absolute/path/to/build/index.js"]
}
}
}重启Claude桌面
查找锤子图标以验证服务器是否已连接
示例命令
连接后,您可以向 Claude 询问自然语言问题,例如:
“客厅里有什么灯?”
“把厨房里的灯都打开”
“将卧室灯光亮度设置为 50%”
“把办公室的灯换成蓝色”
“激活‘放松’场景”
“书房里有哪些场景可以拍摄?”
可用工具
获取灯光
列出所有灯光或获取特定灯光的详细信息
{
lightId?: string; // Optional light ID or name
room?: string; // Optional room name filter
}控制灯
控制单个灯光
{
target: string; // Light ID or name
action: "on" | "off";
brightness?: number; // 0-100
color?: string; // Color name
temperature?: number; // 153-500 Mirek
}获取房间
列出所有房间或获取特定房间的详细信息
{
roomId?: string; // Optional room ID or name
}控制室
控制房间内的所有灯光
{
target: string; // Room ID or name
action: "on" | "off";
brightness?: number;
color?: string;
temperature?: number;
}获取场景
列出可用的场景
{
room?: string; // Optional room name filter
}激活场景
激活特定场景
{
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故障排除
服务器未连接
检查 Docker 是否正在运行
验证 OpenHue 配置是否存在
检查 Claude Desktop 日志
尝试直接运行 OpenHue CLI
命令失败
检查 OpenHue CLI 权限
验证灯光/房间/场景名称
检查 Docker 容器日志
验证 Hue Bridge 连接
执照
MIT 许可证
贡献
分叉存储库
创建你的功能分支
提交你的更改
推送到分支
创建新的 Pull 请求
Available Tools
6 toolsactivate-sceneC
Activate a specific scene
Inputs: name (required), mode, room.
control-lightC
Control a specific Hue light
Inputs: action (required), target (required), brightness, color, +1 more.
control-roomC
Control all lights in a room
Inputs: action (required), target (required), brightness, color, +1 more.
get-lightsB
List all Hue lights or get details for a specific light
Inputs: lightId, room.
get-roomsB
List all rooms or get details for a specific room
Inputs: roomId.
get-scenesC
List all scenes or get details for specific scenes
Inputs: room.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: activate-scene targets scene activation, control-light and control-room handle light control at different granularities, and the get-* tools retrieve specific resource types. There is no overlap in functionality, making tool selection straightforward for an agent.
All tool names follow a consistent verb-noun pattern with hyphen separation (e.g., activate-scene, control-light, get-lights). The naming is uniform across all tools, with no deviations in style or convention, ensuring predictability and readability.
With 6 tools, the server is well-scoped for managing Philips Hue devices. The count is appropriate, covering core operations like control and retrieval for lights, rooms, and scenes without being overly sparse or bloated, fitting typical home automation workflows.
The toolset provides solid coverage for the Hue domain, including control and retrieval for lights, rooms, and scenes. A minor gap exists in missing update or delete operations for scenes or rooms, but agents can still accomplish most common tasks with the available tools.
Maintenance
Related MCP Connectors
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Read your tracked time and projects, pause tracking or add a note, from Claude or ChatGPT.
Create projects, nodes, and tasks in UluP Spaces by conversation with Claude.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables control of Philips Hue lights through VS Code Copilot or Claude Desktop using natural language commands. Supports turning lights on/off, adjusting brightness, changing colors, and listing available lights on your Hue Bridge.2-
- AlicenseNot gradedqualityDmaintenanceEnables control of Philips Hue lights through the Model Context Protocol, providing tools for turning lights on/off, setting brightness and color, and retrieving light status.1Apache 2.0
- AlicenseAqualityDmaintenanceEnables control of Philips Hue lights via Bluetooth LE directly from Claude, without requiring a Hue Bridge or internet connection.826 PyPI1MIT
- FlicenseNot gradedqualityDmaintenanceControls Philips Hue lights based on Claude Code session events, using color animations to indicate Claude's status (thinking, working, success, etc.).10-