mockit-mcp
Qué hace
Pregúntale a Claude Code (o a cualquier cliente MCP):
Diseña el panel de control principal para un rastreador de fitness. Tres anillos de actividad concéntricos, gráfico de barras semanal, lista de entrenamientos recientes, modo oscuro premium con acentos de neón.
mockit-mcp devuelve un prototipo PNG real (con un tamaño de 390×844 a escala 2x, un viewport de clase iPhone) y el código fuente HTML/Tailwind subyacente, para que puedas iterar visualmente y portarlo a SwiftUI cuando estés listo para construir.
No es un motor de plantillas estático ni basura de IA genérica. El prompt del sistema está ajustado manualmente para una estética premium de iOS: contenido real, iconos SVG (sin emojis), degradados elegantes en lugar de fotos de stock, escala tipográfica HIG de iOS y capas tonales en lugar de sombras pesadas.
Related MCP server: Playwright MCP for macOS
Aspectos destacados
Dos backends, mismas herramientas. Usa la CLI local
claude(suscripción, $0 extra) o la API de Anthropic (clave + precios por llamada). Cambia con una variable de entorno.Salida PNG real. Chromium headless a través de Playwright. El viewport predeterminado es 390×844 @2x (clase iPhone); cualquier tamaño personalizado está a una variable de entorno de distancia.
Refinamiento iterativo.
iterate_screentoma un ID de pantalla + comentarios ("haz la tarjeta principal más pequeña") y produce una nueva versión, rastreando padre/hijo.Biblioteca respaldada por disco. Cada generación guarda metadatos HTML + PNG + JSON. Explora, filtra, reexporta.
Estándar MCP. Funciona con Claude Code, Claude Desktop, Cursor, Windsurf o cualquier cliente MCP.
Transportes Stdio + HTTP. Ejecuta localmente para desarrollo, o como un servicio de red para uso compartido/contenedorizado.
Herramientas
Herramienta | Descripción |
| Resumen de texto → PNG + HTML. Campos opcionales |
| Toma un |
| Lista pantallas, opcionalmente filtradas por proyecto. |
| Obtiene metadatos (o HTML completo) para una pantalla específica. |
Instalación
Requisitos previos
Node.js 20+
O bien la CLI
claudeiniciada (clibackend, predeterminado) o una clave de API de Anthropic (apibackend)Descarga de Chromium de Playwright (~170 MB, una sola vez)
Inicio rápido (backend CLI, recomendado para desarrollo local)
git clone https://github.com/karyaboyraz/mockit-mcp.git
cd mockit-mcp
npm install
npx playwright install chromium
npm run buildAñadir a Claude Code:
claude mcp add mockit -- node "$(pwd)/dist/server.js"Listo. No se necesita clave de API: utiliza tu sesión de CLI claude existente.
Backend de API (sin CLI de claude en el 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 (transporte HTTP, para despliegue compartido)
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 --buildPor defecto, docker-compose.yml vincula el puerto HTTP solo a 127.0.0.1 y el servidor requiere MCP_HTTP_TOKEN para cualquier solicitud que no sea de loopback. No expongas este servidor a una red pública sin establecer un MCP_HTTP_TOKEN fuerte: cada generación consume tu clave de API de Anthropic.
Luego apunta cualquier cliente a la URL de loopback:
claude mcp add --transport http mockit http://127.0.0.1:7821/mcp \
-H "Authorization: Bearer <MCP_HTTP_TOKEN>"Para acceso remoto, cambia el enlace de puerto de docker-compose.yml a 0.0.0.0:7821:7821 y asegúrate de que MCP_HTTP_TOKEN esté configurado; de lo contrario, el servidor se negará a iniciarse.
Uso
En cualquier cliente MCP, simplemente pregunta:
Diseña un panel de control para un rastreador de fitness. Muestra el progreso del anillo de hoy, un gráfico semanal y una lista de entrenamientos recientes. Modo oscuro, acento verde neón.
El PNG aparece en línea. El HTML se guarda en designs/{project}/{name}-{id}.html.
Para seguimientos:
iterate_screen en ese panel de control de fitness: reemplaza el gráfico con la frecuencia cardíaca a lo largo del tiempo y añade un botón de "compartir entrenamiento" debajo.
Consulta examples/ para ver patrones de prompts y resultados completos.
Configuración
Todo opcional. Consulta .env.example para ver la lista completa.
Env | Predeterminado | Notas |
|
|
|
| — | Requerido solo para el backend |
|
| Solo backend de API. Si tu cuenta no tiene acceso a Opus, configúralo en |
|
| Ruta al binario |
|
| Tiempo de espera del subproceso |
|
|
|
|
| Puerto de transporte HTTP |
|
| Interfaz de enlace; lo que no sea loopback requiere |
| — | Token de portador para autenticación HTTP. Requerido si |
|
| Dónde se persisten las salidas |
|
| Ancho de renderizado en píxeles CSS |
|
| Altura de renderizado en píxeles CSS |
|
| Factor Retina (el PNG final tiene un ancho de |
|
|
|
Costo
Por generación: ~3K tokens de entrada (prompt del sistema) + ~6–12K tokens de salida dependiendo de la complejidad de la pantalla. La salida domina el costo en Opus.
Backend | Primera llamada | Seguimiento en caché |
| cuenta contra tu cuota de suscripción de Claude Code | igual: la caché solo descuenta el prompt del sistema |
| ~$0.50–0.95 (Opus 4.7) | ~$0.45–0.90 (la caché descuenta solo la entrada del prompt del sistema; el costo de salida no cambia) |
El almacenamiento en caché del prompt del sistema está activado por defecto (TTL de 5 minutos). Ahorra unos centavos por llamada, pero no es un descuento de un orden de magnitud: los tokens de salida siguen facturándose a tarifa completa. Para una reducción de costos real, cambia a un modelo más pequeño (claude-sonnet-4-6 o claude-haiku-4-5).
Arquitectura
┌─────────────────┐
│ 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 │ │
│ └────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘Diseño de almacenamiento
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, costAjuste de la voz de diseño
El prompt del sistema ajustado manualmente reside en src/system-prompt.ts. Es donde se codifican la aplicación de HIG de iOS, la regla de no usar fotos de stock, la cadena de respaldo de SF Pro y las preferencias de tipografía editorial. ¿Quieres Material You en su lugar, o una voz de panel de control de escritorio? Edítalo.
Desarrollo
npm run dev # tsx watch mode, stdio transport
npm run http # tsx watch mode, http transport on :7821
npm run build # compile to dist/Hoja de ruta
[ ] Ajustes preestablecidos de viewport para Watch / iPad / Android
[ ] Generación de flujo multipantalla (secuencias de incorporación)
[ ] Herramienta de portabilidad HTML → SwiftUI / Jetpack Compose
[ ] Importación de sistema de diseño (configuración de Tailwind, tokens de diseño)
[ ] Referencias de imagen (usa
--imagepara inspiración visual)[ ] Generación de variantes (3-5 alternativas por prompt)
Contribución
Las incidencias y PR son bienvenidas: consulta CONTRIBUTING.md.
Licencia
Agradecimientos
Construido sobre:
Anthropic Claude — el modelo que hace el trabajo pesado
Model Context Protocol — el estándar de integración
Playwright — el renderizador
Tailwind CSS — vía CDN, en cada pantalla generada
Marcas registradas
iPhone, iPad, Apple Watch e iOS son marcas registradas de Apple Inc. Claude es una marca registrada de Anthropic, PBC. mockit-mcp es un proyecto de código abierto independiente y no está afiliado, respaldado ni patrocinado por Apple Inc. o Anthropic, PBC. Todos los demás nombres de productos, logotipos y marcas son propiedad de sus respectivos dueños.
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.
4 tool updates
v0.1.1- First observed
generate_screen - First observed
get_screen - First observed
iterate_screen - First observed
list_screens
TDQS
Scored across 4 tools
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
Related MCP Connectors
Create 3D device mockups, App Store screenshot sets and launch videos from your AI. Showoff.dev puts your screenshots on real iPhones, Pixels, iPads and MacBooks, sets camera and background, and exports App Store and Google Play sizes. Works with Claude, ChatGPT, Cursor, Codex and any MCP client.
Create 3D device mockups, App Store screenshot sets and launch videos from your AI. Showoff.dev puts your screenshots on real iPhones, Pixels, iPads and MacBooks, sets camera and background, and exports App Store and Google Play sizes. Works with Claude, ChatGPT, Cursor, Codex and any MCP client.
- MaketaOAuthpro.maketa
Build and edit app screen mockups and clickable prototypes from your AI assistant.
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.
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.423MIT
- AlicenseNot gradedqualityCmaintenanceEnables 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.33MIT
- 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.0344MIT
- AlicenseBqualityDmaintenanceGenerates React Native/Expo UI components using AI, integrates with Claude Desktop to create and optimize Tamagui-based components via natural language commands.62MIT