pixelblaze
Enables Claude to create, update, and manage LED patterns on a PixelBlaze controller, including setting brightness and reading device info, through a set of tools that interact with the device's API.
README
PixelBlaze AI
Create and iterate on LED patterns for a PixelBlaze controller using Claude Code. An MCP server connects Claude directly to your PixelBlaze so it can create, update, and manage patterns on the device.
The included patterns and design guidance (CLAUDE.md) are built for a 2D grid mapped as rows and columns — specifically an edge-lit acrylic depth display where each row is a separate physical layer. The Y axis represents discrete layers (not a smooth gradient), so patterns are designed to create strong visual contrast and coordinated animation across layers while running smooth effects within each layer.
This approach works well for any 2D PixelBlaze setup where one axis has significantly fewer pixels than the other (e.g. 8 rows x 32 columns), and where per-row visual differentiation matters more than smooth vertical blending.
Note: This project assumes the PixelBlaze's Mapper has already been configured correctly for your hardware. The mapper defines the 2D pixel map that tells PixelBlaze which physical LED corresponds to which (x, y) coordinate — patterns depend on this being set up before they can work properly.
Adapting for your hardware
The patterns auto-detect the grid dimensions at startup using mapPixels(), so they adapt to different sizes without code changes. To adapt the design guidance for a different display:
- Edit
CLAUDE.mdto describe your hardware — pixel layout, how light works physically, what effects look good and which don't - Update the pixel map on your PixelBlaze to match your physical layout
- Ask Claude to help you adapt — for example:
"I have a 16x16 LED matrix mounted flat on a wall. Both axes have equal resolution and smooth blending. Update CLAUDE.md to reflect this — we don't need to treat Y as discrete layers, and effects should work as true 2D patterns."
"I have a cylindrical display with 12 rings of 30 LEDs each. X wraps around the cylinder and Y is the vertical axis. Update CLAUDE.md so patterns account for the X-axis wrapping and create effects that look good on a cylinder."
What's in the box
src/pixelblaze_mcp/-- MCP server that exposes PixelBlaze controls (create/update/delete patterns, set brightness, read device info, etc.)docs/pixelblaze/-- Cached PixelBlaze language reference, available to Claude via thedocs_get_api_referencetoolpatterns/-- Pattern JS files with documentation headers, tracked in gitCLAUDE.md-- Project instructions that Claude reads automatically (hardware context, design principles, coding conventions, pattern templates)
Setup
Prerequisites
- PixelBlaze on your local network
- Claude Code CLI installed
- uv (Python package manager)
- Python 3.11+
1. Clone and install dependencies
git clone <repo-url>
cd pixelblaze-ai
uv sync
2. Create the MCP config
Create .mcp.json in the project root (this file is gitignored). This tells Claude Code how to connect to your PixelBlaze:
{
"mcpServers": {
"pixelblaze": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/path/to/pixelblaze-ai",
"run",
"python",
"-m",
"pixelblaze_mcp.server"
],
"env": {
"PIXELBLAZE_HOST": "192.168.2.97"
}
}
}
}
Replace /path/to/pixelblaze-ai with the absolute path to this directory, and 192.168.2.97 with your PixelBlaze's IP.
3. Start Claude Code
cd pixelblaze-ai
claude
Claude will automatically pick up CLAUDE.md for project context and .mcp.json for the PixelBlaze connection.
Usage
Once Claude Code is running, you can ask it to create and modify patterns conversationally. Claude has access to the PixelBlaze API reference and can deploy patterns directly to the device.
Sample prompts
Creating patterns:
- "Create a new pattern that looks like rain falling through the layers"
- "Make a bouncing ball effect with configurable speed and size"
- "Create an aurora effect using Perlin noise"
Modifying patterns:
- "The heartbeat effect has too much dark time between beats, make it faster"
- "Make the fire pattern symmetric -- both edges should be white-hot"
- "Add more randomization to the comet so it doesn't repeat the same path"
Adjusting parameters:
- "Increase the brightness of the fireflies effect"
- "The aurora layers look too similar -- add more color contrast between them"
- "Make the glitch effect more chaotic with panel blackouts and freezes"
Working with the display:
- "List all patterns on the device"
- "Switch to the plasma pattern"
- "Set the display brightness to 50%"
Available MCP tools
Claude has access to these PixelBlaze tools:
| Tool | Description |
|---|---|
pixelblaze_create_pattern |
Create and activate a new pattern |
pixelblaze_update_pattern |
Update an existing pattern's code |
pixelblaze_delete_pattern |
Remove a pattern from the device |
pixelblaze_list_patterns |
List all patterns on the device |
pixelblaze_set_active_pattern |
Switch to a specific pattern |
pixelblaze_get_active_pattern |
See which pattern is running |
pixelblaze_get_pattern_code |
Read a pattern's source code |
pixelblaze_set_brightness |
Set display brightness (0-1) |
pixelblaze_get_controls |
Read current slider/control values |
pixelblaze_set_control |
Set a slider/control value |
pixelblaze_get_device_info |
Get device status and config |
docs_get_api_reference |
Get the PixelBlaze language reference |
Project structure
pixelblaze-ai/
.mcp.json # MCP server config (gitignored)
CLAUDE.md # Project instructions for Claude
pyproject.toml # Python project config
src/pixelblaze_mcp/ # MCP server source
docs/pixelblaze/ # Cached API reference
patterns/ # Pattern JS files (deployed to device)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。