Govee灯控MCP服务器

Govee灯控MCP服务器

用于通过Govee API控制Govee灯的MCP服务器。

快速入门

环境准备

  1. 创建 .env 文件,填入以下内容:
    GOVEE_API_KEY=your_api_key_here
    GOVEE_DEVICE_ID=your_device_id_here
    GOVEE_SKU=your_device_sku_here
    
  2. 从Govee开发者门户获取API密钥,并通过Govee Home应用找到设备ID和SKU。

安装

使用Smithery安装

运行以下命令:

npx -y @smithery/cli install @mathd/govee_mcp_server --client claude

手动安装

运行以下命令:

pip install .
# 或开发模式(含测试依赖)
pip install -e ".[test]"

使用

控制设备

使用CLI控制Govee设备:

govee-cli power on # 打开设备
govee-cli color 255 0 0 # 设置为红色
govee-cli brightness 50 # 设置亮度为50%

测试

运行测试:

pytest tests/