penpot-agent
Convert any website into an editable, pixel-accurate Penpot design (HTML to Penpot) — from your terminal or from Claude Code, through the Penpot MCP server.
penpot-agent (pb) drives a Penpot file through the official
Penpot MCP server. Point it at a URL and it captures the page in
headless Chrome, rebuilds it in Penpot as real, editable layers (boards, text with the right fonts
and line breaks, vectors, images, gradients, shadows), then measures the result against the live
site pixel by pixel and fixes what it can.
It works as a standalone CLI and as a Claude Code plugin, so you can simply ask Claude:
"Recreate https://example.com as a Penpot board and get it under 1 % pixel difference."
Use it to redesign an existing site starting from its real layout, migrate a live website or landing page into an open-source design tool (a Figma alternative), rebuild a competitor's page as a design reference, create design tokens from a site, or let an AI agent work on Penpot designs with measurable accuracy.
Features
- Website → Penpot clone — sections become named boards, text keeps the browser's exact line
breaks, SVGs become editable vectors,
oklch()/lab()colours, gradient text, line-clamps, pseudo-element decorations and coloured underlines are reproduced. - Visual QA built in — page and per-section diff %, hotspot montages, heat overlays, per-element offset audit with automatic nudging, and a quality gate that fails on regressions.
- Reliable over MCP — payloads are chunked past the ~100 KB request limit, the in-plugin runtime is versioned and re-injected after reloads, long builds are batched under the 120 s task limit, and a throttled Penpot tab is waited out instead of failing.
- Scriptable — inspect, find, patch, snapshot/restore, export, design tokens → library, or run
any JavaScript with a small
pbhelper API inside Penpot. - Claude Code plugin — skills that teach Claude the whole workflow, plus
/penpot-agent:setupand/penpot-agent:clone.
Quick start
Requirements
- A Penpot account or self-hosted Penpot with the MCP server — see docs/penpot-setup.md
- uv, Node.js ≥ 20, Google Chrome or Chromium
- macOS or Linux (Windows is untested; WSL may work)
Option A — Claude Code plugin
/plugin install penpot-agent --marketplace deepaktechk/penpot-agent
(older Claude Code: /plugin marketplace add deepaktechk/penpot-agent, then
/plugin install penpot-agent@penpot-agent)
Then run /penpot-agent:setup — Claude checks every requirement and walks you through connecting
Penpot — and try /penpot-agent:clone https://example.com. More in
docs/claude-code-plugin.md.
Option B — command line
uv tool install git+https://github.com/deepaktechk/penpot-agent
export PENPOT_MCP_URL="https://design.penpot.app/mcp/stream?userToken=..." # see docs/penpot-setup.md
mkdir example && cd example && pb init
pb doctor # "problems": [] means ready
pb capture https://example.com --fonts "Inter"
pb rebuild --board "Example – Landing Page" --font Inter --fix --montage 6
Open the Penpot file: the board is there. The rebuild output ends with the quality gate verdict;
the montage of the worst areas is in .pbridge/diffs/. Walkthrough: docs/getting-started.md.
How it works
live site ──► capture (headless Chrome) ──► layout.json + screenshot ← capture gate: real fonts, page still, images loaded
│
▼
convert (Python) ──► spec.json (boards, text, vectors, images)
│
▼
Penpot ◄── MCP server ◄── pb build (chunked, batched, retried; runtime injected into the MCP plugin)
│
└── export ──► compare with the screenshot ──► audit / autofix ──► render gate (thresholds + regression check)
Details: docs/how-it-works.md · architecture: docs/architecture.md
Documentation
| Getting started | install, first clone, reading the results |
| Penpot setup | hosted, self-hosted and local MCP server; keeping the plugin connected |
| Claude Code plugin | install, skills, example prompts |
| Commands | every pb command and option, targets, patch operations |
| Spec format | the JSON design format pb build accepts |
| How it works | capture, conversion, accuracy techniques, quality gates |
| Architecture | code map for contributors |
| Targeted update | design of pb update: change one part of a design in place (planned) |
| Troubleshooting | common problems and fixes |
Limitations
Not reproduced automatically: CSS filters and backdrop blur, masks, 3D transforms, video frames,
canvas content and iframes (crop them from the reference screenshot with pb assets file ... --crop).
Penpot must have the font families the site uses (others are substituted and width-fitted).
penpot-agent is tested with self-hosted Penpot 2.18; it is an independent project, not affiliated
with Penpot or Kaleidos.
FAQ
How do I convert a website to a Penpot design?
Install penpot-agent, connect Penpot's MCP server, then run pb capture <url> and
pb rebuild --board "<name>" — or ask Claude Code with the plugin installed. The result is a Penpot
board with editable layers, checked against the live page pixel by pixel.
Is there an "HTML to Figma" equivalent for Penpot? Yes — this is one: it imports a rendered web page (HTML, CSS, fonts, SVG, images) into Penpot as native layers, and also measures how close the import is.
Does it work with design.penpot.app or only self-hosted Penpot?
Both, as long as the MCP server is enabled (official service, self-hosted, or the local
@penpot/mcp server). See docs/penpot-setup.md.
Is it an MCP server? No — it is an MCP client: a CLI and Claude Code plugin that uses Penpot's official MCP server and adds website capture, conversion, reliable bulk building and visual QA on top.
Can I use it without Claude or any AI?
Yes. pb is a normal command-line tool; the Claude Code plugin is optional.
Contributing
Bug reports, fixes and new features are welcome — please read CONTRIBUTING.md.
Every bug fix comes with a regression test, and the test page tests/fixtures/tricky.html collects
every web pattern that ever broke the pipeline. AI coding agents: see AGENTS.md.
License
GPL-3.0-or-later © Deepak and contributors.
Metadata
Release files for penpot-agent 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| penpot_agent-0.1.1.tar.gz | 434.7 kB | With provenance | Details for penpot_agent-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| penpot_agent-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for penpot_agent-0.1.1-py3-none-any.whl |
Total release size: 899.6 kB
Release files / penpot_agent-0.1.1.tar.gz
| Download URL | penpot_agent-0.1.1.tar.gz |
|---|---|
| Size | 434.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f4059b805d2dffa4bab5278b87e0c027b6978f1ebbd3d2b47f89b6e93e53a5a
|
|
BLAKE2b-256 checksum How to use checksums |
b271a5da22763a324b0b85d83ecb4b2ea7ae650fa4b1bc52dc7199c9b5135abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / penpot_agent-0.1.1-py3-none-any.whl
| Download URL | penpot_agent-0.1.1-py3-none-any.whl |
|---|---|
| Size | 464.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4502737fc7b4382b9a58d68cd4fd4c14a36e1149692221d773e271d51d92b706
|
|
BLAKE2b-256 checksum How to use checksums |
cb70be37a369983e1c8a026ea593bf01b383a38e5bdd3da94aba1ac82def2c5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for penpot-agent 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for penpot_agent-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.