Govee MCP Server

Govee MCP Server

Enables users to control Govee LED devices using the Govee API, with features for turning devices on/off, setting colors, and adjusting brightness through a CLI or MCP clients.

mathd

Home Automation & IoT
Visit Server

README

Govee MCP Server

smithery badge

An MCP server for controlling Govee LED devices through the Govee API.

Setup

Environment Variables

Create a .env file in the root directory with the following variables:

GOVEE_API_KEY=your_api_key_here
GOVEE_DEVICE_ID=your_device_id_here
GOVEE_SKU=your_device_sku_here

To get these values:

  1. Get your API key from the Govee Developer Portal
  2. Use the Govee Home app to find your device ID and SKU

Installation

Installing via Smithery

To install Govee MCP Server for Claude Desktop automatically via Smithery:

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

Manual Installation

# Install with pip
pip install .

# For development (includes test dependencies)
pip install -e ".[test]"

Usage

MCP Server

The MCP server provides tools for controlling Govee devices through the Model Context Protocol. It can be used with Cline or other MCP clients.

Available tools:

  • turn_on_off: Turn the LED on or off
  • set_color: Set the LED color using RGB values
  • set_brightness: Set the LED brightness level

Command Line Interface

A CLI is provided for direct control of Govee devices:

# 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

Run govee-cli --help for full command documentation.

Development

Running Tests

To run the test suite:

# 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

Note: The CLI tests make real API calls to your Govee device and will actually control it. Make sure your device is powered and connected before running these tests.

Project Structure

.
├── 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

Test Coverage

  • Server tests cover:

    • Environment initialization
    • Govee API client methods
    • Server tools and utilities
    • Error handling
  • CLI tests perform real-world integration testing by executing actual API calls to control your Govee device.

Recommended Servers

ThingsPanel MCP

ThingsPanel MCP

An integration server that connects AI models with ThingsPanel IoT platform, allowing AI assistants to interact with IoT devices through natural language for device control, data retrieval, and management operations.

Official
Python
MCP Personal Assistant Agent

MCP Personal Assistant Agent

A versatile Model Context Protocol server that enables AI assistants to manage calendars, track tasks, handle emails, search the web, and control smart home devices.

Local
Python
Tesla MCP Server

Tesla MCP Server

A Model Context Protocol server that connects to the Tesla Fleet API, allowing AI assistants like Claude to control Tesla vehicles and access vehicle information through natural language commands.

Local
TypeScript
MCP2Serial

MCP2Serial

A bridge that connects physical hardware devices with AI large language models via serial communication, allowing users to control hardware using natural language commands.

Local
Python
OpenHue MCP Server

OpenHue MCP Server

Enables control of Philips Hue lights through Claude and other LLM interfaces using the OpenHue CLI.

Local
TypeScript
Home Assistant MCP

Home Assistant MCP

Expose all Home Assistant voice intents through a Model Context Protocol Server allowing home control.

Local
Python
Tuya MCP Server

Tuya MCP Server

A cli tool to control Tuya devices based on tinytuya - cabra-lat/tuyactl

Local
Python
mcp2mqtt

mcp2mqtt

Links IoT devices to AI large models using the MCP and MQTT protocols, enabling natural language control, real-time AI responses, and complex instruction execution for interconnected IoT devices.

Python
SwitchBot MCP Server

SwitchBot MCP Server

Enables AI assistants to control SwitchBot devices, providing functionalities like device management, scene execution, and sensor information monitoring through the SwitchBot API.

JavaScript
Home Assistant MCP Server

Home Assistant MCP Server

A Model Context Protocol server that integrates with Home Assistant to provide smart home control capabilities through natural language, supporting devices like lights, climate systems, locks, alarms, and humidifiers.

Python