Mcp Divoom TimeFrame Lan

by DivoomDevelop

353 downloads Not rated yet

About

mcp-divoom-lan is an open-source Model Context Protocol (MCP) server that exposes Divoom watchface customization over local LAN HTTP. AI assistants can read and patch the current on-device watchface JSON, manage fonts and store market lists, switch the active dial, adjust brightn

Explore

- Read and patch the current local watchface
- List local fonts and store/market dials
- Switch active dial and read/set brightness
- Multipart helpers for dial background replacement and file upload
- Exposes MCP resources with protocol and safety notes for agents

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp Divoom TimeFrame Lan
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Node.js 20+
- Network access to the Divoom device (same LAN as the HTTP API, commonly port 9000)

watchface_get_local

Call Device/GetLocalClockInfo for current or explicit clock id.

watchface_patch_local

Patch local dial via Device/PatchLocalClockInfo with precheck. Defaults to POST /divoom_api (JSON only) for pure metadata edits. Prefer ItemPatchList (per-index field diff) — DO NOT include item_id inside patch.* unless the user explicitly asks to rename a slot, since the firmware will overwrite the device-side item_id and break menu/config bindings. When dialAssetsPath is set, switches to multipart POST /patch_local_clock: first JSON part (Device/PatchLocalClockInfo, optional DialAssets), second part single JPEG/WebP dial backdrop or clock_bg.tar.gz bundle. Element slots inside the tarball must be JPEG, WebP, or PNG (validated by firmware wf_validate_bundle_slot_image_file). Use ItemPatchList[].patch.bundle_image=<leaf> to bind a tar leaf to that slot's img_addr; supplying ItemList alone is a full-table replace and should be avoided unless the row count actually changes. Multipart framing (Content-Length / boundary / manual construction): see watchface_upload_file description and resources/skill-quick-reference.md.

watchface_get_fonts_local

Call Device/GetLocalFontList.

watchface_get_store_market_list

Call Device/GetStoreClockMarketList after device prefetch has populated in-memory store data.

watchface_set_clock_select

Call Channel/SetClockSelectId with ClockId.

watchface_get_brightness

Call Sys/GetBrightness.

watchface_set_brightness

Call Channel/SetBrightness with Brightness.

watchface_onoff_screen

Call Channel/OnOffScreen with OnOff (1=on, 0=off).

watchface_replace_dial_bg_file

POST /replace_clock_dial_bg using multipart (Device/ReplaceClockDialBgFile). Replaces the cached dial bitmap only — does NOT modify cfg DeviceImageUrl, and does NOT accept tar.gz. Backdrop is validated by divoom_watchface_replace_clock_dial_bg_validate_saved_file: JPEG (FF D8) or WebP (RIFF…WEBP) only, ≤ 500 KiB (DIVOOM_REPLACE_DIAL_BG_MAX_FILE_BYTES), recommended 800x1280 portrait. Multipart framing notes: watchface_upload_file description.

watchface_upload_file

POST /upload with multipart. First JSON part is caller-provided metadata (product-specific Command). 传输文件打包要求:固件在 divoom_http_server_upload_get_file_info 中要求每个文件段必须有 Content-Length,而浏览器 FormData 通常只使用 boundary 分隔、不包含每段 Content-Length。正在实现固件在无 Content-Length 时用 boundary 终止解析,并修复 JSON 段之后定位文件数据的指针计算;编辑器侧改为手动构造带 Content-Length 的 multipart 以提高兼容性。This server builds multipart with per-part Content-Length.

watchface_create_local_clock

POST /create_local_clock (multipart) — Device/CreateLocalClock. metadata.DialAssets accepts 'auto' (default; sniffs gzip magic on the file part), 'image' (single JPEG/WebP backdrop), or 'bundle' (clock_bg.tar.gz). Legacy UseDialAssetBundle (0=image, non-0=bundle) is honored when DialAssets is omitted. Backdrop is JPEG/WebP only; element slots inside the tarball accept JPEG/WebP/PNG (firmware wf_validate_bundle_slot_image_file). Each ItemList[i] needs disp/font/x/y/w/h/size/alig numbers and color_1/color_2/item_id non-empty strings; ItemIdList must be a parallel non-empty string array. alig: 3=center, 4=left, 5=right. Multipart framing (Content-Length per part): see watchface_upload_file description.

watchface_reset_local_then_cloud

Call Device/ResetLocalClockFromServer. This deletes local sys-side files before optional cloud refresh.

watchface_raw_command

Raw POST /divoom_api command wrapper. Command is required; payload object is merged with enforced ReturnCode=0.

watchface_protocol_quick_reference

Return concise operational constraints extracted from the public guide and skill.

watchface_disp_catalog

