Govee MCP 서버
Govee API를 통해 Govee LED 장치를 제어하는 MCP 서버입니다.
설정
환경 변수
다음 변수를 사용하여 루트 디렉토리에 .env 파일을 만듭니다.
지엑스피1
이러한 값을 얻으려면:
Govee 개발자 포털에서 API 키를 받으세요
Govee Home 앱을 사용하여 기기 ID와 SKU를 찾으세요.
Related MCP server: OpenHue MCP Server
설치
Smithery를 통해 설치
Smithery를 통해 Claude Desktop에 Govee MCP Server를 자동으로 설치하려면:
npx -y @smithery/cli install @mathd/govee_mcp_server --client claude수동 설치
# Install with pip
pip install .
# For development (includes test dependencies)
pip install -e ".[test]"용법
MCP 서버
MCP 서버는 모델 컨텍스트 프로토콜(Model Context Protocol)을 통해 Govee 장치를 제어하는 도구를 제공합니다. Cline 또는 다른 MCP 클라이언트와 함께 사용할 수 있습니다.
사용 가능한 도구:
turn_on_off: LED를 켜거나 끕니다set_color: RGB 값을 사용하여 LED 색상을 설정합니다.set_brightness: LED 밝기 레벨 설정
명령줄 인터페이스
Govee 장치를 직접 제어할 수 있는 CLI가 제공됩니다.
# Turn device on/off
govee-cli power on
govee-cli power off
# Set color using RGB values (0-255)
govee-cli color 255 0 0 # Red
govee-cli color 0 255 0 # Green
govee-cli color 0 0 255 # Blue
# Set brightness (0-100)
govee-cli brightness 50전체 명령 설명서를 보려면 govee-cli --help 실행하세요.
개발
테스트 실행
테스트 모음을 실행하려면:
# Install test dependencies
pip install -e ".[test]"
# Run all tests
pytest tests/
# Run specific test files
pytest tests/test_server.py # Server tests (mocked API calls)
pytest tests/test_cli.py # CLI tests (real API calls)
# Run tests with verbose output
pytest tests/ -v참고: CLI 테스트는 Govee 기기에 실제 API 호출을 수행하여 기기를 제어합니다. 테스트를 실행하기 전에 기기의 전원이 켜져 있고 연결되어 있는지 확인하세요.
프로젝트 구조
.
├── src/govee_mcp_server/
│ ├── __init__.py
│ ├── server.py # MCP server implementation
│ └── cli.py # Command-line interface
├── tests/
│ ├── test_server.py # Server tests (with mocked API)
│ └── test_cli.py # CLI tests (real API calls)
└── pyproject.toml # Project configuration테스트 범위
서버 테스트에는 다음이 포함됩니다.
환경 초기화
Govee API 클라이언트 메서드
서버 도구 및 유틸리티
오류 처리
CLI 테스트는 실제 API 호출을 실행하여 Govee 장치를 제어함으로써 실제 통합 테스트를 수행합니다.