CheerLights
STDIOMCP server that synchronizes colors across connected lights worldwide via CheerLights API.
MCP server that synchronizes colors across connected lights worldwide via CheerLights API.
A modern Model Context Protocol (MCP) server that provides comprehensive access to the CheerLights API. CheerLights is a global IoT project that synchronizes colors across thousands of connected lights worldwide, creating a real-time shared experience.
# Clone the repository git clone https://github.com/cheerlights/cheerlights-mcp.git cd cheerlights-mcp # Install with uv uv sync # Run the server uv run cheerlights-mcp
# Clone and install git clone https://github.com/cheerlights/cheerlights-mcp.git cd cheerlights-mcp pip install -e . # Run the server python -m cheerlights_mcp.server
# Install with development dependencies uv sync --dev # Install pre-commit hooks uv run pre-commit install
pip install cheerlights-mcp
Add to your Claude Desktop configuration:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{ "mcpServers": { "cheerlights": { "command": "uv", "args": ["run", "cheerlights-mcp"], "cwd": "/path/to/cheerlights-mcp" } } }
# Standard I/O (default) python -m cheerlights_mcp.server # With specific transport python -m cheerlights_mcp.server stdio python -m cheerlights_mcp.server sse python -m cheerlights_mcp.server streamable-http
from cheerlights_mcp import create_server # Create and run server server = create_server("My CheerLights Server") server.run()
get_current_cheerlights_color()Returns structured ColorData with:
color: Current color nametimestamp: When it was setentry_id: Unique identifiercreated_at: Parsed datetime (optional)get_cheerlights_history(count: int = 5)Returns ColorHistory with recent changes (1-100 entries).
analyze_color_statistics(sample_size: int = 50)Returns ColorStatistics with:
search_colors(color: str, limit: int = 20)Returns ColorSearchResult with matching entries.
get_hex_color_code(color_name: str)Returns HexColor with hex code and RGB values.
cheerlights://current - Current color statuscheerlights://history/{count} - Recent color historycheerlights://colors/supported - All supported colors# Run all tests uv run pytest # Run with coverage uv run pytest --cov=cheerlights_mcp # Run specific test files uv run pytest tests/test_tools.py -v
cheerlights-mcp/
├── src/cheerlights_mcp/
│   ├── api/              # ThingSpeak API client
│   ├── models/           # Pydantic data models
│   ├── tools/            # MCP tool implementations
│   ├── utils/            # Utilities (color mapping, statistics)
│   └── server.py         # Main FastMCP server
├── tests/                # Comprehensive test suite
└── examples/             # Usage examples
CheerLights supports these standard colors:
Each color includes hex codes and RGB values for precise representation.
{ "color": "red", "timestamp": "2024-01-15 14:30:22 UTC", "entry_id": "12345", "created_at": "2024-01-15T14:30:22Z" }
{ "color_counts": {"red": 15, "blue": 12, "green": 8}, "most_popular": "red", "least_popular": "green", "total_changes": 35, "unique_colors": 3, "analysis_period": "2 hours" }
# Clone and setup git clone https://github.com/cheerlights/cheerlights-mcp.git cd cheerlights-mcp uv sync --dev # Install pre-commit hooks uv run pre-commit install # Run tests uv run pytest -v
This project is licensed under the MIT License - see the LICENSE file for details.
CheerLights is a global Internet of Things project that synchronizes colored lights all around the world to create a synchronized light display. The project was created by Hans Scharler and has connected thousands of lights across the globe since 2011. When someone changes the color on the CheerLights Discord Server, all participating lights change to that color in near real-time.
This MCP server provides AI assistants with rich access to CheerLights data, enabling analysis of global lighting trends, color popularity, and temporal patterns in this unique IoT dataset.