Skip to main content
Glama

Pin2Brand

Turn any Pinterest board (or local moodboard folder) into an Agent-Ready Visual Identity Kit. Stop AI coding agents from defaulting to generic indigo SaaS templates.

License: MIT Python 3.11+ MCP Compatible W3C Design Tokens

Pin2Brand Coyote Burguer Contact Sheet


Why Pin2Brand?

When you ask an AI coding agent (Antigravity, Cursor, Claude Code, Windsurf, Bolt, v0) to build an app or landing page without strict visual tokens, it almost always outputs the same purple/indigo Tailwind layout. Meanwhile, your real visual inspiration lives on Pinterest or in a folder of saved images.

Pin2Brand bridges that gap:

  1. Scrapes any public Pinterest board (via internal BoardResource/BoardFeedResource API, RSS upgrade, or HTML hydration) — or ingests any local image folder.

  2. Computes deterministic Color & Texture Math: Runs K-Means clustering in perceptual CIELAB (L*a*b*) space, measures 2D Laplacian surface grain and earth-tone balance, and verifies WCAG 2.1 contrast ratios.

  3. Generates a Dynamic Contact Sheet (contact_sheet.jpg): A numbered 4-column visual reference grid (#1..#N) with per-pin HEX swatches.

  4. Synthesizes Art Direction: Supports Gemini Vision, OpenAI (gpt-4o), Local Ollama (llama3.2-vision / qwen2.5-vl), or a 100% free deterministic offline synthesizer.

  5. Exports 11 Multi-Agent & Design Artifacts ready to drop into your repo, Figma, or image generator.


Related MCP server: Kiekkist

Quick Start

1. Run with uv (Local Clone)

git clone https://github.com/jonaduran13-creator/pin2brand.git
cd pin2brand
uv sync

# Analyze a public Pinterest board:
uv run pin2brand analyze "https://mx.pinterest.com/jonathanduransandoval/coyote-burguer/"

# Or analyze a local folder of moodboard images:
uv run pin2brand analyze ./my-inspiration-folder

2. Run in One Command via uvx (Zero Install)

uvx --from git+https://github.com/jonaduran13-creator/pin2brand pin2brand analyze "https://mx.pinterest.com/jonathanduransandoval/coyote-burguer/"

11 Exported Multi-Agent Artifacts

Every run creates output/<board-slug>/ with:

File

Target Audience / Tool

Purpose

visual-identity.json

Scripts, SDKs, Custom Agents

Master Pydantic-validated JSON schema (colors, fonts, UI rules, prompts, pin tags)

AGENTS.md

Antigravity, Claude Code, Codex

Drop into your project root so coding agents obey your brand tokens & anti-patterns

cursor-visual-identity.mdc

Cursor IDE

Drop into .cursor/rules/ (alwaysApply: true, front-end file globs pre-configured)

SKILL.md

Agent Skills

Installable agent skill with YAML frontmatter (<slug>-visual-identity)

DESIGN_SYSTEM.md

Humans & Coding Agents

Complete Markdown design system specification

tokens.w3c.json

Figma (Tokens Studio) & Style Dictionary

Official W3C Design Tokens Community Group ($value, $type) format

tokens.css

Front-End Apps (CSS / Vite / Next.js)

Native :root CSS Custom Properties (--brand-bg-primary, --brand-shadow, etc.)

tailwind.theme.json

Tailwind CSS

Theme extension object for tailwind.config.js

generative-prompts.json

Midjourney, Flux, Imagen / Nano Banana

Ready-to-paste /imagine commands, negative prompts, and local --sref paths

brand-preview.html

Interactive Browser Studio

Live UI Playground with "Before (Generic SaaS) vs After (Pin2Brand)" toggle, live color pickers, and JSON re-export

contact_sheet.jpg

Multimodal Vision LLMs & Art Directors

Dynamic-height numbered moodboard mosaic with global and per-pin CIELAB swatches


Connect as an MCP Server (Antigravity / Claude Desktop / Cursor)

Add pin2brand-mcp to your mcp_config.json / claude_desktop_config.json:

{
  "mcpServers": {
    "pin2brand": {
      "command": "uv",
      "args": [
        "--directory",
        "C:/path/to/pin2brand",
        "run",
        "pin2brand-mcp"
      ]
    }
  }
}

Then ask your agent:

"Call extract_pinterest_visual_identity on https://mx.pinterest.com/jonathanduransandoval/coyote-burguer/ and build our landing page using those exact tokens."


Vision Providers (--provider)

Pin2Brand works out of the box with zero API keys using its CIELAB + Laplacian texture heuristic engine, and upgrades automatically when a Vision LLM is available:

# Auto-detect (uses GEMINI_API_KEY -> OPENAI_API_KEY -> deterministic heuristic)
uv run pin2brand analyze "<url>" --provider auto

# Google Gemini Vision
export GEMINI_API_KEY="your-key"
uv run pin2brand analyze "<url>" --provider gemini --model gemini-2.5-flash

# OpenAI Vision
export OPENAI_API_KEY="your-key"
uv run pin2brand analyze "<url>" --provider openai --model gpt-4o

# 100% Free Local Vision via Ollama
uv run pin2brand analyze "<url>" --provider ollama --model llama3.2-vision

# Deterministic Offline Math Engine
uv run pin2brand analyze "<url>" --offline

Private / Secret Pinterest Boards

If your Pinterest profile or board is private, pass an exported cookies.json / cookies.txt or set PINTEREST_SESSION_COOKIE:

uv run pin2brand analyze "<private-board-url>" --cookies cookies.json

Running Tests

uv sync --extra dev
uv run pytest -v

License

Released under the MIT License.

Available Tools

1 tool
extract_pinterest_visual_identityC

Extract a Pinterest board's CIELAB color system, UI rules, W3C tokens, and generative prompts.

Returns the generated artifact paths and the full VisualIdentityManifest dictionary.

Inputs: board_url (required), offline, max_pins, provider, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of tool selection confusion. The single tool has a clearly distinct, specific purpose (extracting Pinterest board visual identity into design tokens and prompts).

    Naming Consistency4/5

    The name follows a clear verb_noun convention (extract_pinterest_visual_identity) in consistent snake_case. There's nothing to compare it against, but it's readable and predictable.

    Tool Count2/5

    A single tool is thin for a server surface, even for a narrow extraction task. There is no companion operation such as listing boards, previewing results, or validating an existing manifest.

    Completeness3/5

    The tool covers a one-shot extraction end-to-end (returns artifact paths plus the full manifest), which fits the stated purpose. However, the lifecycle is a dead end: no way to select/target input boards explicitly, refresh, or re-emit artifacts from an existing manifest.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to generate complete, deterministic design systems from a single brand color — harmonious palettes, font pairings, type and spacing scales, elevation shadows, responsive grids, motion presets, dark-mode themes, and WCAG contrast audits — and export them as CSS, JSON, Tailwind, or SCSS through natural conversation.
      10
      60 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives coding agents a full agency-style design workflow: capture references with screenshots and measured design tokens, build and compare distinct directions on boards, record decisions, themes and a taste profile, then check results against WCAG 2.2, privacy and mobile performance with launch checks. Enables export of finished designs to HTML, Astro, React, WordPress and Elementor, plus gallery search for licensed designs.
      AGPL 3.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI coding agents to absorb UI references into perceptual design tokens, semantic responsive layout skeletons, motion physics parameters, and zero-dependency multi-framework components, while auditing WCAG contrast, touch targets, reduced-motion guardrails, and layout stability.
      6
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI coding assistants to read public or private Pinterest boards, view their images, and extract design tokens such as palettes, contrast, CSS variables, and Tailwind colors to build UI in that style.
      9
      MIT