mcp-server-awtrix
MCP Server Awtrix: Ulanzi & Pixel Clock向けAIエージェント表示オーケストレーター
MCP Server Awtrix(mcp-server-awtrix)は、オープンソースのModel Context Protocol (MCP)サーバーであり、宣言型メトリクスオーケストレーターです。AIエージェント(Antigravity、Claude Desktop、Cursor、Cline、AutoGPTなど)に、Awtrix Lightを搭載したUlanzi TC001および互換ピクセルマトリクススマートクロックの完全な制御を提供することを目的としています。
会話型・自律型AIエージェントと物理デスクトップディスプレイを橋渡しし、以下を実現します:
即時エージェントアラート: アドホックなステータスアラート、ビルド失敗通知、タスク完了をピクセル画面にプッシュします。
動的カルーセルアプリ: カスタムライブテレメトリアプリ(サーバーヘルス、SaaSメトリクス、収益カウンター、ビルドステータス)を登録・更新・循環表示します。
宣言的メトリクスポーラー: 専用のPythonスクリプトを書かずに、YAML仕様によるバックグラウンドAPI取得としきい値フォーマットを自動化します。
ハードウェアテレメトリと制御: バッテリーレベルの確認、マトリクス輝度の調整、電源状態の管理、カスタムサウンドキューのトリガー。
目次
Related MCP server: pixoo-mcp-server
1. 製品要件定義書(PRD)
問題点
スマートピクセルクロック(Awtrix Lightを搭載したUlanzi TC001など)を実行している開発者やパワーユーザーは、現在、外部APIをクエリしてマトリクスアプリを更新するために、断片的でハードコードされたPythonまたはBashのcronスクリプトを書いています。
AIコーディングエージェントを扱う場合:
エージェントは、すべてのメトリックに対して生の命令コードを生成し、維持する必要があります。
AIエージェントがリアルタイム通知を送信したり、ディスプレイのライフサイクルを管理したりするための標準化されたツールセットがありません。
シークレット管理はエラーが発生しやすく、AIプロンプトやログでのAPIキー漏洩のリスクがあります。
マルチセグメントテキストフォーマットとピクセルアイコンのためのネイティブなフォールバックや検証はありません。
目標と非目標
目標
ネイティブMCPインターフェース: 通知、カスタムアプリ、デバイス管理、プレビューのための堅牢なツールを公開する標準Model Context Protocolサーバーを提供します。
宣言的テレメトリ: エージェントと人間が、組み込みのテンプレート(Jinja2)としきい値スタイリングを使用して、シンプルなYAMLファイルでメトリックポーリングルールを定義できるようにします。
安全なシークレット分離:
.env環境変数置換を使用して、機密の認証情報をプロンプトコンテキストから分離します。ゼロダウンタイムのホットリロード: サービスを再起動せずに、YAML設定ファイルの変更を自動的に反映します。
信頼性の高いフォールバック: ネットワーク障害、APIレート制限、オフライン表示状態を適切に処理します。
非目標
Awtrix Lightファームウェアの置き換え(このツールは公式のAwtrix Light REST/MQTT APIとのみ連携します)。
複雑なマルチモニタータイル同期(焦点は単一またはマルチインスタンスのスタンドアロンピクセルクロックにあります)。
対象ペルソナと使用ケース
ペルソナ | シナリオ | MCP Server Awtrixがどのように役立つか |
AIコーディングエージェント(例:Antigravity / Cursor) | エージェントが10分間のテストスイートまたは自律タスクをバックグラウンドで完了します。 |
|
DevOps / SREエンジニア | 本番稼働時間、エラーバジェット、またはChecklyの合成テストを監視したい。 |
|
SaaSファウンダー / ビルダー | リアルタイムのMRR、新規ユーザーサインアップ、サポートチケットカウンターをデスクで循環させたい。 | バックエンド管理エンドポイントをクエリする宣言型マルチメトリックアプリを定義します。 |
機能要件
FR-1: 即時通知(
/api/notify):カスタムテキスト、マルチセグメントカラーテキスト、アイコンID、サウンド/RTTTL着信音、優先度ホールド、持続時間をサポートします。
FR-2: カスタムカルーセルアプリ(
/api/custom):ディスプレイループへの名前付きアプリの登録、更新、削除機能。
リッチテキストセグメントフォーマット(
[{"t": "FAIL", "c": "FF0000"}, {"t": " (2/10)", "c": "FFFFFF"}])をサポートします。
FR-3: 宣言型バックグラウンドエンジン:
apps/*.yamlで定義されたポーリングジョブを実行する組み込みスケジューラー(asyncio/apscheduler)。計算変数、算術演算、条件式をサポートするテンプレートエンジン。
FR-4: デバイス状態とテレメトリ:
バッテリー残量、Wi-Fi RSSI、照度センサー、マトリクス状態、アクティブなアプリをクエリします。
輝度、スリープ/ウェイク状態、トランジションを調整します。
FR-5: ドライランとシミュレーション:
ハードウェア送信前に、正確なレンダリング済みJSONペイロードとカラー検証を返すプレビューツール。
非機能要件
レイテンシ: 直接MCPツール実行は、ローカルネットワーク上で$< 150\text{ms}$以内にAwtrixにディスパッチする必要があります。
耐障害性: オーケストレーターは、アプリを劣化としてマークする前に、指数バックオフで失敗したAPIフェッチを再試行します。
ポータビリティ: 標準Pythonパッケージとしてパッケージ化され、
uv/pipxサポート、Dockerコンテナ、スタンドアロンCLIを備えています。
2. システムアーキテクチャと設計
高レベルアーキテクチャ
┌──────────────────────────┐
│ AI Client/Host │
│ (Claude / Antigravity / │
│ Cursor / Cline) │
└────────────┬─────────────┘
│
│ stdio / SSE (MCP Protocol)
▼
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ mcp-server-awtrix │
│ │
│ ┌───────────────────────┐ ┌──────────────────────────────┐ ┌───────────────────┐ │
│ │ MCP Interface │ │ App Orchestrator │ │ Config Watcher │ │
│ │ (Tools / Resources) │ │ (Async Scheduler) │ │ (Hot-Reload) │ │
│ └───────────┬───────────┘ └──────────────┬───────────────┘ └─────────┬─────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────────────────────────────────┐ │
│ │ Core Engine & Driver │ │
│ │ - Schema Validator (Pydantic) │ │
│ │ - Template & Expression Engine (Jinja2 / JSONPath) │ │
│ │ - Secret Resolver (.env) │ │
│ │ - Awtrix REST / WebSocket Client │ │
│ └──────────────────────────────────────────┬───────────────────────────────────────┘ │
└─────────────────────────────────────────────┼──────────────────────────────────────────┘
│
│ HTTP REST (JSON)
▼
┌──────────────────────────┐
│ Ulanzi TC001 Clock │
│ (Awtrix Light Firmware)│
└──────────────────────────┘コンポーネント構成
MCPインターフェースレイヤー:
stdioおよびSSEを介してModel Context Protocolサーバーエンドポイントを実装します。厳密なJSONスキーマとAIモデル向けの人間が読めるドキュメントを備えたツールを公開します。
宣言型ポーリングエンジン:
ファイルベースのアプリマニフェストのタスクライフサイクルを管理する非同期ワーカー。
HTTPリクエストを評価し、JSONPath/式を使用してフィールドを抽出し、表示ルールを解決します。
Awtrixドライバー:
デバイス通信、リクエスト重複排除、接続プーリング、エラーリカバリをカプセル化します。
設定とセキュリティレイヤー:
機密トークンを
.envに分離します。設定ファイルは${VAR_NAME}構文で変数を参照します。
3. MCPツール仕様
AIエージェントは以下のMCPツールを実行できます:
awtrix_notify
現在のカルーセルを中断して、即時の高優先度通知を画面にプッシュします。
{
"text": "Build Failed: Backend API",
"icon": "10558",
"color": "FF0000",
"duration": 8,
"sound": "alarm",
"rtttl": "beep:d=4,o=5,b=100:16e6,16e6",
"wakeup": true
}awtrix_upsert_app
カルーセルループ内の永続的なカスタムアプリを登録または更新します。
{
"name": "app_users",
"text": [
{"t": "1,420", "c": "FFFFFF"},
{"t": " (+42)", "c": "00FF00"}
],
"icon": "2058",
"duration": 5,
"lifetime": 300
}awtrix_delete_app
デバイスサイクルからカスタムアプリを削除します。
{
"name": "app_users"
}awtrix_get_device_state
ハードウェア統計と現在の運用メトリクスを返します。
応答:
{
"online": true,
"battery": 88,
"charging": true,
"lux": 140,
"temp": 24,
"ram_free": 128440,
"active_app": "app_users",
"brightness": 120
}awtrix_set_settings
輝度、マトリクスオン/オフ、トランジション速度などのデバイスパラメータを設定します。
{
"brightness": 80,
"power": true
}awtrix_test_render
式を解析し、ハードウェアにプッシュせずにレンダリングされたペイロードを返すドライラン用ヘルパー。
4. 宣言型アプリエンジン(YAMLスキーマ)
カスタムPythonスクリプトを維持する代わりに、apps/ディレクトリに.yamlマニフェストを配置します。
例1: サービスヘルス(Checkly)
apps/checkly.yaml
app_id: "checkly"
name: "checkly_status"
enabled: true
interval_seconds: 60
source:
type: "http"
url: "https://api.checklyhq.com/v1/checks"
headers:
Authorization: "Bearer ${CHECKLY_API_KEY}"
X-Checkly-Account: "${CHECKLY_ACCOUNT_ID}"
transform:
total: "len(data)"
failures: "sum(1 for c in data if c.get('hasFailures'))"
degraded: "sum(1 for c in data if c.get('isDegraded') and not c.get('hasFailures'))"
display:
- condition: "failures > 0"
icon: "10558"
notify: true
text:
- { text: "FAIL ", color: "FF0000" }
- { text: "({{failures}}/{{total}})", color: "FFFFFF" }
- condition: "degraded > 0"
icon: "10558"
text:
- { text: "WARN ", color: "FFA500" }
- { text: "({{degraded}}/{{total}})", color: "FFFFFF" }
- condition: "default"
icon: "483"
text:
- { text: "UP ", color: "00FF00" }
- { text: "({{total}})", color: "FFFFFF" }例2: マルチメトリックSaaSダッシュボード
apps/saas_metrics.yaml
app_id: "saas_metrics"
interval_seconds: 120
source:
type: "http"
url: "https://api.example.com/v1/admin/metrics"
headers:
X-API-Secret: "${SAAS_METRICS_API_SECRET}"
sub_apps:
- name: "app_users"
icon: "2058"
text:
- { text: "{{data.users_total}}", color: "FFFFFF" }
- { text: " (+{{data.new_users_last_week}})", color: "00FF00" }
- name: "app_premium"
icon: "5336"
text:
- { text: "{{data.users_premium}}", color: "FFFFFF" }
- { text: " (+{{data.new_users_premium_last_week}})", color: "FFD700" }
- name: "app_orders"
icon: "21072"
text:
- { text: "{{data.orders_total}}", color: "FFFFFF" }
- { text: " (+{{data.new_orders_last_week}})", color: "00FF00" }
- name: "app_support"
icon: "10558"
show_if: "data.tickets_open > 0"
text:
- { text: "{{data.tickets_open}}", color: "FF0000" }5. クイックスタートとインストール
前提条件
Python 3.10以上
Awtrix Light FirmwareがフラッシュされたUlanzi TC001(または互換デバイス)がWi-Fiネットワークに接続されていること。
uv / pipによるローカルセットアップ
# Clone the repository
git clone https://github.com/klodnickik/mcp-server-awtrix.git
cd mcp-server-awtrix
# Copy example environment configuration
cp .env.example .env
# Edit device address and API keys in .env
# AWTRIX_BASE_URL=http://awtrix3.localstdio上でMCPサーバーをローカルで実行します:
# Using uv (recommended)
uv run mcp-server-awtrix
# Or standard pip
pip install -e .
python -m awtrix_mcpDocker & Docker Composeセットアップ
Docker Composeを使用して実行します:
# 1. Clone & prepare environment
git clone https://github.com/klodnickik/mcp-server-awtrix.git
cd mcp-server-awtrix
cp .env.example .env
# 2. Start the MCP Server (SSE on port 8000) and Metric Daemon
docker compose up -d
# Or start only the metric poller daemon:
docker compose up -d metric-daemon
# View live logs:
docker compose logs -fMCPクライアント設定
1. Google Antigravity
mcp_servers.jsonに追加します:
{
"mcpServers": {
"awtrix": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-server-awtrix", "run", "mcp-server-awtrix"],
"env": {
"AWTRIX_BASE_URL": "http://awtrix3.local"
}
}
}
}2. Claude Desktop
claude_desktop_config.jsonに追加します:
{
"mcpServers": {
"awtrix": {
"command": "python",
"args": ["-m", "awtrix_mcp"],
"env": {
"AWTRIX_BASE_URL": "http://awtrix3.local"
}
}
}
}3. Cursor
Cursor設定 $\rightarrow$ 機能 $\rightarrow$ MCPサーバー $\rightarrow$ サーバーを追加:
名前:
awtrixタイプ:
commandコマンド:
uv --directory /path/to/mcp-server-awtrix run mcp-server-awtrix
6. ロードマップとコントリビューション
コアMCPツール仕様と設計
宣言型YAMLオーケストレーションスキーマ
非同期HTTPクライアントを備えたFastMCP実装
マトリクスピクセルアート用のライブビジュアルWebプレビュー
MQTTトランスポートレイヤーサポート(RESTの代替オプション)
Home Assistantサービスディスカバリーエクスポート
コントリビューションを歓迎します!機能ディスカッションのためのPRを提出するか、イシューを開いてください。
7. ライセンス
MITライセンスの下で配布されています。詳細についてはLICENSEを参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control and monitor Home Assistant smart home devices through natural language interactions. Supports device control, entity state monitoring, history access, and automation generation with both MCP protocol and standalone HTTP REST API modes.1MIT
- AlicenseAqualityAmaintenanceEnables programmatic control of Divoom Pixoo LED matrices to display layered pixel art, animations, and hardware-rendered scrolling text. Users can compose complex visual scenes, push images, and manage device settings like brightness and channels through an LLM.7576Apache 2.0
- AlicenseAqualityDmaintenanceEnables registration, monitoring, and control of IoT devices via AI agents, with local storage and no cloud API key required.9MIT
- AlicenseAqualityCmaintenanceMCP server and CLI for controlling Ulanzi TC001 Smart Pixel Clock via AWTRIX3 HTTP API. Enables power, brightness, notifications, and more from AI assistants.202MIT
Related MCP Connectors
A real clock for AI agents: current time, timezone conversion, and DST facts from the IANA tzdb.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Wall-clock awareness for LLM agents. Two tools: elapsed-time-between-turns + day rollover detection.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/klodnickik/mcp-server-awtrix'
If you have feedback or need assistance with the MCP directory API, please join our Discord server