Skip to main content
Glama
Jelloeater

ulanzi-mcp

by Jelloeater
README.md
# Ulanzi MCP Server

[![Test](https://github.com/Jelloeater/ulanzi-mcp/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/Jelloeater/ulanzi-mcp/actions/workflows/test.yml)
[![CodeQL](https://github.com/Jelloeater/ulanzi-mcp/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/Jelloeater/ulanzi-mcp/actions/workflows/codeql.yml)
[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/pypi/ulanzi-mcp)](https://libraries.io/pypi/ulanzi-mcp)

[![ulanzi-mcp](https://snyk.io/advisor/python/ulanzi-mcp/badge.svg)](https://snyk.io/advisor/python/ulanzi-mcp)
![PyPI - Status](https://img.shields.io/pypi/status/ulanzi-mcp)
[![PyPI](https://img.shields.io/pypi/v/ulanzi-mcp)](https://pypi.org/project/ulanzi-mcp/)
[![GitHub](https://img.shields.io/github/license/jelloeater/ulanzi-mcp)](https://github.com/Jelloeater/ulanzi-mcp/blob/main/LICENSE)

MCP server and CLI for the Ulanzi TC001 Smart Pixel Clock (AWTRIX3 firmware).

## Features

- **MCP Server**: Control your Ulanzi clock from AI assistants (Claude Desktop, Cursor, Windsurf)
- **CLI Tool**: Command-line interface for scripting and automation
- **Multi-clock Support**: Control multiple clocks from a single instance
- **Full API Coverage**: Access all AWTRIX3 HTTP API endpoints

## Quick Start

### 1. Install

```bash
cd ulanzi-mcp
uv sync
```

### 2. Configure

Copy `.env.example` to `.env` and set your clock IP:

```env
ULANZI_HOSTS=http://192.168.1.100
```

For multiple clocks:
```env
ULANZI_HOSTS=http://192.168.1.100,http://192.168.1.101
```

### 3. Use CLI

```bash
# Check configuration
ulanzi info

# Turn on display
ulanzi power on

# Show notification
ulanzi notify "Meeting in 5 minutes!"

# Set brightness
ulanzi brightness 200
```

### 4. Use with MCP (Claude Desktop)

Add to your Claude Desktop config:

```json
{
  "mcpServers": {
    "ulanzi-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/ulanzi-mcp", "run", "python", "-m", "ulanzi_mcp.server"]
    }
  }
}
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `ULANZI_HOSTS` | Clock address(es), comma-separated | `http://192.168.1.100` |
| `ULANZI_USERNAME` | HTTP auth username | (none) |
| `ULANZI_PASSWORD` | HTTP auth password | (none) |
| `ULANZI_API_TIMEOUT` | Request timeout (seconds) | `10` |
| `ULANZI_MQTT_PREFIX` | MQTT topic prefix | `awtrix` |

## Available Tools/Commands

See [docs/clock_spec.md](docs/clock_spec.md) for complete documentation.

## Development

```bash
# Run MCP server in development mode
uv run mcp dev src/ulanzi_mcp/server.py

# Run CLI
ulanzi --help

# Run tests
uv run pytest
```

## License

MIT

TDQS

A4/5.0

Scored across 20 tools

Disambiguation5/5

Each tool has a distinct and clear purpose. Even related tools like play_rtttl and play_sound are differentiated by whether the melody is a string or file-based. No two tools overlap ambiguously.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., clear_indicators, get_clock_settings). The naming is predictable and easy to understand.

Tool Count5/5

With 20 tools, the server covers the necessary operations for a smart clock without being excessive. Each tool addresses a specific function, making the surface well-scoped.

Completeness5/5

The tool set provides full coverage of clock management: settings, display, sound, notifications, custom apps, indicators, power, and navigation. No obvious gaps for common use cases.

Maintenance

ActivityInactive
ResponsivenessNo issues