Labsco
cyanheads logo

pixoo-mcp-server

โ˜… 4

from cyanheads

Divoom Pixoo LED control

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

@cyanheads/pixoo-mcp-server

Render and push styled pixel art, text, dashboards, and animations to Divoom Pixoo LED displays on your local network via MCP. STDIO or Streamable HTTP.

7 Tools โ€ข 4 Resources

Install in Claude Desktop Install in Cursor Install in VS Code


Tools

Seven tools covering the full display pipeline โ€” from quick styled text to full layered scene composition, device control, and initial setup:

ToolDescription
pixoo_display_textRender styled text (theme, gradient, shadow, outline, auto-fit) onto the display and push it. Returns the rendered frame as an image.
pixoo_compose_sceneCompose a full scene: layered elements (text, icons, widgets, shapes, bitmaps, images, sprites) with per-element effects and keyframes, static or animated. Returns the rendered scene as an image.
pixoo_push_imageLoad an image (absolute local path or https URL), resize it to the LED grid, and push it. Returns the downsampled result as an image.
pixoo_overlay_textSet or clear a device-native scrolling text overlay. Uses device-rendered fonts; overlays persist across channel switches until cleared.
pixoo_control_deviceRead or change device state: brightness, screen on/off, channel, or clock face. Call with no params for a status read.
pixoo_discover_devicesFind Pixoo devices on the local network via Divoom's cloud discovery endpoint. Run once during setup to find device IPs.
pixoo_design_briefReturn craft guidance and live device context for a design topic. Covers legibility rules, palette discipline, layout zones, animation budget, and pre-filled next-tool suggestions.

pixoo_display_text

The primary tool for text-only display. Covers the 80% case โ€” styled text with quality defaults.

  • Named scene themes set background gradient and text palette in one parameter (midnight, ember, claude, ice, neon, forest, mono)
  • Style block: gradient palette ramps (ember, ice, neon, fire, lavender, claude, mono), drop shadow, 1px outline for legibility, integer scale multiplier for block-letter weight
  • Semantic positioning: x: "center", y: "bottom" โ€” no manual pixel math
  • Auto-fit overflow: tries 5ร—7 โ†’ 3ร—5 โ†’ scroll; every fit decision reported in layout[]
  • Returns the rendered frame as an image content block so you see it immediately
  • Optional brightness convenience parameter applied before push

pixoo_compose_scene

Full scene composition with the complete element vocabulary.

  • Layered elements rendered back-to-front: text, icon, rect, circle, line, progress, sparkline, bitmap, pixels, image, sprite
  • Named icons from the built-in registry (weather, arrows, status, media) or custom SVG path
  • Dashboard widgets: progress bar with gradient fill and optional label; sparkline mini chart (line or bar, auto-scaled)
  • Animation: named effect presets (float, scroll-left, scroll-right, pulse, blink, twinkle, drift, fade-in, fade-out) or raw keyframe arrays โ€” 1โ€“40 frames, configurable speed
  • Per-element opacity and visible flag; images at https URLs fetched server-side to a temp file
  • Returns a preview image (static: PNG; animated: labeled contact-sheet PNG + GIF saved to disk)

pixoo_push_image

Push any image to the display with control over the downsampling.

  • Accepts absolute local paths and https URLs
  • Three fit modes: contain (letterbox), cover (crop to fill), fill (stretch)
  • Three resize kernels: nearest for pixel art, lanczos3 for photos, mitchell for a balance
  • Returns the exact 64ร—64 result as an image block โ€” you see what the display received

pixoo_overlay_text

Device-native scrolling text overlay โ€” persists across channel switches.

  • 115 device-rendered font IDs (0โ€“114)
  • Up to 20 independent overlay slots (IDs 0โ€“19)
  • Configurable scroll direction, speed, and alignment
  • Clears with mode: "clear" โ€” overlays survive channel changes until explicitly removed
  • Not previewable (device-rendered); for styled previewable text use pixoo_display_text

pixoo_design_brief

The orientation tool. Run before authoring any scene to get grounded in 64px craft constraints.

  • Six topics: text, scene, dashboard, animation, pixel-art, troubleshooting
  • Returns legibility floors, palette discipline, layout zones, animation budgets, and common pitfalls
  • Merges live device state (reachable, channel, brightness, screen) into the response
  • Pre-filled nextToolSuggestions with ready-to-use arguments based on current device state

Resources

TypeNameDescription
Resourcepixoo://device/statusLive snapshot of the connected Pixoo display: reachable, channel, brightness, screen state, and display size
Resourcepixoo://reference/themesTheme and palette registry with background gradients, default text palettes, accent colors, and swatch values
Resourcepixoo://reference/iconsBuilt-in icon names organized by category (weather, arrows, status, media)
Resourcepixoo://reference/design-guideLong-form 64px craft guide: legibility floors, palette discipline, layout zones, animation budget, and known device behaviors

All resource data is also reachable via tools. pixoo_design_brief surfaces the design guide content per topic; pixoo_control_device returns live device state equivalent to pixoo://device/status.

Features

Built on @cyanheads/mcp-ts-core:

  • Declarative tool and resource definitions โ€” single file per primitive, framework handles registration and validation
  • Unified error handling โ€” handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

Pixoo-specific:

  • Requires a Divoom Pixoo LED matrix display on the local network; primary target is the Pixoo-64 (16 and 32 also supported)
  • All composition happens in an RGBA canvas pipeline on the host (@cyanheads/pixoo-toolkit) โ€” the device receives final RGB frames, never raw drawing commands
  • Styled text engine: gradient palette ramps, drop shadows, outlines, integer scale, semantic alignment โ€” no manual pixel math or bitmap letterforms required
  • Push pacing: device commands serialized with a configurable minimum inter-push interval (default 1000ms) to prevent device freezes
  • Every PixooResult checked โ€” pushed: true means the device acknowledged with error_code: 0, never "I tried"
  • Animation capped at 40 frames (device instability beyond this); contact-sheet PNG preview for animations (GIF inconsistent across MCP clients)
  • Local transports only โ€” sharp image processing doesn't run on Cloudflare Workers

Agent-friendly output:

  • Preview-as-content: render tools return the upscaled (8ร—, 512px) output as an image content block โ€” the calling model sees exactly what was drawn, before and after push
  • Layout transparency: every silent renderer decision (font fallback, truncation, scroll engaged, element clipped) reported in layout[] so agents can inspect and refine
  • Device truth: pushed reflects the device ACK; deviceState post-push flags visibility issues (screen off, brightness โ‰ค 10, wrong channel) as enrichment notices rather than failures
  • Graceful degradation: render succeeds and returns the preview even when the device is unreachable โ€” the agent keeps its work

Project structure

PathPurpose
src/index.tscreateApp() entry point โ€” registers tools/resources and initializes the Pixoo service.
src/config/Server-specific environment variable parsing and validation with Zod.
src/mcp-server/tools/Tool definitions (*.tool.ts).
src/mcp-server/resources/Resource definitions (*.resource.ts).
src/services/pixoo/PixooService โ€” wraps @cyanheads/pixoo-toolkit, handles pacing, result mapping, and device state.
src/renderer/Pure rendering pipeline: element renderers, styled-text engine, themes, icons, effect compiler, preview encoding. No device dependency.
tests/Unit and integration tests mirroring src/.

Development guide

See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches โ€” no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • The renderer (src/renderer/) is pure โ€” no device dependency, testable without hardware
  • All device calls go through PixooService; every PixooResult is checked