mockit-mcp is an open-source MCP server for turning text prompts into high-fidelity iOS mobile UI mockups. It combines Claude (by default Opus 4.7) with a Playwright renderer to generate screenshot-grade mobile app designs from natural language.
Purpose
Users can give design requests to Claude Code or any MCP client, such as "design a home dashboard for a fitness tracker, three concentric activity rings, a weekly bar chart, a recent workouts list, premium dark mode with neon accent colors." mockit-mcp returns real PNG mockups (size 390×844, 2x device scale, iPhone-level viewport) along with the underlying HTML/Tailwind source, making visual iteration easy and allowing porting to SwiftUI when ready to build.
Main capabilities
- Dual backend: can use the local claude CLI (subscription-based, no extra cost) or the Anthropic API (requires a key, billed per call), switched via a single environment variable.
- Real PNG output: uses headless Chromium via Playwright, default viewport 390×844 @2x, customizable size via environment variables.
- Iterative refinement: iterate_screen accepts a screen ID and feedback (such as "make the main card smaller"), generates a new version, and tracks parent-child relationships.
- Disk library: each generation saves HTML + PNG + JSON metadata, and can be browsed, filtered, and re-exported.
- MCP standard: compatible with Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP client.
- Transport methods: supports Stdio and HTTP, for local development or sharing/containerizing as a network service.
Usage
One of the following conditions must be met: a logged-in claude CLI (cli backend, default) or an Anthropic API key (api backend); plus Playwright's Chromium download (about 170 MB, one-time).
Quick start (CLI backend, recommended for local development): add the server to Claude Code, no API key required, using the existing claude CLI session.
API backend (host without claude CLI): configure Anthropic API key.
Docker (HTTP transport, for shared deployments): The default docker-compose.yml binds the HTTP port to 127.0.0.1, and the server requires MCP_HTTP_TOKEN for non-loopback requests. Do not expose the server to a public network without setting a strong MCP_HTTP_TOKEN—every generation consumes an Anthropic API key. For remote access, change the port binding to 0.0.0.0:7821:7821 and make sure MCP_HTTP_TOKEN is set, otherwise the server refuses to start.
In any MCP client, simply ask a question to generate a design. The PNG is displayed inline, and the HTML is saved to designs/{project}/{name}-{id}.html. It can later be modified via iterate_screen.
When to use
- Quickly generate iOS app interface concept images for design exploration and communication.
- Visualize mobile UI layouts and styles before coding.
- Gradually refine designs through iterative feedback.
- Integrate as an MCP tool into existing AI-assisted development workflows.
Limitations
- Generation cost: each generation is about 3K input tokens (system prompt) + 6–12K output tokens, depending on screen complexity. Output tokens account for the main cost on Opus. System prompt caching is enabled by default (5-minute TTL), which can save a small amount, but output tokens are still billed at full price. To significantly reduce costs, switch to a smaller model (claude-sonnet-4-6 or claude-haiku-4-5).
- The system prompt is located in src/system-prompt.ts and is manually tuned for a high-end iOS aesthetic: real content, SVG icons (no emoji), elegant gradients instead of stock photos, iOS HIG typography scale, tonal layering instead of heavy shadows. If you need a Material You or desktop dashboard style, you must edit it yourself.
- The current feature roadmap includes: Watch/iPad/Android viewport presets, multi-screen flow generation, HTML → SwiftUI/Jetpack Compose porting tools, design system import, image references, variant generation, etc. These features are not yet available.
- The project is an independent open-sourceproject and is not affiliated with, endorsed by, or sponsored by Apple Inc. or Anthropic, PBC. iPhone, iPad, Apple Watch, and iOS are trademarks of Apple Inc., and Claude is a trademark of Anthropic, PBC.