karyaboyraz/mockit-mcp

šŸ“ Architecture & Design
0 Views
0 Installs

šŸ“‡ šŸ  šŸŽ 🪟 🐧 - Generate premium iOS mobile UI mockups (PNG + HTML) from a single text prompt. Pairs Claude (Opus 4.7 by default) with a Playwright headless renderer. Two backends — claude CLI (uses your Claude Code subscription) or Anthropic API. Stdio + HTTP transports, MIT.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "karyaboyraz-mockit-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "karyaboyraz-mockit-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

mockit-mcp

mockit-mcp

Turn text prompts into premium iOS mobile UI mockups.

An MCP server that pairs Claude (Opus 4.7 by default) with a Playwright renderer to generate screenshot-grade mobile app designs from natural language.

Latest release MIT License GitHub stars CI status

Node.js 20+ TypeScript strict MCP 1.0 Claude Opus 4.7 Playwright


What it does

Ask Claude Code (or any MCP client):

Design the home dashboard for a fitness tracker. Three concentric activity rings, weekly bar chart, recent workouts list, premium dark mode with neon accents.

mockit-mcp returns a real PNG mockup (sized 390Ɨ844 at 2x device scale, an iPhone-class viewport) and the underlying HTML/Tailwind source — so you can iterate visually and port to SwiftUI when you're ready to build.

It's not a static template engine and it's not generic AI slop. The system prompt is hand-tuned for premium iOS aesthetics: real content, SVG icons (no emoji), tasteful gradients in place of stock photos, iOS HIG type scale, and tonal layering instead of heavy shadows.

Fitness tracker dashboard
Fitness dashboard
Volume calculator app screen (Turkish)
Volume calculator (Turkish)

Generated from a single prompt each. See examples/.

Highlights

  • Two backends, same tools. Use the local claude CLI (subscription, $0 extra) or the Anthropic API (key + per-call pricing). Switch with one env var.
  • Real PNG output. Headless Chromium via Playwright. Default viewport is 390Ɨ844 @2x (iPhone-class); any custom size is one env var away.
  • Iterative refinement. iterate_screen takes a screen ID + feedback ("make the hero card smaller") and produces a new version, tracking parent/child.
  • Disk-backed library. Every generation saves HTML + PNG + JSON metadata. Browse, filter, re-export.
  • MCP standard. Works with Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP client.
  • Stdio + HTTP transports. Run locally for dev, or as a network service for shared / containerized use.

Tools

ToolDescription
generate_screenText brief → PNG + HTML. Optional design_system and project fields.
iterate_screenTake a previous screen_id + feedback string, produce a new version.
list_screensList screens, optionally filtered by project.
get_screenFetch metadata (or full HTML) for a specific screen.

Install

Prerequisites

  • Node.js 20+
  • Either the claude CLI logged in (cli backend, default) or an Anthropic API key (api backend)
  • Playwright's Chromium download (~170 MB, one-time)

Quick start (CLI backend, recommended for local dev)

git clone https://github.com/karyaboyraz/mockit-mcp.git
cd mockit-mcp
npm install
npx playwright install chromium
npm run build

Add to Claude Code:

claude mcp add mockit -- node "$(pwd)/dist/server.js"

Done. No API key needed — it uses your existing claude CLI session.

API backend (no claude CLI on host)

echo "CLAUDE_BACKEND=api" > .env
echo "ANTHROPIC_API_KEY=sk-ant-..." >> .env
npm run build
claude mcp add mockit -- node "$(pwd)/dist/server.js"

Docker (HTTP transport, for shared deployment)

cat > .env <<'ENV'
CLAUDE_BACKEND=api
ANTHROPIC_API_KEY=sk-ant-...
# Required if you change the port binding from 127.0.0.1 to 0.0.0.0:
MCP_HTTP_TOKEN=$(openssl rand -hex 32)
ENV
docker compose up -d --build

By default docker-compose.yml binds the HTTP port to 127.0.0.1 only and the server requires MCP_HTTP_TOKEN for any non-loopback request. Don't expose this server to a public network without setting a strong MCP_HTTP_TOKEN — every generation hits your Anthropic API key.

Then point any client at the loopback URL:

claude mcp add --transport http mockit http://127.0.0.1:7821/mcp \
  -H "Authorization: Bearer <MCP_HTTP_TOKEN>"

For remote access, change docker-compose.yml's port binding to 0.0.0.0:7821:7821 and ensure MCP_HTTP_TOKEN is set — the server refuses to start otherwise.

Usage

In any MCP client, just ask:

Design a fitness tracker dashboard. Show today's ring progress, a weekly chart, and a list of recent workouts. Dark mode, neon green accent.

The PNG appears inline. The HTML is saved to designs/{project}/{name}-{id}.html.

For follow-ups:

iterate_screen on that fitness dashboard — replace the chart with heart-rate over time, and add a "share workout" button below.

See examples/ for prompt patterns and full outputs.

Configuration

All optional. See .env.example for the full list.

