Loading...
Loading...
Use this skill whenever the user wants to use AI agents to work with Penpot design files via the Penpot MCP Server. Triggers include: using Penpot through an AI agent, design files, design systems, design tokens, Penpot MCP, design-to-code, generating UI from design, auditing a design system, creating components/variants, renaming layers, exporting assets from Penpot, adding flows, interactions, animations, overlays, or prototyping in Penpot, or prompting an AI agent to read/modify a Penpot file. Also triggers when the user wants to set up Penpot MCP, connect any MCP-compatible AI agent or IDE to Penpot, or produce production-ready HTML/CSS/React from a Penpot design. Use this skill for Penpot-agent workflows — design, code, audit, prototyping, or setup.
npx skill4agent add ar27111994/penpot-mcp penpot-mcpmcp-remoteMCP Client (any MCP-compatible agent / IDE)
↕ HTTP (or stdio via mcp-remote proxy)
MCP Server (hosted remote OR local npx)
↕ WebSocket / plugin bridge
Penpot Plugin (running inside the open design file)https://<your-penpot-domain>/mcp/stream?userToken=YOUR_MCP_KEYnpx @penpot/mcp@stable # keep running; matches current Penpot release
npx @penpot/mcp@beta # for beta/test environmentshttp://localhost:4400/manifest.jsonhttp://localhost:4401/mcphttp://localhost:4401/sse/mcpmcp-remote.claude/settings.json{
"mcpServers": {
"penpot": { "transport": "http", "url": "REMOTE_OR_LOCAL_URL" }
}
}{ "mcpServers": { "penpot": { "url": "REMOTE_OR_LOCAL_URL", "type": "http" } } }settings.json{
"mcp.servers": {
"penpot": { "transport": "http", "url": "REMOTE_OR_LOCAL_URL" }
}
}{
"servers": {
"penpot": { "url": "REMOTE_OR_LOCAL_URL", "transport": { "type": "http" } }
}
}npx -y mcp-remote http://localhost:4401/sse --allow-httpError: Already connected to a transport/sse/mcplocalhosthttps://design.penpot.app| Tool | Mode | Description |
|---|---|---|
| Both | Read overall file structure, pages, layers, components |
| Both | Query Penpot plugin API documentation |
| Both | Run JavaScript in Penpot plugin context — primary read/write tool |
| Both | Export shape as PNG/SVG (remote: limited; may fail with HTTP error) |
| Local only | Import image from local file path into design |
Remote MCP cannot import images from local paths.may fail with HTTP errors — always verify structurally via API rather than relying on export success.export_shape
penpot_api_infohigh_level_overviewexecute_codereferences/penpot-api-patterns.mdexecute_code1. READ → Inspect, list, analyze (never skip)
2. PLAN → Describe intended changes BEFORE applying
3. WRITE → Small atomic batches; one logical unit per call
4. VERIFY → Structural read after each write batch (not export-based)execute_codeCall N: penpot.openPage(page) ← switch page (currentPage still reports OLD page on ≤ 2.16)
Call N+1: any operation ← now on new page; currentPage updatedpenpot.currentPageopenPage()openPage()currentPageopenPage()remove()shape.remove()getPages()shapeStructure()openPage()penpot.currentPage?.namestorage// Call 1: compute and store your design token data
storage.tokenData = { colors: { primary: '#HEX' }, spacing: 8, ... };
// Call 2+: retrieve from storage instead of recomputing
const fallback = { colors: {}, spacing: 8 }; // safe default if session reset
const DS = storage.tokenData || fallback;"List all pages in this file."
"Show all components on this page."
"Analyze the design structure and summarize the token system."BAD: "You are a creative designer."
GOOD: "You are a Senior Product Designer expert in design systems, WCAG accessibility,
Penpot plugin API constraints, and Penpot-to-code workflows. You do not make
product decisions without data. You never invent tokens, colors, or components
not present in the file. You always work in small reversible batches."CONTEXT: [product name, target user, current state of file]
GOAL: [specific problem — e.g., "build design token system and foundations page"]
INPUTS: [page names, board names, component names, token paths, brand colors]
CONSTRAINTS:
- Max ~10 shape operations per execute_code call
- Always use idempotency helpers (ensureColor, ensureTypography, etc.)
- Never switch page and write in the same call
- Never invent font weights not confirmed installed for this family
- Verify structurally after each batch — do not rely on export_shape
- Store shared data in storage global for cross-call access
QUALITY CRITERIA: [how you'll know it's done]1. Discovery → read all pages, library assets, tokens, existing components
2. Proposal → describe planned structure, wait for approval
3. Foundation → build token sets + themes + colors + typographies (batched)
4. Structure → create pages (all in one call), then build boards per page (separate calls)
5. Components → register library components from source boards
6. Verify → structural checklist — count colors, typographies, components, token setsGLOBAL RULESET
- SOURCE: Penpot MCP only
- NO_GUESSING: true
- IF_MISSING: mark as TODO
- PREFER: structured data > prose
- OUTPUT: deterministic, stable ordering
- BATCH_LIMIT: ~10 ops per execute_code call
- PAGE_SWITCH: separate call from writes
- IDEMPOTENCY: always check-before-create
- STORAGE: use storage global for cross-call data
SIZE CONSTRAINTS
- design-system.json: tokens + mappings only
- components.catalog.json: real components only
- layout-and-rules.md: max ~300 lines
STYLE
- Use schemas, key:value, compact bullets
- No narrative explanationsTier 1 (Global): color.base.neutral.100, spacing.base.8
Tier 2 (Semantic): color.bg.default, color.text.primary
Tier 3 (Component): color.button.primary.bg'{color.base.neutral.100}'references/penpot-api-patterns.mdexecute_codereferences/design-system-workflows.mdreferences/design-to-code-workflows.mdreferences/prototyping-workflows.md"Read all existing pages, colors, typographies, and token sets in this file."
"Build the token system: create token sets [base, theme-light, theme-dark],
populate with [color palette] + spacing (8px grid) + border radii + motion tokens.
Use addToken idempotency. Store DS object in storage. Max 15 tokens per call."
"Create library colors from the base token set.
Use ensureColor pattern. 5 colors per call, pause after each batch."
"Create typographies for the scale: [paste scale].
Use ensureTypography. Check installed font variants first.""Create pages: [Page1], [Page2], [Page3] — all in one call (list all pages to create).
Then report the current page list before doing anything else."
"Switch to page [PageName]. Confirm currentPage before writing."
"Build the [BoardName] board on the current [PageName] page.
Max 8 shapes per call. Pause after.""List all boards on this page and their existing interactions."
"Create a prototype flow entry for '/flows/onboarding-start' using Page.createFlow."
"Add click→navigate interactions from [BoardA] to [BoardB] with Dissolve 300ms."
"Audit all interactions: list broken destinations and prototype coverage percentage.""Apply a backdrop blur effect to the [BoardName] overlay:
[N]px layer-blur, [N]px borderRadius, semi-transparent surface fill,
and a drop shadow. Describe the values you'll use before applying."
"Add linear gradient fill to [ShapeName]: brand primary → transparent, top to bottom."FoundationsMobileDesktopTokensPrimitivesComponentsPatternsbackgroundicon-closelabel-primaryrectangle-23blue-box/component/card/defaultoverlay/confirm-deletemobile/card/defaultmobile/nav-barcreateComponent([shapes])blurs: [{ type: 'layer-blur', value: 20 }]borderRadius: 20{ color: '#hex', opacity: 0.06 }/flows/[journey]-startoverlay/page.createFlow('name', entryBoard)| Gotcha | Mitigation |
|---|---|
| MCP acts on focused page only | Confirm page focus before each write batch |
| Write ops immediate — no undo via MCP | Plan + describe before applying |
| Large batches time out silently | Max ~10 ops per call; verify after each |
| Page switch is async | Never switch page and write in same call |
| Verify structurally via API; export is best-effort |
| Remote MCP can't read local file system | Use local MCP for |
| Only one active MCP tab | Close other Penpot tabs before running agents |
| Close other MCP clients; use |
| MCP key shown only once | Copy immediately; regenerate if lost |
| Expired key blocks all connections | Regenerate in Integrations; update all configs |
| Chromium ≥142 blocks localhost | Use Firefox, or allow local network explicitly |
references/penpot-api-patterns.md| Gotcha | Mitigation |
|---|---|
| Use |
| Use |
| ✅ Direct assignment works |
| Use |
| Flex children reversed for column dirs | Last inserted = top visually |
| Guard before resize/style calls; return a clear error if unavailable |
Text clips after | Always reset |
| Font weight rejection | Only use weights explicitly installed for the font family |
Library | |
| |
| |
| Shadow color format | |
Typography | Known API limitation; rendered layers use correct ID |
| Always use a fallback value when reading |
| |
| |