Return the full `disp` id catalog (194 entries) that the firmware understands for `ItemList[i].disp` and `ItemPatchList[i].patch.disp`. Each entry includes English symbol, Chinese description, and heuristic hints (`likelyUsesRasterOrAssetLayer` for image/GIF slots; `oftenUsesVectorFontForText` for text slots). Use it together with `watchface_font_catalog`: text-leaning disps need a font id; raster-leaning disps need an `image_addr` asset.

watchface_font_catalog

Return a curated font catalog so agents can pick `ItemList[i].font` ids deterministically. Each entry includes id, type (1=TTF, 0=image-font), display name, original charset, derived script (digits / digits-extended / latin / cjk), style tags (sans/serif/pixel/digital/handwriting/display/decorative/bold/light/etc), and recommendedFor (scenario names like time_digits / temperature_digits / weather_text / user_text / lunar_text). The response also includes a `scenarios` map that lists which `disp` ids each scenario covers and which tags to prefer. Use the optional filters to narrow the result. Always cross-check with `watchface_get_fonts_local` before committing a font id to a real device, because the on-device font list may be a subset.

watchface_template_search

Search the curated template library (`divoom://templates/curated`): ~20 marketplace-derived watchface skeletons with tags such as weather, lunar_calendar, split_time_digits, pixel_theme, asset_heavy. Prefer cloning an existing ItemList layout before inventing raw coordinates. Filters support tagsAll/tagsAny, bucket, clockIds, item-count bounds, and dispPresent (template must include that disp id). Set includeWatchface=false for a compact summary without the full ItemList payload.

watchface_layout_suggest

Return layout hints for a single disp id by combining disp-catalog metadata with aggregated typography (median size/x/y/w/h, frequent colors, alignment mode) mined from bundled marketplace templates. Use before authoring a new ItemList row or ItemPatchList.patch fragment — values are soft guidance, not firmware-enforced. Always clamp boxes to the logical canvas (typically 800×1280).