EnvDefaultNotes
CLAUDE_BACKENDclicli uses the claude CLI; api uses Anthropic SDK directly
ANTHROPIC_API_KEY—Required only for api backend
ANTHROPIC_MODELclaude-opus-4-7API backend only. If your account doesn't have Opus access, set to claude-sonnet-4-6 or claude-haiku-4-5
CLAUDE_CLI_PATHclaudePath to the claude binary
CLAUDE_CLI_TIMEOUT_MS180000Subprocess timeout
MCP_TRANSPORTstdiostdio or http
HTTP_PORT7821HTTP transport port
HTTP_HOST127.0.0.1Bind interface; non-loopback requires MCP_HTTP_TOKEN
MCP_HTTP_TOKEN—Bearer token for HTTP auth. Required if HTTP_HOST is non-loopback
DESIGNS_DIR./designsWhere outputs are persisted
VIEWPORT_WIDTH390Render width in CSS pixels
VIEWPORT_HEIGHT844Render height in CSS pixels
DEVICE_SCALE2Retina factor (final PNG is WIDTH Ɨ DEVICE_SCALE wide)
PLAYWRIGHT_NO_SANDBOXautoauto = sandbox enabled outside containers; true to force-disable, false to force-enable. Disabling reduces isolation against malicious model HTML — only do so inside a container.

Cost

Per generation: ~3K input tokens (system prompt) + ~6–12K output tokens depending on screen complexity. Output dominates the cost on Opus.

BackendFirst callCached follow-up
clicounts against your Claude Code subscription quotasame — cache only discounts the system prompt
api~$0.50–0.95 (Opus 4.7)~$0.45–0.90 (cache discounts the system-prompt input only; output cost is unchanged)

System-prompt caching is on by default (5-minute TTL). It saves a few cents per call but is not an order-of-magnitude discount — output tokens still bill at full rate. For real cost reduction, switch to a smaller model (claude-sonnet-4-6 or claude-haiku-4-5).

Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   MCP Client    │  (Claude Code, Cursor, Windsurf, …)
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
         │ tool call: generate_screen({ prompt, ... })
         ā–¼
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│  mockit-mcp                                          │
│                                                      │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    │
│  │  Backend     │    │  Renderer              │    │
│  │              │    │                        │    │
│  │ ā–ŗ cli   ─────┼──► │  Playwright (headless  │    │
│  │ ā–ŗ api   ā”€ā”€ā”€ā”€ā”€ā”˜    │  Chromium @ iPhone     │    │
│  │  → HTML+Tailwind  │  viewport)             │    │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    │  → PNG screenshot      │    │
│                      ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    │
│                                                      │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    │
│  │ Storage (disk): HTML + PNG + JSON metadata │    │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Storage layout

designs/
└── {project-slug}/
    ā”œā”€ā”€ {name-slug}-{id8}.html   # id8 = first 8 chars of the screen UUID
    ā”œā”€ā”€ {name-slug}-{id8}.png
    └── {name-slug}-{id8}.json   # full UUID, prompt, parent ID, tokens, model, cost

Documentation

Reference and guides live in docs/:

TopicPage
Install, first generation, verifyGetting Started
Every env var, defaults, what they doConfiguration
The four MCP tools — schemas, examplesTools Reference
Pipeline end-to-endArchitecture
Local, Docker, networked deploymentsDeployment
Sandbox, network allowlist, HTTP authSecurity
How the design voice is encodedSystem Prompt
Common errors and how to fix themTroubleshooting

Tuning the design voice

The hand-tuned system prompt lives in src/system-prompt.ts. It's where the iOS HIG enforcement, the no-stock-photo rule, the SF Pro fallback chain, and the editorial typography preferences are encoded. Want Material You instead, or a desktop dashboard voice? Edit it.

Development

npm run dev    # tsx watch mode, stdio transport
npm run http   # tsx watch mode, http transport on :7821
npm run build  # compile to dist/

Roadmap

  • Watch / iPad / Android viewport presets
  • Multi-screen flow generation (onboarding sequences)
  • HTML → SwiftUI / Jetpack Compose port tool
  • Design system import (Tailwind config, design tokens)
  • Image references (use --image for visual inspiration)
  • Variant generation (3-5 alternatives per prompt)

Contributing

Issues and PRs welcome — see CONTRIBUTING.md.

License

MIT

Acknowledgements

Built on top of:

Trademarks

iPhone, iPad, Apple Watch, and iOS are trademarks of Apple Inc. Claude is a trademark of Anthropic, PBC. mockit-mcp is an independent open-source project and is not affiliated with, endorsed by, or sponsored by Apple Inc. or Anthropic, PBC. All other product names, logos, and brands are property of their respective owners.

Related MCP Servers

aidc2026ai-melon/aidc-ai-mcp

šŸŽ–ļø šŸ“‡ ā˜ļø - Deterministic AI data-center design engine exposed as MCP tools (design, validate, layout): rack count, design PUE, total MVA, liquid/air cooling split, CDU planning, cost & timeline. NVIDIA Rubin-era, 22.9 kV intake, Korea. Remote Streamable HTTP at https://aidc-ai.io/api/mcp; no key for the anonymous tier.

šŸ“ Architecture & Design0 views
awdr74100/figwright

šŸ“‡ šŸ  šŸŽ 🪟 🐧 - Bidirectional Figma server over a local WebSocket relay: turn a selection into framework-aware code (reusing your components and tokens), or author frames, text, styles, variables, and whole screens back onto the canvas. 92 tools, any MCP client, no Dev Mode seat or paid tier.

šŸ“ Architecture & Design0 views
betterhyq/mermaid-grammer-inspector-mcp

šŸ“‡ šŸ  šŸŽ 🪟 🐧 - A Model Context Protocol (MCP) server for validating Mermaid diagram syntax and providing comprehensive grammar checking capabilities

šŸ“ Architecture & Design0 views
BV-Venky/excalidraw-architect-mcp

šŸ šŸ  šŸŽ 🪟 🐧 - Generate beautiful Excalidraw architecture diagrams with auto-layout, architecture-aware component styling, and stateful editing. 50+ technology mappings including databases, message queues, caches, and more. No API keys required.

šŸ“ Architecture & Design0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
ā˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.