handmade is a Model Context Protocol (MCP) server for AI-generated interface design, designed to eliminate generic AI output by enforcing comprehensive prompt coverage and proactively clarifying ambiguities before generation, helping build AI interfaces that look intentionally designed rather than generated.
Purpose
Most generative UI models converge on the same design clichés: the ubiquitous Inter font, indigo primary buttons, purple mesh gradients, and uniform three-column card grids. handmade intervenes throughout the entire development lifecycle to ensure generated designs meet engineering standards.
Key Capabilities
- Before generation (brief synthesis): Detects undeclared domain parameters through targeted clarification instead of letting the model hallucinate business facts. Generates exhaustive design briefs and formal token schemas (handmade.system.json).
- During generation (guidance): Injects strict typographic scales, calibrated color palettes, and layout constraints directly into the model context.
- After generation (static and computational verification): handmade check audits source files and computed DOM state, failing code that deviates from the token specification.
- Deterministic context extraction: Prevents LLM agents from fabricating missing business specifications, such as unverified customer testimonials, invented transaction metrics, or placeholder business hours. The CLI isolates entities already present in the initial prompt and queries only the missing functional requirements.
- Adversarial prompt neutralization: Maps generic patterns to design system equivalents and rejects instruction overrides. Legitimate brand palettes can be explicitly preserved via --allow <token>.
- Headless runtime evaluation: Loads local servers or remote deployments in a headless Chromium environment, analyzes computed DOM properties, verifies real text-to-background WCAG luminance contrast, and flags unloaded font fallbacks.
- Agent and LLM tool integration: Provides MCP integration, exposing tools such as handmade_design_brief, handmade_check, handmade_fix_plan, and handmade_list_tells. It also provides rule files for Claude Code / Agent Skills, Cursor IDE, and Copilot / Custom Agents.
- Continuous integration: Integrates design system verification into automated review via GitHub ActionsIn the workflow.
- Language and framework parser support: The source extractor can recognize style declarations, token utilities, and structural markup in most modern UI stacks, parsing multiple color formats (Hex, RGB/RGBA, HSL/HSLA, OKLCH, CSS named identifiers, shadcn design token aliases).
- Audit heuristics and signatures: The analyzer audits codebases against 43 deterministic heuristic signatures.
Usage
- Installation: Requires Python 3.10+, published on PyPI. Can be installed via pipx, uv, or pip. Headless DOM evaluation requires the optional Playwright dependency.
- Scaffold a new interface: Generate an optimized LLM system brief and compile the design token schema. Provide prompt.md to your preferred AI runtime (Claude, Cursor, v0, Bolt, Lovable, ChatGPT). After code generation is complete, audit the workspace and resolve any lint or token discrepancies until the checker outputs PASS.
- Fix an existing codebase: Generate targeted refactoring prompts from existing source code.
- MCP integration: Set up the project in one step via handmade init, or register the JSON configuration manually.
- CI integration: Integrate design system validation into GitHub Actions workflows.
When to use
Suitable for developers and teams using AI to generate UI interfaces, especially in scenarios that require ensuring generated designs conform to a specific design system, avoiding generic AI design patterns, and maintaining brand consistency. Also suitable for CI/CD pipelines that require automated design validation.
Limitations
- Requires a Python 3.10+ environment.
- Headless runtime evaluation requires an additional Playwright installation.
- Validation thresholds are strict: a passing status requires a composite design score ≥ 85/100, zero high-confidence model signatures, 100% of typography tokens resolving from authorized design system fonts, ≥ 95% of color values resolving from the design system, ≥ 90% of size and border radius tokens resolving from the system scale, and ≥ 85% of spacing definitions aligned with the system scale.
- Adversarial prompt neutralization cannot bypass rule-override refusals.
- Some features (such as Agent Skills files) are provided with the repository and are not in the PyPI package.