๐ mcp-divoom-lan
mcp-divoom-lan is an open-source MCP server that wraps Divoom watchface LAN APIs as standard tools for AI clients.
It works together with the v2 HTML visual editor for modifying watchfaces, switching faces, adjusting brightness, and creating new local watchfaces.
v2 visual editor (public):
| Resource |
Link |
| GitHub |
https://github.com/DivoomDevelop/divoom-watchface-visual-editor_v2 |
| Live site |
https://divoomdevelop.github.io/divoom-watchface-visual-editor_v2/ |
๐ Local clone note
Your local clone path (e.g. D:\divoom-watchface-visual-editor) is machine-specific; use the v2 GitHub / GitHub Pages URLs above in docs and MCP metadata.
โจ Goals
- Expose key capabilities from
Divoom_Watchface_Remote_Customization_Guide_EN.md as MCP tools.
- Let MCP-enabled clients (Cursor, Claude Desktop, local LLMs, etc.) drive watchface actions via natural language.
- Preserve safety boundaries (read before write, explicit warnings for risky operations, multipart rules).
๐ก๏ธ Default Safety Policy (Important)
- Read before write: call
watchface_get_local, then watchface_patch_local, then read back to verify.
- If
GetLocalClockInfo returns an empty ItemList: stop writes; switch to an editable watchface first.
- Do not call
watchface_create_local_clock unless the user clearly asks to create a new one (no implicit creation).
๐งฐ Implemented Tools
| Tool |
Backing API / Endpoint |
Notes |
watchface_get_local |
Device/GetLocalClockInfo |
โ |
watchface_patch_local |
Device/PatchLocalClockInfo |
Default /divoom_api; optional dialAssetsPath switches to multipart POST /patch_local_clock (same dial/tar.gz rules as watchface_create_local_clock). |
watchface_get_fonts_local |
Device/GetLocalFontList |
โ |
watchface_get_store_market_list |
Device/GetStoreClockMarketList |
โ |
watchface_set_clock_select |
Channel/SetClockSelectId |
โ |
watchface_get_brightness |
Sys/GetBrightness |
โ |
watchface_set_brightness |
Channel/SetBrightness |
โ |
watchface_onoff_screen |
Channel/OnOffScreen |
1 = on, 0 = off. |
watchface_replace_dial_bg_file |
POST /replace_clock_dial_bg |
โ |
watchface_upload_file |
POST /upload |
โ |
watchface_create_local_clock |
POST /create_local_clock |
Multipart: single dial image or tar.gz; JSON DialAssets/UseDialAssetBundle selects mode, default auto-detect gzip. |
watchface_reset_local_then_cloud |
Device/ResetLocalClockFromServer |
โ |
watchface_get_screen_snapshot |
Device/GetScreenSnapshot |
Wait 2s, then GET /userdata/snapshot.webp for visual diff. |
watchface_raw_command |
Generic POST /divoom_api |
โ |
watchface_protocol_quick_reference |
โ |
Key protocol constraints for the model. |
๐ Resources (Context for the Model)
The server exposes two MCP resources:
divoom://guide/quick-reference
divoom://skill/watchface-customization
๐ฆ MCP Bundle (.mcpb)
For MCPB-compatible hosts (e.g. Claude desktop connectors, Smithery stdio releases), build a local bundle:
- Install the packer:
npm install -g @anthropic-ai/mcpb
- From this package root:
npm run mcpb:pack
- Output:
mcp-divoom-lan.mcpb (gitignored). The staging directory mcpb/staging/ is also gitignored.
The bundle includes dist/, resources/, production node_modules, and a manifest.json with user fields for device IP, port, and timeout.
๐ Quick Start
cd tools/mcp-divoom-lan
npm install
npm run build
npm start
Development (watch rebuild):
npm run dev
Pre-release check (typecheck, build, pack dry-run):
npm run release:check
๐ Documentation
| Document |
Description |
docs/README.md |
Documentation index |
docs/quick-start.md |
Minimal setup |
docs/tool-examples.md |
Tool usage examples (includes ยง5b analog pointer layout) |
docs/disp-usage.md |
Choosing disp ids (pointer layout 131/132/233; net-gallery uniqueness 13/125โ130/173โ175) |
docs/html-visual-editor.md |
Using the visual editor with MCP |
docs/safety-and-troubleshooting.md |
Safety and FAQs |
docs/reference/ |
Condensed protocol rules (EN/ZH) |
docs/examples/ |
Sample requests/responses and catalog |
โ๏ธ Environment Variables
| Variable |
Description |
Default |
DIVOOM_DEVICE_HOST |
Device LAN IP (e.g. 192.168.1.120) |
โ |
DIVOOM_DEVICE_PORT |
HTTP port |
9000 |
DIVOOM_TIMEOUT_MS |
Request timeout ms |
45000 |
โ ๏ธ Important Note
If DIVOOM_DEVICE_HOST is unset, each tool call must pass target.host.
๐งฉ Example Client Config (stdio)
Cursor / Claude Desktop
{
"mcpServers": {
"divoom-lan": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/to/tools/mcp-divoom-lan/dist/index.js"
],
"env": {
"DIVOOM_DEVICE_HOST": "192.168.1.120",
"DIVOOM_DEVICE_PORT": "9000",
"DIVOOM_TIMEOUT_MS": "45000"
}
}
}
}
You can also copy client-config.example.json in this directory as a starting point.
๐ค Publishing Checklist (for Maintainers)
- Use a dedicated repo (e.g.
mcp-divoom-lan) with this package at the repo root.
- Verify metadata:
LICENSE, SECURITY.md, CONTRIBUTING.md, CHANGELOG.md, RELEASE.md as applicable.
- Run
npm run release:check.
- Tag a GitHub release (e.g.
v0.1.2) with screenshots and sample requests if helpful.
- Submit listings where appropriate (MCP Registry, Smithery, Glama, MCP.so, community indexes).
- For Glama, follow
GLAMA_SUBMISSION_READY.md (includes Dockerfile and glama.json).
- For MCP.so, follow
MCP_SO_SUBMISSION_READY.md.
- For the Volcano Engine MCP list, see
VOLCENGINE_SUBMISSION_READY.md (PR: https://github.com/volcengine/mcp-server/pull/398).
- For Alibaba Cloud Bailian custom MCP (console npx deployment), see
BAILIAN_MCP_SUBMISSION_READY.md.
- For Coze plugin publishing/store (HTTP plugin, different from MCP), see
COZE_SUBMISSION_READY.md.
- Minimal demo flow:
watchface_get_local โ watchface_patch_local (font size/color) โ watchface_replace_dial_bg_file (background).
๐ Files Often Used at Release
Included in this repo (when present): LICENSE, CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, RELEASE.md, optional checklist and directory templates, and .github/workflows/ci.yml.
๐ค Should the HTML Visual Editor Ship Inside This npm Package?
Recommendation: no for the core MCP package โ keep MCP lean. Offer the editor as a separate optional project.
- Core:
https://github.com/DivoomDevelop/mcp-divoom-lan
- Visual editor v2:
https://github.com/DivoomDevelop/divoom-watchface-visual-editor_v2
- Hosted v2:
https://divoomdevelop.github.io/divoom-watchface-visual-editor_v2/
Benefits:
- Small MCP install suitable for all AI clients
- Non-developers can use the visual UI to understand
ItemList, then let the AI apply patches
- Clear split between WYSIWYG editing and automated MCP writes
๐ Alignment with Upstream Docs
This repo ships standalone docs under docs/, docs/reference/, and docs/examples/. If you maintain full guides elsewhere, keep this tree synced or treat it as the distribution subset.