mockit-mcp
mockit-mcp is an MCP server that turns text prompts into premium iOS mobile UI mockups (PNG screenshots + HTML/Tailwind source) using Claude AI and a Playwright headless renderer.
Generate screens (
generate_screen): Create a screenshot-grade iOS mockup as a PNG from a natural language description, with optional project grouping and custom design system (colors, fonts, voice).Iterate on screens (
iterate_screen): Refine an existing screen by ID using natural-language feedback (e.g., "use orange accent instead of blue"), producing new versions with parent/child tracking.List screens (
list_screens): Browse all previously generated screens stored on disk, optionally filtered by project.Get screen details (
get_screen): Fetch metadata (prompt, model, tokens, cost, parent ID, etc.) for a specific screen by UUID, optionally including the full HTML source.
Key technical traits: renders via headless Chromium (Playwright) with configurable viewport/device scale; automatically saves HTML, PNG, and JSON metadata to disk; supports both claude CLI and direct Anthropic API backends; and can run locally via stdio or as an HTTP service for shared/containerized deployments.
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.
Related MCP server: Playwright MCP for macOS
Highlights
Two backends, same tools. Use the local
claudeCLI (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_screentakes 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
Tool | Description |
| Text brief → PNG + HTML. Optional |
| Take a previous |
| List screens, optionally filtered by project. |
| Fetch metadata (or full HTML) for a specific screen. |
Install
Prerequisites
Node.js 20+
Either the
claudeCLI logged in (clibackend, default) or an Anthropic API key (apibackend)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 buildAdd 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 --buildBy 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.
Env | Default | Notes |
|
|
|
| — | Required only for |
|
| API backend only. If your account doesn't have Opus access, set to |
|
| Path to the |
|
| Subprocess timeout |
|
|
|
|
| HTTP transport port |
|
| Bind interface; non-loopback requires |
| — | Bearer token for HTTP auth. Required if |
|
| Where outputs are persisted |
|
| Render width in CSS pixels |
|
| Render height in CSS pixels |
|
| Retina factor (final PNG is |
|
|
|
Cost
Per generation: ~3K input tokens (system prompt) + ~6–12K output tokens depending on screen complexity. Output dominates the cost on Opus.
Backend | First call | Cached follow-up |
| counts against your Claude Code subscription quota | same — cache only discounts the system prompt |
| ~$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, costDocumentation
Reference and guides live in docs/:
Topic | Page |
Install, first generation, verify | |
Every env var, defaults, what they do | |
The four MCP tools — schemas, examples | |
Pipeline end-to-end | |
Local, Docker, networked deployments | |
Sandbox, network allowlist, HTTP auth | |
How the design voice is encoded | |
Common errors and how to fix them |
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
--imagefor visual inspiration)Variant generation (3-5 alternatives per prompt)
Contributing
Issues and PRs welcome — see CONTRIBUTING.md.
License
Acknowledgements
Built on top of:
Anthropic Claude — the model that does the heavy lifting
Model Context Protocol — the integration standard
Playwright — the renderer
Tailwind CSS — via CDN, in every generated screen
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.
Available Tools
4 toolsgenerate_screenA
Generate a premium iOS mobile UI mockup from a text brief. Outputs both the screenshot (PNG) and the underlying HTML. Use this when the user asks to design, mock up, or visualize a mobile app screen.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Detailed brief for the screen: what app, what screen, what content, what UI elements. | |
| project | No | Project name (used to group related screens). | default |
| name | Yes | Short name for this screen, e.g. 'Main', 'Settings', 'Onboarding'. | |
| design_system | No | Optional design system spec: colors, fonts, voice. If omitted, the system invents one consistent with the prompt. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool outputs both a screenshot (PNG) and HTML, which is a key behavioral trait. However, it does not cover other aspects like potential costs, authentication needs, rate limits, or side effects. This is moderate transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the core functionality in the first sentence and usage guidance in the second. Every word earns its place; no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters, no output schema, and no annotations, the description provides sufficient context for basic usage: what it generates and when to use it. It could be improved by mentioning the response format or error handling, but for a generation tool with clear output, it is fairly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for its 4 parameters. The description adds minimal extra meaning beyond the schema, except for the context of 'premium iOS mobile UI mockup' which gives design direction. Baseline 3 is appropriate as schema does heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates a premium iOS mobile UI mockup from a text brief, with both screenshot and HTML output. It distinguishes itself from siblings (get_screen, iterate_screen, list_screens) by focusing on creation rather than retrieval or iteration.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this when the user asks to design, mock up, or visualize a mobile app screen.' This provides clear context for when to use, though it does not explicitly list when not to use or mention alternatives. However, the context of sibling tools implies those alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_screenA
Get details and metadata for a specific screen. Set include_html=true to also return the HTML source.
| Name | Required | Description | Default |
|---|---|---|---|
| screen_id | Yes | Screen UUID returned by generate_screen or iterate_screen. | |
| include_html | No | Include full HTML in response (large). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It mentions the optional HTML return but does not disclose potential size impacts, pagination, or any side effects. Minimal but not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences that directly state the tool's purpose and key parameter option. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, so 'details and metadata' is vague. While the tool is simple, an agent might benefit from knowing what fields are returned. Adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds minimal extra meaning beyond what the schema already states. For screen_id, it repeats the schema; for include_html, it rephrases slightly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it 'get details and metadata for a specific screen,' which distinguishes it from siblings like generate_screen (create) and list_screens (list all).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this versus alternatives, though sibling names imply the correct use case. The description does provide context for an optional parameter (include_html).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
iterate_screenA
Refine an existing generated screen based on feedback. Use this for follow-up edits like 'change color', 'add a section', 'make it more spacious'.
| Name | Required | Description | Default |
|---|---|---|---|
| screen_id | Yes | ID of the screen to iterate on (from generate_screen output). | |
| feedback | Yes | What to change: 'make the hero card larger', 'use orange accent instead of blue', etc. | |
| name | No | Optional new name for the iteration. Defaults to original name + ' (v2)'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden for behavioral disclosure. It implies mutation ("refine") but does not specify whether changes are reversible, what permissions are needed, or how the tool handles multiple iterations. The examples are non-destructive, but explicit security or side-effect info is missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary action, and includes practical examples without extraneous text. Every sentence adds value and the structure is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description adequately explains the tool's purpose and gives usage examples. However, it does not describe the return value (e.g., updated screen object) or confirm that screen_id must come from generate_screen, which is noted only in the schema. A bit more context on how to use the result would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% coverage, so baseline is 3. The description adds minimal extra meaning beyond the schema's parameter descriptions (e.g., "feedback" examples). The optional "name" parameter is described in both, but the description reinforces but does not significantly augment the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool refines an existing generated screen based on feedback, distinguishing it from siblings like generate_screen (creation) and get_screen (retrieval). The examples of feedback ("change color", "add a section") further clarify its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description specifies that this tool is for follow-up edits after generation, providing clear usage context. However, it does not explicitly state when not to use it (e.g., for new screens or non-generated screens) or mention prerequisites like valid screen_id from generate_screen.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_screensA
List all generated screens, optionally filtered by project name.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Filter by project. Omit to list all. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description implies a read-only operation without side effects, which is transparent for a list tool. No annotations exist, but the description is clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that efficiently conveys the tool's purpose and optional parameter without extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one optional parameter and no output schema, the description is adequate. It could be more complete by mentioning the return format, but it still provides sufficient context for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description of the 'project' parameter. The tool description adds 'optionally filtered by project name' but does not add significant new meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('list') and resource ('generated screens') with an optional filter. It distinguishes from siblings like generate_screen and get_screen.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use (listing all screens) and mentions optional filtering, but does not explicitly state when not to use or compare to alternatives like iterate_screen.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.1- First observed
generate_screen - First observed
get_screen - First observed
iterate_screen - First observed
list_screens
TDQS
Each tool serves a distinct purpose: generate creates, get retrieves, iterate refines, list enumerates. No functional overlap.
All tools follow a consistent verb_noun pattern in snake_case (generate_screen, get_screen, iterate_screen, list_screens).
4 tools is well-scoped for a mockup generation service, covering creation, retrieval, iteration, and listing without excess.
Covers core CRUD except delete, which may be intentional. Users can create, read, update, and list screens, with no obvious dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
PRD, logo, and AI UI mockups from any app idea — PRD free, logo 1 credit, screens 1 credit each.
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
Turn your app idea into IA, wireframes, PRD, style guides, and dev specs for coding agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides professional UI/UX design expertise and frontend development tools for analyzing interfaces, generating design systems, and creating modern components with accessibility and best practices built-in. Supports React, Vue, Angular and other frameworks with seamless Claude Code CLI integration.422MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to see and interact with any macOS application using natural language commands. Perfect for testing Mac applications, UI automation, and app development with AI assistance.33-
- AlicenseNot gradedqualityBmaintenanceScreenshot and diagram tool for AI agents. Capture and annotate screenshots to show Claude what you mean — or let the agent render Mermaid diagrams and open them for visual review. Approve, annotate, or request changes with text feedback. Built-in review mode with structured responses. CLI and MCP server for Claude Code, Cursor, Windsurf, Cline. macOS, open source, free.8323MIT
- AlicenseBqualityDmaintenanceGenerates React Native/Expo UI components using AI, integrates with Claude Desktop to create and optimize Tamagui-based components via natural language commands.62MIT
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/karyaboyraz/mockit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server