mirror of
https://github.com/penpot/penpot.git
synced 2026-11-18 16:12:24 +00:00
* 🐛 Make execute_code wait for save before success * 🐛 Address review feedback on waitForSave Reject with an Error carrying a `code`: save-timeout, rolled-back, save-retrying, or the failure code (save-failed by default). Lower the default timeout from 90s to 60s, leaving room for the 30s layout wait and the code under the MCP tool timeout. When persistence is already in error at the start of the wait, keep the stored failure code, and tell a failure Penpot keeps retrying apart from one that needs the file reopened. Share timeout validation with waitForLayoutUpdate through app.plugins.utils, and make reject-not-valid reject with an Error, which also fixes the string rejections of connectLibrary, restore, remove, pin, export, findVersions and saveVersion. The MCP execute_code handler now waits for the save only when the workspace is ready, like the layout wait, so dashboard calls no longer fail on a save error from an earlier file. Move the waitForSave tests to frontend-tests.plugins, add tests for the error codes, the retrying state and a failure during the wait, and add plugin API suite and MCP handler tests. Update the docs, CHANGELOG and the generated API files. AI-assisted-by: claude-opus-5-5
Penpot MCP Server
A Model Context Protocol (MCP) server that provides Penpot integration capabilities for AI clients supporting the model context protocol (MCP).
Setup
-
Install Dependencies
pnpm install -
Build the Project
pnpm run build -
Run the Server
pnpm run start
Penpot Plugin API REPL
The MCP server includes a REPL interface for testing Penpot Plugin API calls. To use it, connect to the URL reported at startup.