perlerbeadai-mcp
Fuse bead MCP: convert images, generate AI art, matchcolors (CIEDE2000) estimate bead costs.
README
PerlerBeadAI MCP Server
Model Context Protocol server for fuse bead pattern tools — let AI clients (Claude Code, Cursor, Claude Desktop, Codex, etc.) convert images into bead patterns, generate AI pattern art, look up bead colors, match colors across brands, and estimate bead costs.
Server URL: https://perlerbeadai.com/wp-json/pba/v1/mcp
Transport: Streamable HTTP (JSON-RPC 2.0)
Auth: Bearer token (free account required)
Tools
| Tool | Description | Rate Limit |
|---|---|---|
pba_convert |
Convert an image (URL or base64) into a bead pattern — color-quantized grid, per-color bead counts, rendered chart PNG. Supports 4 brands (Perler, Hama, Artkal-S, Artkal-C), boards 2–120 beads. | 30/min per key |
pba_generate |
Generate bead-pattern-style art from a text prompt (gpt-image-2, ~1–4 min). Two-step: submit with prompt → poll with job_id every ~15s. Result opens directly in the AI editor. Uses your account quota (3 free/day + credits). |
1/15s per key |
pba_color_chart |
Full color chart for a brand — Perler (103), Hama (92), Artkal-S (199), Artkal-C (174). Each entry: code, name, hex. | 60/min per key |
pba_convert_color |
Find nearest bead colors across brands for a brand+code or any hex, using CIEDE2000 (ΔE grades: excellent <2, good <4, approximate <7, poor ≥7). | 60/min per key |
pba_estimate_cost |
Turn per-color bead counts (e.g. from pba_convert) into bag counts and reference cost estimates. |
60/min per key |
Quick Start
1. Get an API key
Register a free account at perlerbeadai.com (5 bonus credits included), then open your account page → API Keys & MCP card and click Create key. Copy the key (pba_uk_…) — it's shown only once.
2. Add to your AI client
Claude Code:
claude mcp add --transport http perlerbeadai \
https://perlerbeadai.com/wp-json/pba/v1/mcp \
--header "Authorization: Bearer pba_uk_…"
Cursor / Claude Desktop:
{
"mcpServers": {
"perlerbeadai": {
"url": "https://perlerbeadai.com/wp-json/pba/v1/mcp",
"headers": {
"Authorization": "Bearer pba_uk_…"
}
}
}
}
Cursor: Settings → MCP → Add server. Claude Desktop: claude_desktop_config.json. Restart after saving.
Codex (OpenAI CLI):
[mcp_servers.perlerbeadai]
url = "https://perlerbeadai.com/wp-json/pba/v1/mcp"
http_headers = { "Authorization" = "Bearer pba_uk_…" }
Example Usage
Convert an image to a bead pattern
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "pba_convert",
"arguments": {
"imageUrl": "https://example.com/photo.jpg",
"width": 29,
"brand": "perler",
"maxColors": 25
}
}
}
Returns the bead grid (cells[y][x]), palette with hex/code/name/count, and a rendered chart PNG URL.
Generate AI pattern art
// Step 1 — submit
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "pba_generate",
"arguments": { "prompt": "a cute black cat with green eyes" }
}
}
// → returns { "status": "pending", "job_id": "550e8400-…" }
// Step 2 — poll (repeat every ~15s until status=done)
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "pba_generate",
"arguments": { "job_id": "550e8400-…" }
}
}
// → returns { "status": "done", "imageUrl": "https://…", "editorUrl": "https://…" }
Match a hex color to nearest bead colors
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "pba_convert_color",
"arguments": { "hex": "#FF6B8A", "targetBrand": "hama", "top": 3 }
}
}
OAuth 2.1 PKCE
OAuth 2.1 with PKCE (S256) is also supported for client-side apps:
- Discovery:
GET /.well-known/oauth-authorization-server/wp-json/pba/v1/mcp - Authorize:
/wp-json/pba/v1/oauth/authorize - Token:
/wp-json/pba/v1/oauth/token
Verify a key
curl -H "Authorization: Bearer YOUR_KEY" \
https://perlerbeadai.com/wp-json/pba/v1/key/whoami
Server Implementation
The MCP server is implemented as a WordPress REST API handler. The reference implementation is in server/pbai-mcp.php.
Key features:
- JSON-RPC 2.0 over Streamable HTTP
- SSRF-safe image fetching (public-IP validation, DNS check, redirect limit, Content-Type verification)
- CIEDE2000 color distance math (full implementation ported from Python reference)
- GD-based chart rendering (bead-grid PNG generation)
- Rate limiting per API key with WordPress transients
- Audit logging (JSONL, key-hashed, per-month)
- OAuth 2.1 PKCE (S256, single-use codes, token cleanup)
Security
- API keys are SHA256-hashed at rest; raw keys are never stored
- SSRF protection: public-IP-only DNS validation, port 80/443 only, max 2 redirects, 10MB limit
- Image type verification via
getimagesizefromstring()(PNG/JPEG/WebP/GIF only) - IP-term filtering on AI prompts (copyrighted characters/brands rejected)
- Keys are revocable and regenerable instantly from the account page
- All calls are audit-logged (hashed key ID, timestamp, tool, latency)
- Uses
hash_equals()for timing-safe key comparison
Pricing
- Free tier: 3 AI generations per day, unlimited for reference tools (convert, color chart, color matching, cost estimate)
- Credits: $0.50/generation beyond the free tier. Credits never expire — top up here
- Reference prices in
pba_estimate_costare planning estimates, not live shop prices
Links
License
MIT — see LICENSE.
Made with ❤️ by PerlerBeadAI — free fuse bead pattern maker & AI generator.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。