@pinepaper.studio/mcp-server 1.6.23 → 1.6.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/README.de.md +1 -1
  2. package/README.es.md +1 -1
  3. package/README.fr.md +1 -1
  4. package/README.hi.md +1 -1
  5. package/README.ja.md +1 -1
  6. package/README.ko.md +1 -1
  7. package/README.md +212 -17
  8. package/README.pt-BR.md +1 -1
  9. package/README.zh-CN.md +1 -1
  10. package/SECURITY.md +46 -0
  11. package/dist/agent/types.d.ts +114 -106
  12. package/dist/agent/types.d.ts.map +1 -1
  13. package/dist/agent/types.js +1 -1
  14. package/dist/agent/types.js.map +1 -1
  15. package/dist/browser/puppeteer-controller.d.ts +6 -0
  16. package/dist/browser/puppeteer-controller.d.ts.map +1 -1
  17. package/dist/browser/puppeteer-controller.js +99 -71
  18. package/dist/browser/puppeteer-controller.js.map +1 -1
  19. package/dist/build-info.json +2 -2
  20. package/dist/cli.js +7 -5
  21. package/dist/cli.js.map +1 -1
  22. package/dist/design/design-systems.js +2 -2
  23. package/dist/design/design-systems.js.map +1 -1
  24. package/dist/i18n/locales/en.js +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +63 -12
  28. package/dist/index.js.map +1 -1
  29. package/dist/mcp/index.d.ts +5 -0
  30. package/dist/mcp/index.d.ts.map +1 -0
  31. package/dist/mcp/index.js +5 -0
  32. package/dist/mcp/index.js.map +1 -0
  33. package/dist/mcp/server.d.ts +86 -0
  34. package/dist/mcp/server.d.ts.map +1 -0
  35. package/dist/mcp/server.js +159 -0
  36. package/dist/mcp/server.js.map +1 -0
  37. package/dist/mcp/stdio.d.ts +20 -0
  38. package/dist/mcp/stdio.d.ts.map +1 -0
  39. package/dist/mcp/stdio.js +82 -0
  40. package/dist/mcp/stdio.js.map +1 -0
  41. package/dist/mcp/types.d.ts +598 -0
  42. package/dist/mcp/types.d.ts.map +1 -0
  43. package/dist/mcp/types.js +140 -0
  44. package/dist/mcp/types.js.map +1 -0
  45. package/dist/metrics/performance-tracker.d.ts.map +1 -1
  46. package/dist/metrics/performance-tracker.js +4 -3
  47. package/dist/metrics/performance-tracker.js.map +1 -1
  48. package/dist/ontology/hints.d.ts.map +1 -1
  49. package/dist/ontology/hints.js +8 -2
  50. package/dist/ontology/hints.js.map +1 -1
  51. package/dist/ontology/upstream-vocabulary.d.ts +2 -2
  52. package/dist/ontology/upstream-vocabulary.d.ts.map +1 -1
  53. package/dist/ontology/upstream-vocabulary.js +8 -2
  54. package/dist/ontology/upstream-vocabulary.js.map +1 -1
  55. package/dist/ontology/vocabulary.d.ts.map +1 -1
  56. package/dist/ontology/vocabulary.js +1 -0
  57. package/dist/ontology/vocabulary.js.map +1 -1
  58. package/dist/server/index.d.ts +1 -1
  59. package/dist/server/index.d.ts.map +1 -1
  60. package/dist/server/index.js +1 -1
  61. package/dist/server/index.js.map +1 -1
  62. package/dist/tools/batch-macros.d.ts +27 -0
  63. package/dist/tools/batch-macros.d.ts.map +1 -0
  64. package/dist/tools/batch-macros.js +158 -0
  65. package/dist/tools/batch-macros.js.map +1 -0
  66. package/dist/tools/choreograph.d.ts.map +1 -1
  67. package/dist/tools/choreograph.js +2 -0
  68. package/dist/tools/choreograph.js.map +1 -1
  69. package/dist/tools/compact-descriptions.d.ts.map +1 -1
  70. package/dist/tools/compact-descriptions.js +8 -7
  71. package/dist/tools/compact-descriptions.js.map +1 -1
  72. package/dist/tools/craft-tools.d.ts +1 -1
  73. package/dist/tools/craft-tools.d.ts.map +1 -1
  74. package/dist/tools/create-known-keys.d.ts +2 -0
  75. package/dist/tools/create-known-keys.d.ts.map +1 -0
  76. package/dist/tools/create-known-keys.js +24 -0
  77. package/dist/tools/create-known-keys.js.map +1 -0
  78. package/dist/tools/definitions.d.ts +3 -1
  79. package/dist/tools/definitions.d.ts.map +1 -1
  80. package/dist/tools/definitions.js +122 -19
  81. package/dist/tools/definitions.js.map +1 -1
  82. package/dist/tools/effect-check.d.ts +1 -1
  83. package/dist/tools/effect-check.d.ts.map +1 -1
  84. package/dist/tools/effect-check.js +4 -0
  85. package/dist/tools/effect-check.js.map +1 -1
  86. package/dist/tools/engine-lists.d.ts +5 -2
  87. package/dist/tools/engine-lists.d.ts.map +1 -1
  88. package/dist/tools/engine-lists.js +10 -2
  89. package/dist/tools/engine-lists.js.map +1 -1
  90. package/dist/tools/engine-methods.d.ts.map +1 -1
  91. package/dist/tools/engine-methods.js +2 -0
  92. package/dist/tools/engine-methods.js.map +1 -1
  93. package/dist/tools/engine-surface.d.ts +1 -1
  94. package/dist/tools/engine-surface.d.ts.map +1 -1
  95. package/dist/tools/engine-surface.js +67 -6
  96. package/dist/tools/engine-surface.js.map +1 -1
  97. package/dist/tools/export-file-check.d.ts +31 -0
  98. package/dist/tools/export-file-check.d.ts.map +1 -0
  99. package/dist/tools/export-file-check.js +103 -0
  100. package/dist/tools/export-file-check.js.map +1 -0
  101. package/dist/tools/export-file-receipt.d.ts +68 -0
  102. package/dist/tools/export-file-receipt.d.ts.map +1 -0
  103. package/dist/tools/export-file-receipt.js +171 -0
  104. package/dist/tools/export-file-receipt.js.map +1 -0
  105. package/dist/tools/handlers/beats.d.ts +8 -45
  106. package/dist/tools/handlers/beats.d.ts.map +1 -1
  107. package/dist/tools/handlers/camera.d.ts +1 -1
  108. package/dist/tools/handlers/camera.d.ts.map +1 -1
  109. package/dist/tools/handlers/export.d.ts +1 -1
  110. package/dist/tools/handlers/export.d.ts.map +1 -1
  111. package/dist/tools/handlers/export.js +34 -8
  112. package/dist/tools/handlers/export.js.map +1 -1
  113. package/dist/tools/handlers/font.d.ts +1 -1
  114. package/dist/tools/handlers/font.d.ts.map +1 -1
  115. package/dist/tools/handlers/font.js +8 -7
  116. package/dist/tools/handlers/font.js.map +1 -1
  117. package/dist/tools/handlers/generate.d.ts +42 -271
  118. package/dist/tools/handlers/generate.d.ts.map +1 -1
  119. package/dist/tools/handlers/generate.js +4 -3
  120. package/dist/tools/handlers/generate.js.map +1 -1
  121. package/dist/tools/handlers/maps.d.ts +1 -1
  122. package/dist/tools/handlers/maps.d.ts.map +1 -1
  123. package/dist/tools/handlers/ontology.d.ts +1 -1
  124. package/dist/tools/handlers/ontology.d.ts.map +1 -1
  125. package/dist/tools/handlers/tool-guide.d.ts +1 -1
  126. package/dist/tools/handlers/tool-guide.d.ts.map +1 -1
  127. package/dist/tools/handlers.d.ts +82 -4
  128. package/dist/tools/handlers.d.ts.map +1 -1
  129. package/dist/tools/handlers.js +366 -89
  130. package/dist/tools/handlers.js.map +1 -1
  131. package/dist/tools/lane.d.ts +39 -0
  132. package/dist/tools/lane.d.ts.map +1 -0
  133. package/dist/tools/lane.js +247 -0
  134. package/dist/tools/lane.js.map +1 -0
  135. package/dist/tools/minimal-descriptions.d.ts.map +1 -1
  136. package/dist/tools/minimal-descriptions.js +3 -2
  137. package/dist/tools/minimal-descriptions.js.map +1 -1
  138. package/dist/tools/nested-ignored.d.ts +16 -0
  139. package/dist/tools/nested-ignored.d.ts.map +1 -0
  140. package/dist/tools/nested-ignored.js +83 -0
  141. package/dist/tools/nested-ignored.js.map +1 -0
  142. package/dist/tools/p5-compat/p5-helpers.d.ts +1 -1
  143. package/dist/tools/p5-compat/p5-helpers.js +1 -1
  144. package/dist/tools/shape-params.d.ts +2 -2
  145. package/dist/tools/shape-params.d.ts.map +1 -1
  146. package/dist/tools/shape-params.js +15 -2
  147. package/dist/tools/shape-params.js.map +1 -1
  148. package/dist/tools/stick-vocabulary.d.ts +4 -4
  149. package/dist/tools/stick-vocabulary.d.ts.map +1 -1
  150. package/dist/tools/stick-vocabulary.js +8 -4
  151. package/dist/tools/stick-vocabulary.js.map +1 -1
  152. package/dist/tools/timeline.d.ts +136 -0
  153. package/dist/tools/timeline.d.ts.map +1 -0
  154. package/dist/tools/timeline.js +1041 -0
  155. package/dist/tools/timeline.js.map +1 -0
  156. package/dist/tools/toolkits.d.ts +22 -7
  157. package/dist/tools/toolkits.d.ts.map +1 -1
  158. package/dist/tools/toolkits.js +113 -21
  159. package/dist/tools/toolkits.js.map +1 -1
  160. package/dist/types/code-generator.d.ts +55 -2
  161. package/dist/types/code-generator.d.ts.map +1 -1
  162. package/dist/types/code-generator.js +671 -202
  163. package/dist/types/code-generator.js.map +1 -1
  164. package/dist/types/schemas.d.ts +5281 -25048
  165. package/dist/types/schemas.d.ts.map +1 -1
  166. package/dist/types/schemas.js +81 -41
  167. package/dist/types/schemas.js.map +1 -1
  168. package/dist/utils/asset-paths.d.ts.map +1 -1
  169. package/dist/utils/asset-paths.js +4 -4
  170. package/dist/utils/asset-paths.js.map +1 -1
  171. package/dist/utils/env.d.ts +9 -0
  172. package/dist/utils/env.d.ts.map +1 -0
  173. package/dist/utils/env.js +11 -0
  174. package/dist/utils/env.js.map +1 -0
  175. package/dist/utils/export-dir.d.ts +36 -0
  176. package/dist/utils/export-dir.d.ts.map +1 -0
  177. package/dist/utils/export-dir.js +86 -0
  178. package/dist/utils/export-dir.js.map +1 -0
  179. package/dist/utils/js-literal.d.ts +4 -0
  180. package/dist/utils/js-literal.d.ts.map +1 -0
  181. package/dist/utils/js-literal.js +25 -0
  182. package/dist/utils/js-literal.js.map +1 -0
  183. package/dist/utils/mcp-log.d.ts +1 -1
  184. package/dist/utils/mcp-log.d.ts.map +1 -1
  185. package/dist/version.d.ts.map +1 -1
  186. package/dist/version.js +5 -12
  187. package/dist/version.js.map +1 -1
  188. package/manifest.json +46 -63
  189. package/package.json +15 -12