- watchface_get_local: Call Device/GetLocalClockInfo for current or explicit clock id.
- watchface_patch_local: Patch local dial via Device/PatchLocalClockInfo with precheck. Defaults to POST /divoom_api (JSON only) for pure metadata edits. Prefer ItemPatchList (per-index field diff) — DO NOT include item_id inside patch.* unless the user explicitly asks to rename a slot, since the firmware will overwrite the device-side item_id and break menu/config bindings. When dialAssetsPath is set, switches to multipart POST /patch_local_clock: first JSON part (Device/PatchLocalClockInfo, optional DialAssets), second part single JPEG/WebP dial backdrop or clock_bg.tar.gz bundle. Element slots inside the tarball must be JPEG, WebP, or PNG (validated by firmware wf_validate_bundle_slot_image_file). Use ItemPatchList[].patch.bundle_image=<leaf> to bind a tar leaf to that slot's img_addr; supplying ItemList alone is a full-table replace and should be avoided unless the row count actually changes. Multipart framing (Content-Length / boundary / manual construction): see watchface_upload_file description and resources/skill-quick-reference.md.
- watchface_get_fonts_local: Call Device/GetLocalFontList.
- watchface_get_store_market_list: Call Device/GetStoreClockMarketList after device prefetch has populated in-memory store data.
- watchface_set_clock_select: Call Channel/SetClockSelectId with ClockId.
- watchface_get_brightness: Call Sys/GetBrightness.
- watchface_set_brightness: Call Channel/SetBrightness with Brightness.
- watchface_onoff_screen: Call Channel/OnOffScreen with OnOff (1=on, 0=off).
- watchface_replace_dial_bg_file: POST /replace_clock_dial_bg using multipart (Device/ReplaceClockDialBgFile). Replaces the cached dial bitmap only — does NOT modify cfg DeviceImageUrl, and does NOT accept tar.gz. Backdrop is validated by divoom_watchface_replace_clock_dial_bg_validate_saved_file: JPEG (FF D8) or WebP (RIFF…WEBP) only, ≤ 500 KiB (DIVOOM_REPLACE_DIAL_BG_MAX_FILE_BYTES), recommended 800x1280 portrait. Multipart framing notes: watchface_upload_file description.
- watchface_upload_file: POST /upload with multipart. First JSON part is caller-provided metadata (product-specific Command). 传输文件打包要求:固件在 divoom_http_server_upload_get_file_info 中要求每个文件段必须有 Content-Length,而浏览器 FormData 通常只使用 boundary 分隔、不包含每段 Content-Length。正在实现固件在无 Content-Length 时用 boundary 终止解析,并修复 JSON 段之后定位文件数据的指针计算;编辑器侧改为手动构造带 Content-Length 的 multipart 以提高兼容性。This server builds multipart with per-part Content-Length.
- watchface_create_local_clock: POST /create_local_clock (multipart) — Device/CreateLocalClock. metadata.DialAssets accepts 'auto' (default; sniffs gzip magic on the file part), 'image' (single JPEG/WebP backdrop), or 'bundle' (clock_bg.tar.gz). Legacy UseDialAssetBundle (0=image, non-0=bundle) is honored when DialAssets is omitted. Backdrop is JPEG/WebP only; element slots inside the tarball accept JPEG/WebP/PNG (firmware wf_validate_bundle_slot_image_file). Each ItemList[i] needs disp/font/x/y/w/h/size/alig numbers and color_1/color_2/item_id non-empty strings; ItemIdList must be a parallel non-empty string array. alig: 3=center, 4=left, 5=right. Multipart framing (Content-Length per part): see watchface_upload_file description.
- watchface_reset_local_then_cloud: Call Device/ResetLocalClockFromServer. This deletes local sys-side files before optional cloud refresh.
- watchface_raw_command: Raw POST /divoom_api command wrapper. Command is required; payload object is merged with enforced ReturnCode=0.
- watchface_protocol_quick_reference: Return concise operational constraints extracted from the public guide and skill.
- watchface_disp_catalog: Return the full disp id catalog (194 entries) that the firmware understands for ItemList[i].disp and ItemPatchList[i].patch.disp. Each entry includes English symbol, Chinese description, and heuristic hints (likelyUsesRasterOrAssetLayer for image/GIF slots; oftenUsesVectorFontForText for text slots). Use it together with watchface_font_catalog: text-leaning disps need a font id; raster-leaning disps need an image_addr asset.
- watchface_font_catalog: Return a curated font catalog so agents can pick ItemList[i].font ids deterministically. Each entry includes id, type (1=TTF, 0=image-font), display name, original charset, derived script (digits / digits-extended / latin / cjk), style tags (sans/serif/pixel/digital/handwriting/display/decorative/bold/light/etc), and recommendedFor (scenario names like time_digits / temperature_digits / weather_text / user_text / lunar_text). The response also includes a scenarios map that lists which disp ids each scenario covers and which tags to prefer. Use the optional filters to narrow the result. Always cross-check with watchface_get_fonts_local before committing a font id to a real device, because the on-device font list may be a subset.
- watchface_template_search: Search the curated template library (divoom://templates/curated): ~20 marketplace-derived watchface skeletons with tags such as weather, lunar_calendar, split_time_digits, pixel_theme, asset_heavy. Prefer cloning an existing ItemList layout before inventing raw coordinates. Filters support tagsAll/tagsAny, bucket, clockIds, item-count bounds, and dispPresent (template must include that disp id). Set includeWatchface=false for a compact summary without the full ItemList payload.
- watchface_layout_suggest: Return layout hints for a single disp id by combining disp-catalog metadata with aggregated typography (median size/x/y/w/h, frequent colors, alignment mode) mined from bundled marketplace templates. Use before authoring a new ItemList row or ItemPatchList.patch fragment — values are soft guidance, not firmware-enforced. Always clamp boxes to the logical canvas (typically 800×1280).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp divoom timeframe lan": {
            "divoom-lan": {
                "command": "npx",
                "args": [
                    "-y",
                    "mcp-divoom-lan"
                ],
                "env": {
                    "DIVOOM_DEVICE_HOST": "192.168.1.120",
                    "DIVOOM_DEVICE_PORT": "9000",
                    "DIVOOM_TIMEOUT_MS": "45000"
                }
            }
        }
    }
}

McpServers

{
    "divoom-lan": {
        "command": "npx",
        "args": [
            "-y",
            "mcp-divoom-lan"
        ],
        "env": {
            "DIVOOM_DEVICE_HOST": "192.168.1.120",
            "DIVOOM_DEVICE_PORT": "9000",
            "DIVOOM_TIMEOUT_MS": "45000"
        }
    }
}

mcp-divoom-lan

Open-source Model Context Protocol (MCP) server for Divoom watchface customization over local LAN HTTP. Use it from Cursor, Claude Desktop, or any MCP-compatible client to drive on-device watchface workflows in natural language.

What it does

- Read and patch the current local watchface (GetLocalClockInfo / PatchLocalClockInfo) - List local fonts and store / market dials - Switch active dial and read/set brightness - Multipart helpers for dial background replacement, file upload, and creating a local clock - Exposes MCP resources with concise protocol / safety notes for agents

Requirements

- Node.js 20+ - Network access to the Divoom device (same LAN as the HTTP API, commonly port 9000)

Configuration

Set environment variables (or pass target per tool call): | Variable | Role | |----------|------| | DIVOOM_DEVICE_HOST | Device IP on LAN (recommended) | | DIVOOM_DEVICE_PORT | HTTP port (default 9000) | | DIVOOM_TIMEOUT_MS | Timeout ms (default 45000) |

Safety

- Prefer read → patch → read back before trusting changes. - Some operations (e.g. reset from cloud) can be destructive; confirm with the user first.

Links

- Repository: https://github.com/DivoomDevelop/mcp-divoom-lan - npm: mcp-divoom-lan - Security: see SECURITY.md in the repo (report to [email protected])

License

MIT
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.