Dr. Dominik Jain c3743930c2
🚑 Use base64 envelope for Uint8Array task results to avoid JSON expansion (#9431)
Resolves #9420 (critical memory usage issue in PROD deployment)

When the plugin's ExecuteCodeTaskHandler returns a Uint8Array (e.g. from penpotUtils.exportImage),
JSON.stringify previously serialized it as an object with numeric string keys,
causing ~10x payload expansion and large peak heap usage on the server side.

The plugin now wraps a top-level Uint8Array result in a tagged envelope
{ __type: "base64", data: <base64> }, and ImageContent.byteData decodes this envelope
on the server. The legacy numeric-keyed-object path is retained as a fallback for
compatibility with older plugin builds.
2026-05-07 23:50:20 +02:00
..
2026-03-23 11:20:37 +01:00
2026-02-04 12:22:36 +01:00
2026-03-31 12:15:12 +02:00
2026-02-04 12:22:36 +01:00
2026-02-04 12:22:36 +01:00

Penpot MCP Plugin

This project contains a Penpot plugin that accompanies the Penpot MCP server. It connects to the MCP server via WebSocket, subsequently allowing the MCP server to execute tasks in Penpot using the Plugin API.

Setup

  1. Install Dependencies

     pnpm install
    
  2. Build the Project

     pnpm run build
    
  3. Start a Local Development Server

     pnpm run start
    

    This will start a local development server at http://localhost:4400.