package/README.de.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  Der PinePaper MCP-Server lässt KI-Assistenten über das Model Context Protocol Grafiken in [PinePaper Studio](https://pinepaper.studio) erstellen und animieren. Funktioniert mit jeder KI, die MCP-Tool-Aufrufe unterstützt (Claude, GPT, Gemini, lokale Modelle usw.).
21
21
 
22
- Der Server bietet **177 Tools**: Zeichnen, Animation, Diagramme, Karten, Typografie, Physik, Bildbearbeitung, Datenvisualisierung und Export:
22
+ Der Server bietet **178 Tools**: Zeichnen, Animation, Diagramme, Karten, Typografie, Physik, Bildbearbeitung, Datenvisualisierung und Export:
23
23
 
24
24
  - Text, Formen, Geometrie und komplexe Grafiken erstellen
25
25
  - Mit deklarativen **Relationen** animieren statt mit Keyframes
package/README.es.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  El servidor MCP de PinePaper permite a los asistentes de IA crear y animar gráficos en [PinePaper Studio](https://pinepaper.studio) a través del Model Context Protocol. Funciona con cualquier IA que soporte llamadas a herramientas MCP (Claude, GPT, Gemini, modelos locales, etc.).
21
21
 
22
- Expone **177 herramientas**: dibujo, animación, diagramas, mapas, tipografía, física, edición de imágenes, visualización de datos y exportación:
22
+ Expone **178 herramientas**: dibujo, animación, diagramas, mapas, tipografía, física, edición de imágenes, visualización de datos y exportación:
23
23
 
24
24
  - Crear texto, formas, geometría y gráficos complejos
25
25
  - Animar con **relaciones** declarativas en lugar de fotogramas clave
package/README.fr.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  Le serveur MCP PinePaper permet aux assistants IA de créer et d'animer des graphiques dans [PinePaper Studio](https://pinepaper.studio) via le Model Context Protocol. Compatible avec toute IA gérant les appels d'outils MCP (Claude, GPT, Gemini, modèles locaux, etc.).
21
21
 
22
- Il expose **177 outils** : dessin, animation, diagrammes, cartes, typographie, physique, retouche d'image, visualisation de données et export :
22
+ Il expose **178 outils** : dessin, animation, diagrammes, cartes, typographie, physique, retouche d'image, visualisation de données et export :
23
23
 
24
24
  - Créer du texte, des formes, de la géométrie et des graphiques complexes
25
25
  - Animer avec des **relations** déclaratives plutôt que des images clés
package/README.hi.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  PinePaper MCP सर्वर AI असिस्टेंट्स को Model Context Protocol के ज़रिए [PinePaper Studio](https://pinepaper.studio) में ग्राफ़िक्स बनाने और एनिमेट करने देता है। MCP टूल कॉलिंग वाले किसी भी AI (Claude, GPT, Gemini, लोकल मॉडल आदि) के साथ काम करता है।
21
21
 
22
- सर्वर **177 टूल** देता है — ड्रॉइंग, एनिमेशन, डायग्राम, नक्शे, टाइपोग्राफ़ी, फिज़िक्स, इमेज एडिटिंग, डेटा विज़ुअलाइज़ेशन और एक्सपोर्ट:
22
+ सर्वर **178 टूल** देता है — ड्रॉइंग, एनिमेशन, डायग्राम, नक्शे, टाइपोग्राफ़ी, फिज़िक्स, इमेज एडिटिंग, डेटा विज़ुअलाइज़ेशन और एक्सपोर्ट:
23
23
 
24
24
  - टेक्स्ट, आकृतियाँ, ज्यामिति और जटिल ग्राफ़िक्स बनाना
25
25
  - कीफ़्रेम की जगह व्यवहार बताने वाले **रिलेशन** से एनिमेशन
package/README.ja.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  PinePaper MCP サーバーは、MCP 経由で AI アシスタントが [PinePaper Studio](https://pinepaper.studio) 上にグラフィックを作成・アニメーションさせるためのサーバーです。MCP ツールコールに対応した AI(Claude、GPT、Gemini、ローカルモデルなど)で動作します。
21
21
 
22
- **177 個のツール**を提供 — 描画・アニメーション・図・地図・タイポグラフィ・物理・画像編集・データ可視化・エクスポート:
22
+ **178 個のツール**を提供 — 描画・アニメーション・図・地図・タイポグラフィ・物理・画像編集・データ可視化・エクスポート:
23
23
 
24
24
  - テキスト、図形、ジオメトリ、複雑なグラフィックの作成
25
25
  - キーフレームではなく、ふるまいを宣言する**リレーション**でアニメーション
package/README.ko.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  PinePaper MCP 서버는 AI 어시스턴트가 MCP를 통해 [PinePaper Studio](https://pinepaper.studio)에서 그래픽을 만들고 애니메이션하게 해줍니다. MCP 툴 콜을 지원하는 모든 AI(Claude, GPT, Gemini, 로컬 모델 등)와 호환됩니다.
21
21
 
22
- **177개의 툴** 제공 — 드로잉, 애니메이션, 다이어그램, 지도, 타이포그래피, 물리, 이미지 편집, 데이터 시각화, 내보내기:
22
+ **178개의 툴** 제공 — 드로잉, 애니메이션, 다이어그램, 지도, 타이포그래피, 물리, 이미지 편집, 데이터 시각화, 내보내기:
23
23
 
24
24
  - 텍스트·도형·기하·복잡한 그래픽 생성
25
25
  - 키프레임 대신 행동을 선언하는 **릴레이션**으로 애니메이션
package/README.md CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
  PinePaper MCP Server enables AI assistants to create and animate graphics in [PinePaper Studio](https://pinepaper.studio) via the Model Context Protocol (MCP). Works with any AI that supports MCP tool calling (Claude, GPT, Gemini, local models, etc.).
32
32
 
33
- The server exposes **177 tools** across drawing, animation, diagrams, maps, typography, physics, image editing, data visualization, and export. Using natural language, you can:
33
+ The server exposes **178 tools** across drawing, animation, diagrams, maps, typography, physics, image editing, data visualization, and export. Using natural language, you can:
34
34
 
35
35
  - Create geometric shapes, text collages, diagrams, and data charts
36
36
  - Apply 37+ character-level text effects and 28+ vertex deformation presets
@@ -41,7 +41,7 @@ The server exposes **177 tools** across drawing, animation, diagrams, maps, typo
41
41
 
42
42
  ## Running it: local or hosted
43
43
 
44
- **Local is free and complete.** Every one of the 177 tools works when you run
44
+ **Local is free and complete.** Every one of the 178 tools works when you run
45
45
  this server yourself. There is no reduced tier and nothing held back.
46
46
 
47
47
  What it needs:
@@ -240,6 +240,8 @@ If you do not want an agent executing anything, `code` mode is a first-class pat
240
240
 
241
241
  **What guards execution.** On current engine builds the snippet goes through `app.runGenerated(code, { source: 'agent' })` — a governor with seeded determinism, loop and item budgets, and a machine-readable report — rather than a bare `eval`. Older engine builds fall back to `eval`.
242
242
 
243
+ **Found a vulnerability?** Report it privately, as [SECURITY.md](SECURITY.md) describes, not in a public issue.
244
+
243
245
  **What to weigh before running it.**
244
246
 
245
247
  - Code an agent writes runs with whatever that browser page has. Give this server the same trust you would give anything else you let write and run code on your machine — which is the trust you already extend to an MCP client with tool access.
@@ -247,6 +249,198 @@ If you do not want an agent executing anything, `code` mode is a first-class pat
247
249
  - Puppeteer itself is an **optional** peer dependency, kept out of the default tree precisely because a headless browser plus an install script is what scanners flag hardest. Install it only if you want the executing mode.
248
250
  - The server itself fetches the images, SVGs and media a tool call names by URL, and reads local files named by path. URLs that resolve to loopback, private, link-local or reserved addresses are refused, redirects included, and so are cloud metadata addresses. Local files are read only from the working directory, the export folder, and folders listed in `PINEPAPER_ASSET_DIRS`. `PINEPAPER_ALLOW_PRIVATE_NETWORK=1` allows local and LAN hosts. Metadata addresses stay refused even with it set.
249
251
 
252
+ ## What's new in 1.6.25
253
+
254
+ ### Added
255
+
256
+ - `pinepaper_pattern` kinds `ring` and `orbit`: members spaced evenly round a
257
+ turning circle, with a fixed `center` or a `target` item the centre follows.
258
+ The list of kinds now comes from the studio, so a kind it adds appears here
259
+ too.
260
+
261
+ ### Changed
262
+
263
+ - The server speaks MCP itself instead of through the MCP SDK, so installing
264
+ it pulls in 2 packages (`zod` and `undici`) instead of 78. It behaves the
265
+ same on the wire: the same protocol versions (2024-10-07 to 2025-11-25),
266
+ errors, progress, cancellation and logging, checked against recordings of
267
+ the previous server. `createServer()` still accepts any MCP transport,
268
+ including the SDK's.
269
+ - The published code no longer uses `eval` or runs `git`, and it reads
270
+ environment variables in one place.
271
+ - New sessions start with a leaner tool list: the `core` toolkit, about half
272
+ the context of the previous default, with every craft tool the server
273
+ recommends. Other tools load when needed with `pinepaper_set_toolkit`
274
+ `{"load": ["map"]}` (a group) or a tool's name, and the list updates at
275
+ once. Claude Desktop, Cursor and Windsurf used to get all 178 tools.
276
+ `PINEPAPER_TOOLKIT=agent` or `full` restores a larger list.
277
+ - Exports are saved to `~/Downloads/PinePaper` instead of a temporary folder,
278
+ so Desktop users can find them (`PINEPAPER_EXPORT_DIR` still overrides it,
279
+ and machines without a Downloads folder keep the temporary folder). Each
280
+ saved file also comes back as a link the client can open, and
281
+ `resources/read` returns files up to 10 MB from the export folder.
282
+ - A Claude Desktop extension (`.mcpb`) can be built with `bun run
283
+ build:mcpb`: one file to open, no config to edit. It uses your installed
284
+ Chrome for the canvas tools. Without full `puppeteer`, the server now also
285
+ works with `puppeteer-core` and your installed Chrome, or another browser
286
+ set in `PINEPAPER_CHROME_PATH`.
287
+
288
+ ### Fixed
289
+
290
+ - `pinepaper_pattern` no longer warns "NO CHANGE" after a `create` or
291
+ `modify` that has not moved anything yet, such as a wave at time 0 or one
292
+ whose window starts later.
293
+ - A failed batch step addressed by `$N` names the item that `$N` resolved to,
294
+ not `"$N"`.
295
+ - Batch `animate` and `relation` operations quote their `animationType` and
296
+ `relationType` correctly in the generated code.
297
+ - The scene lint that batches and custom code run on every call no longer
298
+ checks every pair of items, which made each call on a large scene slower.
299
+ It reports the same warnings.
300
+ - A video export that goes over the bitrate you asked for says so: the studio
301
+ reports `bitrate_exceeded` with the bitrate the file actually has, and how
302
+ to land under the target.
303
+ - The agent toolkit's export description now says what each format returns:
304
+ only MP4 and WebM carry a frame digest, and a small SVG comes back inline
305
+ rather than as a file.
306
+ - `on_event_fire_if` is documented: its predicate is an ExpressionIR object
307
+ (comparisons, and/or/not, reads of an item's data, active or visible
308
+ state), and it fires the event in `params.event`, not its target. A
309
+ predicate written as a string, or a relation with no event to fire, is
310
+ refused with the shape that works, wherever the relation comes from:
311
+ `pinepaper_add_relation`, a batch `relation` step, `pinepaper_create_scene`,
312
+ `pinepaper_instantiate_ontology`, or an `on_event_add_relation` that adds
313
+ one later. Before, the relation silently never fired.
314
+ - An emitter given a `[min, max]` range for a key that takes one number
315
+ (such as `gravity`, `opacity` or `count`) now gets a warning: the key draws
316
+ one value for every particle, not a spread. Before, there was no warning.
317
+ - `pinepaper_import_image` takes a `name`, so a batch `patch` can address an
318
+ imported image by name.
319
+ - Custom code that returns nothing is reported as returning nothing, not as
320
+ `{}`, when the scene lint has warnings.
321
+ - An export whose file was saved but could not be hashed or read back says
322
+ so. It used to report the save as failed.
323
+ - A batch step other than `create` that carries a key it does not read
324
+ now gets an `IGNORED ARGUMENTS` note naming the step and the key. Before,
325
+ the key had no effect and nothing said so. The common mix-ups get a hint:
326
+ `params` on a `relation` step (it takes `relationOptions`), and `x`/`y` on
327
+ a `modify` step (changes go inside `properties`).
328
+ - Clearing the canvas starts item ids again at `item_1`
329
+ (`pinepaper_clear_canvas`, `pinepaper_agent_start_job` and
330
+ `pinepaper_agent_reset`), so a batch sent after a clear gets the same ids
331
+ every time. Before, the numbering carried on from the cleared items, and
332
+ only a server restart reset it.
333
+ - A `group` step in a batch now takes the next `$N`, as a `create` does, so
334
+ a later step can animate the group: in `[create, create, group, …]` the
335
+ group is `$2`. This renumbers batches that create items after a group:
336
+ in `[create, create, group, create]` the last item was `$2` and is now
337
+ `$3`. Before, a `$N` meant for the group failed with "it has created 2 so
338
+ far".
339
+ - An event reaction that shows or hides an item (`on_event_set_visibility`,
340
+ and its `on_enter_` and `on_exit_` forms) refuses `value` and asks for
341
+ `visible`, the field it reads. Before, `{"value": false}` showed the item
342
+ instead of hiding it.
343
+ - A PNG, JPG, WebP, SVG or PDF of a scene that is playing is its first frame
344
+ (time 0), the frame a video starts on, and the result says so. Before, it
345
+ was whatever frame playback had reached, so items moved by relations (an
346
+ orbit) were in a different place on every export. `time` still picks
347
+ another moment.
348
+ - A closed shape given a `strokeColor` and no fill is drawn as an outline.
349
+ Before, it got the default fill, or the active brand's colour.
350
+ - A batch no longer flags `ttl` or `bornAt` on a `line` as a likely typo.
351
+ - A line created with `from` and `to` reports where it actually is, and says
352
+ that `position` does not move it: `from` and `to` are canvas coordinates.
353
+ Before, the result reported the position asked for while the line was
354
+ drawn at the top left.
355
+ - `pinepaper_transform` `nudge` moves an item the way `pinepaper_modify_item`
356
+ does, so an item with a loop animation keeps its new place, and the
357
+ result no longer reports the move as no change.
358
+ - `create_item` documents `properties.id`: an id of your own, so replays
359
+ address the same items. An id with a quote, backslash or line break is
360
+ refused, since later calls could not address it.
361
+ - An item id containing a quote no longer breaks `pinepaper_modify_item`,
362
+ `pinepaper_delete_item`, `pinepaper_animate`,
363
+ `pinepaper_keyframe_animate`, `pinepaper_apply_effect` or
364
+ `pinepaper_query_relations`. Before, the call failed with a syntax error.
365
+ - The `lane` toolkit adds `pinepaper_event`, for things that happen at a
366
+ set time or on a click (a panel that hides at 3 s), and
367
+ `pinepaper_clear_canvas`, to start over. Its batch description shows how
368
+ to attach an event's reactions and triggers.
369
+
370
+ ## What's new in 1.6.24
371
+
372
+ ### Added
373
+
374
+ - `pinepaper_pattern`: one stored declaration moves many items, with no
375
+ keyframes on each. `phase_wave` sends a wave through the members, `stagger`
376
+ offsets them in turn. Members are chosen by id, by name pattern or by tag.
377
+ `create`, `modify`, `remove`, `list` and `get` manage patterns afterwards.
378
+ - A five-tool toolkit for agents, `PINEPAPER_TOOLKIT=lane`:
379
+ `pinepaper_agent_batch_execute`, `pinepaper_keyframe_animate`,
380
+ `pinepaper_pattern`, `pinepaper_agent_export` and `pinepaper_lint_scene`,
381
+ with descriptions written to be read on their own.
382
+ - Batch operations `ring`, `grid`, `orbit`, `stagger` and `patch`.
383
+ - `ring` and `grid` lay out many items in one operation. Each item is made
384
+ the same way `create` makes it and fills the next `$N` slot.
385
+ - `orbit` binds an orbiting item to a centre, making the orbiting item if
386
+ you pass `itemType`.
387
+ - `stagger` plays the same keyframes on several items, one after another.
388
+ - `patch` changes an item by its name.
389
+ - Batch operation `timeline`: GSAP-style tweens written as JSON (`to`, `from`,
390
+ `at`, `stagger`, `ease`, `repeat`, `yoyo`, labels), turned into ordinary
391
+ keyframe tracks, so the result exports, saves and edits like hand-written
392
+ keyframes. A tween that cannot be built is refused before anything runs,
393
+ with the path of the bad value. The result says what each tween became.
394
+ - `pinepaper_agent_export` returns the saved file's `sha256` and size. When
395
+ the studio reports per-frame hashes, it also returns a `frameDigest`, so two
396
+ renders can be compared in one field. When `ffprobe` is installed, the saved
397
+ video is checked against what the studio encoded, and any field that
398
+ disagrees is named (`PINEPAPER_FFPROBE=off` turns this off).
399
+ - `pinepaper_execute_custom_code` and `pinepaper_agent_batch_execute` return
400
+ the scene lint's warnings (`lintWarnings`), such as a title that runs out of
401
+ the frame. Every failed step is listed in `failures` as
402
+ `{ step, itemId, reason }`.
403
+
404
+ ### Fixed
405
+
406
+ - An atomic batch that fails removes the items it created, so it can be fixed
407
+ and sent again without making them twice. Changes it made to items that
408
+ already existed are not undone, and the result says what was removed.
409
+ - An argument a tool ignores is now also named when it is nested, at its full
410
+ path (for example `keyframes[1].ease`). Keys that a batch operation reads
411
+ directly (`content`, `fontSize`, `x`, `y`, `timeOffset` and the like) are
412
+ not reported.
413
+ - No export reports success without a file. Every saved file is read back
414
+ from disk and must exist and not be empty. A failure names its step, the
415
+ path and the reason.
416
+ - A batch `modify` or `patch` addressed by a name that several items hold is
417
+ refused, and the result lists their ids. It used to change whichever of them
418
+ was made first.
419
+ - Item ids and colours in batch operations are always quoted correctly in the
420
+ generated code.
421
+ - `pinepaper_choreograph` with `sound: true` now plays a launch sound at the
422
+ start of a `bounce`, as it already did for a `hop`.
423
+ - `pinepaper_emitter` accepts `velocities` and `offsets` written as
424
+ `[{ x, y }, …]` as well as `[[x, y], …]`. Before, the object form was
425
+ dropped and the particles had no velocity. The reply now warns when a
426
+ burst's `count` differs from the number of `velocities`.
427
+ - A `letterSpacing` set on a text item in `pinepaper_create_item` or
428
+ `pinepaper_modify_item` is applied. It was reported as ignored at creation
429
+ and only took effect through keyframes.
430
+
431
+ ### Security
432
+
433
+ - `pinepaper_import_scene` reads only from the working directory, the export
434
+ folder and `PINEPAPER_ASSET_DIRS`, like image and media imports. A path
435
+ outside them gets the same refusal whether or not the file exists, so the
436
+ error no longer shows what is on disk. Restoring a scene that
437
+ `pinepaper_export_scene` saved still works: it saves to the export folder.
438
+ - The `pinepaper://docs/readme` resource accepts only a language code after
439
+ the slash (such as `/ja` or `/pt-BR`). Anything else is refused.
440
+ - Dependency updates clear published advisories in `body-parser`, `fast-uri`,
441
+ `ip-address`, `hono` and `zod` (now zod 4).
442
+ - [SECURITY.md](SECURITY.md) explains how to report a vulnerability privately.
443
+
250
444
  ## What's new in 1.6.23
251
445
 
252
446
  ### Fixed
@@ -1635,32 +1829,26 @@ Fourteen new tools (121 → 135) and new actions across the surface — the rele
1635
1829
 
1636
1830
  ## Toolkits & Token Budget
1637
1831
 
1638
- 177 tools is a lot of context. The server ships a **toolkit** system that serves only the tools a given client needs, plus a **verbosity** system that controls how long each tool description is.
1832
+ 178 tools is a lot of context. The server ships a **toolkit** system that serves only the tools a given client needs, plus a **verbosity** system that controls how long each tool description is.
1639
1833
 
1640
1834
  **Toolkit profiles** (`PINEPAPER_TOOLKIT`):
1641
1835
 
1642
1836
  | Profile | Contents |
1643
1837
  |---------|----------|
1838
+ | `core` | **The default.** The craft tools the server's instructions point to, the agent workflow, canvas and query tools, plus every tool those name, so no listed tool points at a missing one. About half the tokens of `agent`. Anything else loads on demand (below) |
1644
1839
  | `full` | Every tool, no filtering |
1645
- | `agent` | Every tool except the diagnostics (`pinepaper_get_performance_metrics`, `pinepaper_diagnostic_report`) and `pinepaper_register_item`. The default for a client not listed below |
1840
+ | `agent` | Every tool except the diagnostics (`pinepaper_get_performance_metrics`, `pinepaper_diagnostic_report`) and `pinepaper_register_item` |
1646
1841
  | `diagram` | Canvas + diagram + query/export |
1647
1842
  | `map` | Canvas + map + query/export |
1648
1843
  | `font` | Canvas + font + letter collage + export |
1649
1844
  | `minimal` | Agent, browser, canvas, and guide only |
1845
+ | `lane` | **The agent lane**: exactly seven tools — `pinepaper_agent_batch_execute`, `pinepaper_keyframe_animate`, `pinepaper_pattern`, `pinepaper_agent_export`, `pinepaper_lint_scene`, `pinepaper_event`, `pinepaper_clear_canvas` — shown with descriptions that carry the rules an agent otherwise learns by failing (the keyframe shape, an item's words and look inside `properties`, a position being the item's centre, the export's 5 s default). The whole contract, instructions included, is ~4.3k tokens. For scripted builds of shapes, text, keyframes and relations; use `core` for characters, styled scenes, maps, diagrams and sound |
1650
1846
 
1651
1847
  **Verbosity tiers** (`PINEPAPER_VERBOSITY`): `verbose`, `compact` (default), `minimal`.
1652
1848
 
1653
- **Client auto-detection.** When neither env var is set explicitly, the server picks a profile from the MCP `initialize` handshake:
1654
-
1655
- | Client | Toolkit | Verbosity |
1656
- |--------|---------|-----------|
1657
- | `claude-ai` | `minimal` | `compact` |
1658
- | `claude-desktop` | `full` | `compact` |
1659
- | `claude-code` | `agent` | `compact` |
1660
- | `cursor` | `full` | `compact` |
1661
- | `windsurf` | `full` | `compact` |
1849
+ **Load on demand.** Every client starts on `core`. When a task needs more, the model calls `pinepaper_set_toolkit` with `load`: a group (`{"load": ["map"]}`, `["diagram"]`, `["font"]`, `["physics"]`, …) or a tool's own name. The tools are added for the session, along with any tools they mention, and the client is told the list changed. The server logs each client's name at start-up.
1662
1850
 
1663
- Explicit env vars always win. You can also hand-pick tools with `PINEPAPER_TOOLS` (comma-separated names), or switch profiles at runtime with the `pinepaper_set_toolkit` tool. Start with `pinepaper_tool_guide` to have the server explain its own surface.
1851
+ `PINEPAPER_TOOLKIT` always wins. You can also hand-pick tools with `PINEPAPER_TOOLS` (comma-separated names), or switch profiles at runtime with the `pinepaper_set_toolkit` tool. Start with `pinepaper_tool_guide` to have the server explain its own surface.
1664
1852
 
1665
1853
  ## Features
1666
1854
 
@@ -1838,7 +2026,7 @@ Generate instruction/code pairs for LLM fine-tuning:
1838
2026
 
1839
2027
  ## Tools Reference
1840
2028
 
1841
- All 177 tools, grouped by the tag used for toolkit filtering.
2029
+ All 178 tools, grouped by the tag used for toolkit filtering.
1842
2030
 
1843
2031
  ### Canvas (`canvas`)
1844
2032
  | Tool | Description |
@@ -1903,6 +2091,7 @@ All 177 tools, grouped by the tag used for toolkit filtering.
1903
2091
  | `pinepaper_choreograph` | Acting for any item: hop, bounce, roll, fly, peek with squash and stretch |
1904
2092
  | `pinepaper_play_timeline` | Control playback, rate, progress, scroll-driven scrubbing |
1905
2093
  | `pinepaper_stagger` | Shape a delay across many items |
2094
+ | `pinepaper_pattern` | Move many items with one stored declaration (wave, stagger) |
1906
2095
  | `pinepaper_flip` | Animate a layout change without describing the motion |
1907
2096
  | `pinepaper_get_animatable_properties` | List animatable properties |
1908
2097
  | `pinepaper_get_available_easings` | List easing functions |
@@ -2244,6 +2433,10 @@ bun install
2244
2433
  bun run build
2245
2434
  ```
2246
2435
 
2436
+ ### Claude Desktop extension (.mcpb)
2437
+
2438
+ `bun run build:mcpb` builds `mcpb/pinepaper-mcp-server-<version>.mcpb`, a one-file Claude Desktop extension: open it and Desktop installs the server, with no config file to edit. The extension drives your installed Google Chrome (choose another Chromium-based browser in its settings), and its settings also set the export folder and the tool list.
2439
+
2247
2440
  ### Test with MCP Client (Local)
2248
2441
 
2249
2442
  1. Build the server:
@@ -2359,9 +2552,10 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
2359
2552
  | `PINEPAPER_API_KEY` | Service-account key (`pp_sa_…`) for the cloud-backed tools (`pinepaper_generate`) | — |
2360
2553
  | `PINEPAPER_CLOUD_URL` | The PinePaper cloud those tools call | `https://cloud.pinepaper.studio` |
2361
2554
  | `PINEPAPER_EXECUTION_MODE` | `puppeteer` (execute in a real browser) or `code` (return generated code only) | `puppeteer` |
2362
- | `PINEPAPER_EXPORT_DIR` | Directory for exported files | `<tmpdir>/pinepaper-exports` |
2555
+ | `PINEPAPER_CHROME_PATH` | A Chromium-based browser for the canvas tools when full `puppeteer` is not installed (the Desktop extension uses your installed Chrome by default) | installed Google Chrome |
2556
+ | `PINEPAPER_EXPORT_DIR` | Directory for exported files | `~/Downloads/PinePaper` (`<tmpdir>/pinepaper-exports` where there is no Downloads folder) |
2363
2557
  | `PINEPAPER_LOCALE` | Language locale code | `en` |
2364
- | `PINEPAPER_TOOLKIT` | Toolkit profile (`full`/`agent`/`diagram`/`map`/`font`/`minimal`) | auto-detected |
2558
+ | `PINEPAPER_TOOLKIT` | Toolkit profile (`core`/`full`/`agent`/`diagram`/`map`/`font`/`minimal`/`lane`) | `core` |
2365
2559
  | `PINEPAPER_TOOLS` | Explicit comma-separated tool allowlist | unset |
2366
2560
  | `PINEPAPER_VERBOSITY` | Description verbosity (`verbose`/`compact`/`minimal`) | `compact` |
2367
2561
  | `PINEPAPER_TOOL_VERBOSITY` | Deprecated alias for `PINEPAPER_VERBOSITY` | unset |
@@ -2375,6 +2569,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
2375
2569
  | `PINEPAPER_GOVERNOR` | `off` runs code by raw eval — no governor report, no error codes, no seeded determinism | on |
2376
2570
  | `PINEPAPER_ASSET_DIRS` | Extra folders local image and media imports may read from, separated by `:` (`;` on Windows). The working directory and the export folder are always allowed | unset |
2377
2571
  | `PINEPAPER_ALLOW_PRIVATE_NETWORK` | `1` lets URL imports reach loopback, private and LAN addresses, for a local dev server. Cloud metadata addresses stay refused | unset |
2572
+ | `PINEPAPER_FFPROBE` | `off` skips the ffprobe check of a saved video export. Without `ffprobe` on `PATH` the check is skipped and the result says so | on |
2378
2573
 
2379
2574
  Behind a proxy, or against a Studio with analytics or polling connections open,
2380
2575
  `networkidle2` may never settle: set `PINEPAPER_WAIT_UNTIL` only if you need the
package/README.pt-BR.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  O servidor MCP do PinePaper permite que assistentes de IA criem e animem gráficos no [PinePaper Studio](https://pinepaper.studio) via Model Context Protocol. Funciona com qualquer IA que suporte chamadas de ferramenta MCP (Claude, GPT, Gemini, modelos locais etc.).
21
21
 
22
- São **177 ferramentas**: desenho, animação, diagramas, mapas, tipografia, física, edição de imagens, visualização de dados e exportação:
22
+ São **178 ferramentas**: desenho, animação, diagramas, mapas, tipografia, física, edição de imagens, visualização de dados e exportação:
23
23
 
24
24
  - Criar texto, formas, geometria e gráficos complexos
25
25
  - Animar com **relações** declarativas em vez de keyframes
package/README.zh-CN.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  PinePaper MCP 服务器让 AI 助手通过 MCP 协议在 [PinePaper Studio](https://pinepaper.studio) 中创建和驱动图形动画。兼容任何支持 MCP 工具调用的 AI(Claude、GPT、Gemini、本地模型等)。
21
21
 
22
- 服务器提供 **177 个工具**,覆盖绘图、动画、图表、地图、排版、物理、图像编辑、数据可视化与导出:
22
+ 服务器提供 **178 个工具**,覆盖绘图、动画、图表、地图、排版、物理、图像编辑、数据可视化与导出:
23
23
 
24
24
  - 创建文本、形状、几何图形与复杂图稿
25
25
  - 用行为驱动的**关系(relations)**做动画,而不是逐帧关键帧
package/SECURITY.md ADDED
@@ -0,0 +1,46 @@
1
+ # Security policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Please report security issues privately, through GitHub's private vulnerability reporting:
6
+
7
+ **[Report a vulnerability](https://github.com/pinepaper/mcp-server/security/advisories/new)**
8
+
9
+ Please don't open a public issue, pull request or discussion for a security problem. A private report reaches the maintainers without exposing users before a fix is out.
10
+
11
+ A useful report includes:
12
+
13
+ - the version of `@pinepaper.studio/mcp-server` (`npx @pinepaper.studio/mcp-server --version`, or the version in your MCP client's config);
14
+ - the tool call or input that triggers it, and what happens as a result;
15
+ - the execution mode (`puppeteer` or `code`) and any `PINEPAPER_*` environment variables you set;
16
+ - what an attacker gains, and what they need to control to get it (for example, a URL in a tool call, a file on disk, or a web page the server visits).
17
+
18
+ You don't need a working exploit. If you aren't sure whether something counts, report it anyway.
19
+
20
+ ## What happens next
21
+
22
+ The report becomes a draft security advisory that only you and the maintainers can see. We follow up in that thread: to confirm the issue, ask questions, and tell you which release fixes it. Once a fixed version is published to npm, we publish the advisory with the affected and fixed versions, and request a CVE for it. With your agreement, we credit you by name.
23
+
24
+ ## Supported versions
25
+
26
+ Fixes ship in a new patch release of the latest version. Older versions do not get backported fixes, so upgrade to the latest release to pick one up:
27
+
28
+ ```
29
+ npm install @pinepaper.studio/mcp-server@latest
30
+ ```
31
+
32
+ ## Scope
33
+
34
+ This package is an MCP server that runs on your machine and drives PinePaper Studio in a browser page.
35
+
36
+ **Executing JavaScript in the studio page is the design, not a vulnerability.** Every tool compiles to a snippet that runs against your canvas, and `pinepaper_execute_custom_code` runs a snippet the agent writes. The README's [security section](README.md#security-yes-it-executes-code) explains what runs where, and how `code` mode avoids executing anything.
37
+
38
+ Examples of what is in scope:
39
+
40
+ - the server process fetching what it should not, such as private or loopback addresses or cloud metadata endpoints (server-side request forgery);
41
+ - reading or writing files outside the folders the server is allowed to use (path traversal);
42
+ - tool input that escapes the generated snippet and runs in the server process instead of the page;
43
+ - exposing a credential such as `PINEPAPER_API_KEY`, or sending it somewhere it should not go;
44
+ - a crash or hang of the server caused by a single crafted tool call.
45
+
46
+ The server's own defences, `PINEPAPER_ALLOW_PRIVATE_NETWORK` and `PINEPAPER_ASSET_DIRS`, are documented in the README. Bypassing either one is in scope.