perlerbeadai-mcp
Integrates with OpenAI's image generation API to create bead-pattern-style art from text prompts, supporting two-step job submission and polling.
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 |
| 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 |
| Generate bead-pattern-style art from a text prompt (gpt-image-2, ~1–4 min). Two-step: submit with prompt → poll with | 1/15s per key |
| 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 |
| 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 |
| Turn per-color bead counts (e.g. from | 60/min per key |
Related MCP server: pixelforge-mcp
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/mcpAuthorize:
/wp-json/pba/v1/oauth/authorizeToken:
/wp-json/pba/v1/oauth/token
Verify a key
curl -H "Authorization: Bearer YOUR_KEY" \
https://perlerbeadai.com/wp-json/pba/v1/key/whoamiServer 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.
This server cannot be installed
Maintenance
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for AI image generation, transformation, and style management via the Recraft API. Provides tools for text-to-image, image-to-image, inpainting, background operations, vectorization, upscaling, and custom style creation.Last updated16599MIT
- AlicenseAqualityCmaintenanceMCP server that forges pixel art sprites & game assets using Google Gemini — generate, crop, split & process, all from your AI assistant.Last updated8333MIT
- AlicenseCqualityDmaintenanceMCP server for generating and editing images through Polza AI using Google Gemini models (Nano Banana 2, Pro, Flash). It supports conditioning with up to three reference images and provides structured metadata with reproducibility hints.Last updated51MIT
- Flicense-qualityDmaintenanceAn MCP server for AI-powered image processing (generate, edit, vary, analyze) supporting OpenAI, Gemini, Ideogram, and custom relay endpoints.Last updated
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
MCP server for Flux AI image generation
Color API MCP — wraps thecolorapi.com (free, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/luotwo/perlerbeadai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server