@pinepaper.studio/mcp-server 1.0.0

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 (295) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +406 -0
  3. package/dist/__tests__/fixtures/index.d.ts +8 -0
  4. package/dist/__tests__/fixtures/index.d.ts.map +1 -0
  5. package/dist/__tests__/fixtures/index.js +8 -0
  6. package/dist/__tests__/fixtures/index.js.map +1 -0
  7. package/dist/__tests__/fixtures/mock-animations.d.ts +213 -0
  8. package/dist/__tests__/fixtures/mock-animations.d.ts.map +1 -0
  9. package/dist/__tests__/fixtures/mock-animations.js +96 -0
  10. package/dist/__tests__/fixtures/mock-animations.js.map +1 -0
  11. package/dist/__tests__/fixtures/mock-generators.d.ts +147 -0
  12. package/dist/__tests__/fixtures/mock-generators.d.ts.map +1 -0
  13. package/dist/__tests__/fixtures/mock-generators.js +90 -0
  14. package/dist/__tests__/fixtures/mock-generators.js.map +1 -0
  15. package/dist/__tests__/fixtures/mock-items.d.ts +157 -0
  16. package/dist/__tests__/fixtures/mock-items.d.ts.map +1 -0
  17. package/dist/__tests__/fixtures/mock-items.js +74 -0
  18. package/dist/__tests__/fixtures/mock-items.js.map +1 -0
  19. package/dist/__tests__/fixtures/mock-relations.d.ts +147 -0
  20. package/dist/__tests__/fixtures/mock-relations.d.ts.map +1 -0
  21. package/dist/__tests__/fixtures/mock-relations.js +90 -0
  22. package/dist/__tests__/fixtures/mock-relations.js.map +1 -0
  23. package/dist/browser/bridge.d.ts +127 -0
  24. package/dist/browser/bridge.d.ts.map +1 -0
  25. package/dist/browser/bridge.js +320 -0
  26. package/dist/browser/bridge.js.map +1 -0
  27. package/dist/browser/index.d.ts +8 -0
  28. package/dist/browser/index.d.ts.map +1 -0
  29. package/dist/browser/index.js +8 -0
  30. package/dist/browser/index.js.map +1 -0
  31. package/dist/browser/puppeteer-controller.d.ts +93 -0
  32. package/dist/browser/puppeteer-controller.d.ts.map +1 -0
  33. package/dist/browser/puppeteer-controller.js +280 -0
  34. package/dist/browser/puppeteer-controller.js.map +1 -0
  35. package/dist/cli.d.ts +8 -0
  36. package/dist/cli.d.ts.map +1 -0
  37. package/dist/cli.js +109 -0
  38. package/dist/cli.js.map +1 -0
  39. package/dist/i18n/i18n-manager.d.ts +88 -0
  40. package/dist/i18n/i18n-manager.d.ts.map +1 -0
  41. package/dist/i18n/i18n-manager.js +209 -0
  42. package/dist/i18n/i18n-manager.js.map +1 -0
  43. package/dist/i18n/index.d.ts +10 -0
  44. package/dist/i18n/index.d.ts.map +1 -0
  45. package/dist/i18n/index.js +10 -0
  46. package/dist/i18n/index.js.map +1 -0
  47. package/dist/i18n/locales/ar.d.ts +6 -0
  48. package/dist/i18n/locales/ar.d.ts.map +1 -0
  49. package/dist/i18n/locales/ar.js +106 -0
  50. package/dist/i18n/locales/ar.js.map +1 -0
  51. package/dist/i18n/locales/base.d.ts +17 -0
  52. package/dist/i18n/locales/base.d.ts.map +1 -0
  53. package/dist/i18n/locales/base.js +213 -0
  54. package/dist/i18n/locales/base.js.map +1 -0
  55. package/dist/i18n/locales/bn.d.ts +6 -0
  56. package/dist/i18n/locales/bn.d.ts.map +1 -0
  57. package/dist/i18n/locales/bn.js +106 -0
  58. package/dist/i18n/locales/bn.js.map +1 -0
  59. package/dist/i18n/locales/chp.d.ts +8 -0
  60. package/dist/i18n/locales/chp.d.ts.map +1 -0
  61. package/dist/i18n/locales/chp.js +11 -0
  62. package/dist/i18n/locales/chp.js.map +1 -0
  63. package/dist/i18n/locales/cr.d.ts +8 -0
  64. package/dist/i18n/locales/cr.d.ts.map +1 -0
  65. package/dist/i18n/locales/cr.js +11 -0
  66. package/dist/i18n/locales/cr.js.map +1 -0
  67. package/dist/i18n/locales/crg.d.ts +8 -0
  68. package/dist/i18n/locales/crg.d.ts.map +1 -0
  69. package/dist/i18n/locales/crg.js +11 -0
  70. package/dist/i18n/locales/crg.js.map +1 -0
  71. package/dist/i18n/locales/cs.d.ts +6 -0
  72. package/dist/i18n/locales/cs.d.ts.map +1 -0
  73. package/dist/i18n/locales/cs.js +106 -0
  74. package/dist/i18n/locales/cs.js.map +1 -0
  75. package/dist/i18n/locales/da.d.ts +6 -0
  76. package/dist/i18n/locales/da.d.ts.map +1 -0
  77. package/dist/i18n/locales/da.js +106 -0
  78. package/dist/i18n/locales/da.js.map +1 -0
  79. package/dist/i18n/locales/de.d.ts +6 -0
  80. package/dist/i18n/locales/de.d.ts.map +1 -0
  81. package/dist/i18n/locales/de.js +106 -0
  82. package/dist/i18n/locales/de.js.map +1 -0
  83. package/dist/i18n/locales/el.d.ts +6 -0
  84. package/dist/i18n/locales/el.d.ts.map +1 -0
  85. package/dist/i18n/locales/el.js +106 -0
  86. package/dist/i18n/locales/el.js.map +1 -0
  87. package/dist/i18n/locales/en.d.ts +6 -0
  88. package/dist/i18n/locales/en.d.ts.map +1 -0
  89. package/dist/i18n/locales/en.js +383 -0
  90. package/dist/i18n/locales/en.js.map +1 -0
  91. package/dist/i18n/locales/es.d.ts +6 -0
  92. package/dist/i18n/locales/es.d.ts.map +1 -0
  93. package/dist/i18n/locales/es.js +106 -0
  94. package/dist/i18n/locales/es.js.map +1 -0
  95. package/dist/i18n/locales/fa.d.ts +6 -0
  96. package/dist/i18n/locales/fa.d.ts.map +1 -0
  97. package/dist/i18n/locales/fa.js +106 -0
  98. package/dist/i18n/locales/fa.js.map +1 -0
  99. package/dist/i18n/locales/fi.d.ts +6 -0
  100. package/dist/i18n/locales/fi.d.ts.map +1 -0
  101. package/dist/i18n/locales/fi.js +106 -0
  102. package/dist/i18n/locales/fi.js.map +1 -0
  103. package/dist/i18n/locales/fil.d.ts +6 -0
  104. package/dist/i18n/locales/fil.d.ts.map +1 -0
  105. package/dist/i18n/locales/fil.js +383 -0
  106. package/dist/i18n/locales/fil.js.map +1 -0
  107. package/dist/i18n/locales/fr.d.ts +6 -0
  108. package/dist/i18n/locales/fr.d.ts.map +1 -0
  109. package/dist/i18n/locales/fr.js +106 -0
  110. package/dist/i18n/locales/fr.js.map +1 -0
  111. package/dist/i18n/locales/gu.d.ts +6 -0
  112. package/dist/i18n/locales/gu.d.ts.map +1 -0
  113. package/dist/i18n/locales/gu.js +106 -0
  114. package/dist/i18n/locales/gu.js.map +1 -0
  115. package/dist/i18n/locales/he.d.ts +6 -0
  116. package/dist/i18n/locales/he.d.ts.map +1 -0
  117. package/dist/i18n/locales/he.js +106 -0
  118. package/dist/i18n/locales/he.js.map +1 -0
  119. package/dist/i18n/locales/hi.d.ts +6 -0
  120. package/dist/i18n/locales/hi.d.ts.map +1 -0
  121. package/dist/i18n/locales/hi.js +106 -0
  122. package/dist/i18n/locales/hi.js.map +1 -0
  123. package/dist/i18n/locales/hu.d.ts +6 -0
  124. package/dist/i18n/locales/hu.d.ts.map +1 -0
  125. package/dist/i18n/locales/hu.js +106 -0
  126. package/dist/i18n/locales/hu.js.map +1 -0
  127. package/dist/i18n/locales/id.d.ts +6 -0
  128. package/dist/i18n/locales/id.d.ts.map +1 -0
  129. package/dist/i18n/locales/id.js +106 -0
  130. package/dist/i18n/locales/id.js.map +1 -0
  131. package/dist/i18n/locales/index.d.ts +110 -0
  132. package/dist/i18n/locales/index.d.ts.map +1 -0
  133. package/dist/i18n/locales/index.js +123 -0
  134. package/dist/i18n/locales/index.js.map +1 -0
  135. package/dist/i18n/locales/is.d.ts +6 -0
  136. package/dist/i18n/locales/is.d.ts.map +1 -0
  137. package/dist/i18n/locales/is.js +383 -0
  138. package/dist/i18n/locales/is.js.map +1 -0
  139. package/dist/i18n/locales/it.d.ts +6 -0
  140. package/dist/i18n/locales/it.d.ts.map +1 -0
  141. package/dist/i18n/locales/it.js +106 -0
  142. package/dist/i18n/locales/it.js.map +1 -0
  143. package/dist/i18n/locales/iu.d.ts +8 -0
  144. package/dist/i18n/locales/iu.d.ts.map +1 -0
  145. package/dist/i18n/locales/iu.js +11 -0
  146. package/dist/i18n/locales/iu.js.map +1 -0
  147. package/dist/i18n/locales/ja.d.ts +6 -0
  148. package/dist/i18n/locales/ja.d.ts.map +1 -0
  149. package/dist/i18n/locales/ja.js +106 -0
  150. package/dist/i18n/locales/ja.js.map +1 -0
  151. package/dist/i18n/locales/kn.d.ts +6 -0
  152. package/dist/i18n/locales/kn.d.ts.map +1 -0
  153. package/dist/i18n/locales/kn.js +106 -0
  154. package/dist/i18n/locales/kn.js.map +1 -0
  155. package/dist/i18n/locales/ko.d.ts +6 -0
  156. package/dist/i18n/locales/ko.d.ts.map +1 -0
  157. package/dist/i18n/locales/ko.js +106 -0
  158. package/dist/i18n/locales/ko.js.map +1 -0
  159. package/dist/i18n/locales/mic.d.ts +8 -0
  160. package/dist/i18n/locales/mic.d.ts.map +1 -0
  161. package/dist/i18n/locales/mic.js +11 -0
  162. package/dist/i18n/locales/mic.js.map +1 -0
  163. package/dist/i18n/locales/ml.d.ts +6 -0
  164. package/dist/i18n/locales/ml.d.ts.map +1 -0
  165. package/dist/i18n/locales/ml.js +106 -0
  166. package/dist/i18n/locales/ml.js.map +1 -0
  167. package/dist/i18n/locales/moh.d.ts +8 -0
  168. package/dist/i18n/locales/moh.d.ts.map +1 -0
  169. package/dist/i18n/locales/moh.js +11 -0
  170. package/dist/i18n/locales/moh.js.map +1 -0
  171. package/dist/i18n/locales/mr.d.ts +6 -0
  172. package/dist/i18n/locales/mr.d.ts.map +1 -0
  173. package/dist/i18n/locales/mr.js +106 -0
  174. package/dist/i18n/locales/mr.js.map +1 -0
  175. package/dist/i18n/locales/ms.d.ts +6 -0
  176. package/dist/i18n/locales/ms.d.ts.map +1 -0
  177. package/dist/i18n/locales/ms.js +106 -0
  178. package/dist/i18n/locales/ms.js.map +1 -0
  179. package/dist/i18n/locales/nl.d.ts +6 -0
  180. package/dist/i18n/locales/nl.d.ts.map +1 -0
  181. package/dist/i18n/locales/nl.js +106 -0
  182. package/dist/i18n/locales/nl.js.map +1 -0
  183. package/dist/i18n/locales/no.d.ts +6 -0
  184. package/dist/i18n/locales/no.d.ts.map +1 -0
  185. package/dist/i18n/locales/no.js +106 -0
  186. package/dist/i18n/locales/no.js.map +1 -0
  187. package/dist/i18n/locales/oj.d.ts +8 -0
  188. package/dist/i18n/locales/oj.d.ts.map +1 -0
  189. package/dist/i18n/locales/oj.js +11 -0
  190. package/dist/i18n/locales/oj.js.map +1 -0
  191. package/dist/i18n/locales/pa.d.ts +6 -0
  192. package/dist/i18n/locales/pa.d.ts.map +1 -0
  193. package/dist/i18n/locales/pa.js +106 -0
  194. package/dist/i18n/locales/pa.js.map +1 -0
  195. package/dist/i18n/locales/pl.d.ts +6 -0
  196. package/dist/i18n/locales/pl.d.ts.map +1 -0
  197. package/dist/i18n/locales/pl.js +106 -0
  198. package/dist/i18n/locales/pl.js.map +1 -0
  199. package/dist/i18n/locales/pt-BR.d.ts +6 -0
  200. package/dist/i18n/locales/pt-BR.d.ts.map +1 -0
  201. package/dist/i18n/locales/pt-BR.js +106 -0
  202. package/dist/i18n/locales/pt-BR.js.map +1 -0
  203. package/dist/i18n/locales/pt.d.ts +6 -0
  204. package/dist/i18n/locales/pt.d.ts.map +1 -0
  205. package/dist/i18n/locales/pt.js +106 -0
  206. package/dist/i18n/locales/pt.js.map +1 -0
  207. package/dist/i18n/locales/ro.d.ts +6 -0
  208. package/dist/i18n/locales/ro.d.ts.map +1 -0
  209. package/dist/i18n/locales/ro.js +106 -0
  210. package/dist/i18n/locales/ro.js.map +1 -0
  211. package/dist/i18n/locales/ru.d.ts +6 -0
  212. package/dist/i18n/locales/ru.d.ts.map +1 -0
  213. package/dist/i18n/locales/ru.js +106 -0
  214. package/dist/i18n/locales/ru.js.map +1 -0
  215. package/dist/i18n/locales/sv.d.ts +6 -0
  216. package/dist/i18n/locales/sv.d.ts.map +1 -0
  217. package/dist/i18n/locales/sv.js +106 -0
  218. package/dist/i18n/locales/sv.js.map +1 -0
  219. package/dist/i18n/locales/ta.d.ts +6 -0
  220. package/dist/i18n/locales/ta.d.ts.map +1 -0
  221. package/dist/i18n/locales/ta.js +106 -0
  222. package/dist/i18n/locales/ta.js.map +1 -0
  223. package/dist/i18n/locales/te.d.ts +6 -0
  224. package/dist/i18n/locales/te.d.ts.map +1 -0
  225. package/dist/i18n/locales/te.js +106 -0
  226. package/dist/i18n/locales/te.js.map +1 -0
  227. package/dist/i18n/locales/th.d.ts +6 -0
  228. package/dist/i18n/locales/th.d.ts.map +1 -0
  229. package/dist/i18n/locales/th.js +106 -0
  230. package/dist/i18n/locales/th.js.map +1 -0
  231. package/dist/i18n/locales/tl.d.ts +6 -0
  232. package/dist/i18n/locales/tl.d.ts.map +1 -0
  233. package/dist/i18n/locales/tl.js +106 -0
  234. package/dist/i18n/locales/tl.js.map +1 -0
  235. package/dist/i18n/locales/tr.d.ts +6 -0
  236. package/dist/i18n/locales/tr.d.ts.map +1 -0
  237. package/dist/i18n/locales/tr.js +106 -0
  238. package/dist/i18n/locales/tr.js.map +1 -0
  239. package/dist/i18n/locales/uk.d.ts +6 -0
  240. package/dist/i18n/locales/uk.d.ts.map +1 -0
  241. package/dist/i18n/locales/uk.js +106 -0
  242. package/dist/i18n/locales/uk.js.map +1 -0
  243. package/dist/i18n/locales/ur.d.ts +6 -0
  244. package/dist/i18n/locales/ur.d.ts.map +1 -0
  245. package/dist/i18n/locales/ur.js +383 -0
  246. package/dist/i18n/locales/ur.js.map +1 -0
  247. package/dist/i18n/locales/vi.d.ts +6 -0
  248. package/dist/i18n/locales/vi.d.ts.map +1 -0
  249. package/dist/i18n/locales/vi.js +106 -0
  250. package/dist/i18n/locales/vi.js.map +1 -0
  251. package/dist/i18n/locales/zh-CN.d.ts +6 -0
  252. package/dist/i18n/locales/zh-CN.d.ts.map +1 -0
  253. package/dist/i18n/locales/zh-CN.js +106 -0
  254. package/dist/i18n/locales/zh-CN.js.map +1 -0
  255. package/dist/i18n/locales/zh-TW.d.ts +6 -0
  256. package/dist/i18n/locales/zh-TW.d.ts.map +1 -0
  257. package/dist/i18n/locales/zh-TW.js +106 -0
  258. package/dist/i18n/locales/zh-TW.js.map +1 -0
  259. package/dist/i18n/types.d.ts +101 -0
  260. package/dist/i18n/types.d.ts.map +1 -0
  261. package/dist/i18n/types.js +65 -0
  262. package/dist/i18n/types.js.map +1 -0
  263. package/dist/index.d.ts +20 -0
  264. package/dist/index.d.ts.map +1 -0
  265. package/dist/index.js +472 -0
  266. package/dist/index.js.map +1 -0
  267. package/dist/server/index.d.ts +39 -0
  268. package/dist/server/index.d.ts.map +1 -0
  269. package/dist/server/index.js +89 -0
  270. package/dist/server/index.js.map +1 -0
  271. package/dist/tools/definitions.d.ts +26 -0
  272. package/dist/tools/definitions.d.ts.map +1 -0
  273. package/dist/tools/definitions.js +785 -0
  274. package/dist/tools/definitions.js.map +1 -0
  275. package/dist/tools/handlers.d.ts +19 -0
  276. package/dist/tools/handlers.d.ts.map +1 -0
  277. package/dist/tools/handlers.js +477 -0
  278. package/dist/tools/handlers.js.map +1 -0
  279. package/dist/tools/index.d.ts +3 -0
  280. package/dist/tools/index.d.ts.map +1 -0
  281. package/dist/tools/index.js +3 -0
  282. package/dist/tools/index.js.map +1 -0
  283. package/dist/types/code-generator.d.ts +97 -0
  284. package/dist/types/code-generator.d.ts.map +1 -0
  285. package/dist/types/code-generator.js +545 -0
  286. package/dist/types/code-generator.js.map +1 -0
  287. package/dist/types/index.d.ts +3 -0
  288. package/dist/types/index.d.ts.map +1 -0
  289. package/dist/types/index.js +3 -0
  290. package/dist/types/index.js.map +1 -0
  291. package/dist/types/schemas.d.ts +707 -0
  292. package/dist/types/schemas.d.ts.map +1 -0
  293. package/dist/types/schemas.js +341 -0
  294. package/dist/types/schemas.js.map +1 -0
  295. package/package.json +81 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 PinePaper Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,406 @@
1
+ # PinePaper MCP Server
2
+
3
+ > Create animated graphics with AI using the Model Context Protocol
4
+
5
+ [![npm version](https://badge.fury.io/js/%40pinepaper%2Fmcp-server.svg)](https://www.npmjs.com/package/@pinepaper/mcp-server)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Overview
9
+
10
+ PinePaper MCP Server enables AI assistants like Claude to create and animate graphics in [PinePaper Studio](https://pinepaper.studio). Using natural language, you can:
11
+
12
+ - Create text, shapes, and complex graphics
13
+ - Animate items with behavior-driven relations
14
+ - Generate procedural backgrounds
15
+ - Export animated SVG and training data
16
+
17
+ ## Quick Start
18
+
19
+ ### 1. Install
20
+
21
+ ```bash
22
+ # Using npm
23
+ npm install -g @pinepaper/mcp-server
24
+
25
+ # Using bun
26
+ bun add -g @pinepaper/mcp-server
27
+ ```
28
+
29
+ ### 2. Configure Claude Desktop
30
+
31
+ Add to your `claude_desktop_config.json`:
32
+
33
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
34
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
35
+
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "pinepaper": {
40
+ "command": "npx",
41
+ "args": ["-y", "@pinepaper/mcp-server"]
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ ### 3. Start Using
48
+
49
+ Open Claude Desktop and try:
50
+
51
+ > "Create a red pulsing text that says HELLO"
52
+
53
+ > "Create a sun and earth, make earth orbit the sun"
54
+
55
+ > "Add a sunburst background with blue and purple colors"
56
+
57
+ ## Features
58
+
59
+ ### 🎨 Item Creation
60
+
61
+ Create text, shapes, and custom graphics:
62
+
63
+ ```
64
+ "Create a blue circle at position 200, 300 with radius 50"
65
+ "Add a gold star in the center"
66
+ "Create text saying 'Welcome' with font size 72"
67
+ ```
68
+
69
+ ### 🔄 Relations (Behavior-Driven Animation)
70
+
71
+ The **key feature** - describe HOW items should behave:
72
+
73
+ | Relation | Description | Example |
74
+ |----------|-------------|---------|
75
+ | `orbits` | Circular motion | "Moon orbits Earth" |
76
+ | `follows` | Move toward target | "Label follows player" |
77
+ | `attached_to` | Fixed offset | "Hat attached to character" |
78
+ | `maintains_distance` | Stay at distance | "Satellite 200px from station" |
79
+ | `points_at` | Face target | "Arrow points at target" |
80
+ | `mirrors` | Mirror position | "Reflection mirrors original" |
81
+ | `parallax` | Depth movement | "Background parallax scroll" |
82
+ | `bounds_to` | Stay within area | "Player stays in arena" |
83
+
84
+ ### 🎬 Simple Animations
85
+
86
+ For quick looping effects:
87
+
88
+ - `pulse` - Scale up/down
89
+ - `rotate` - Continuous spin
90
+ - `bounce` - Vertical bounce
91
+ - `fade` - Opacity cycle
92
+ - `wobble` - Side-to-side
93
+ - `slide` - Horizontal slide
94
+ - `typewriter` - Character reveal
95
+
96
+ ### 🖼️ Background Generators
97
+
98
+ Procedural patterns:
99
+
100
+ - `drawSunburst` - Radial rays
101
+ - `drawSunsetScene` - Animated sunset
102
+ - `drawGrid` - Lines, dots, squares
103
+ - `drawWaves` - Layered waves
104
+ - `drawCircuit` - Tech circuit board
105
+
106
+ ### 📊 Training Data Export
107
+
108
+ Generate instruction/code pairs for LLM fine-tuning:
109
+
110
+ ```
111
+ "Export training data from this scene"
112
+ ```
113
+
114
+ Outputs pairs like:
115
+ ```json
116
+ {
117
+ "instruction": "moon orbits earth at radius 100",
118
+ "code": "app.addRelation('item_1', 'item_2', 'orbits', {radius: 100})"
119
+ }
120
+ ```
121
+
122
+ ## Tools Reference
123
+
124
+ ### Item Tools
125
+ | Tool | Description |
126
+ |------|-------------|
127
+ | `pinepaper_create_item` | Create text, shapes, graphics |
128
+ | `pinepaper_modify_item` | Change item properties |
129
+ | `pinepaper_delete_item` | Remove an item |
130
+
131
+ ### Relation Tools
132
+ | Tool | Description |
133
+ |------|-------------|
134
+ | `pinepaper_add_relation` | Create behavioral relationship |
135
+ | `pinepaper_remove_relation` | Remove relationship |
136
+ | `pinepaper_query_relations` | Find existing relations |
137
+
138
+ ### Animation Tools
139
+ | Tool | Description |
140
+ |------|-------------|
141
+ | `pinepaper_animate` | Apply simple loop animation |
142
+ | `pinepaper_keyframe_animate` | Timed keyframe animation |
143
+ | `pinepaper_play_timeline` | Control playback |
144
+
145
+ ### Generator Tools
146
+ | Tool | Description |
147
+ |------|-------------|
148
+ | `pinepaper_execute_generator` | Run background generator |
149
+ | `pinepaper_list_generators` | List available generators |
150
+
151
+ ### Effect Tools
152
+ | Tool | Description |
153
+ |------|-------------|
154
+ | `pinepaper_apply_effect` | Apply sparkle, blast effects |
155
+
156
+ ### Query Tools
157
+ | Tool | Description |
158
+ |------|-------------|
159
+ | `pinepaper_get_items` | Get canvas items |
160
+ | `pinepaper_get_relation_stats` | Relation statistics |
161
+
162
+ ### Canvas Tools
163
+ | Tool | Description |
164
+ |------|-------------|
165
+ | `pinepaper_set_background_color` | Set background |
166
+ | `pinepaper_set_canvas_size` | Set dimensions |
167
+
168
+ ### Export Tools
169
+ | Tool | Description |
170
+ |------|-------------|
171
+ | `pinepaper_export_svg` | Export animated SVG |
172
+ | `pinepaper_export_training_data` | Export LLM training pairs |
173
+
174
+ ## Examples
175
+
176
+ ### Solar System
177
+
178
+ ```
179
+ 1. Create a yellow circle as the sun (radius 60) at center
180
+ 2. Create a blue circle as Earth (radius 20)
181
+ 3. Create a gray circle as the Moon (radius 8)
182
+ 4. Add relation: Earth orbits Sun at radius 150, speed 0.3
183
+ 5. Add relation: Moon orbits Earth at radius 40, speed 0.8
184
+ ```
185
+
186
+ ### Animated Logo
187
+
188
+ ```
189
+ 1. Create text "BRAND" with font size 96
190
+ 2. Apply pulse animation with speed 0.5
191
+ 3. Apply sparkle effect with gold color
192
+ 4. Add sunburst background
193
+ ```
194
+
195
+ ### Following Labels
196
+
197
+ ```
198
+ 1. Create a circle as "player"
199
+ 2. Create text "Player 1" as the label
200
+ 3. Add relation: label follows player with offset [0, -50]
201
+ ```
202
+
203
+ ## Architecture
204
+
205
+ ```
206
+ ┌─────────────────────────────────────────────────────────────┐
207
+ │ Claude Desktop │
208
+ │ │ │
209
+ │ MCP Protocol │
210
+ │ │ │
211
+ │ ┌───────────▼───────────┐ │
212
+ │ │ PinePaper MCP Server │ │
213
+ │ │ ┌─────────────────┐ │ │
214
+ │ │ │ Tool Handlers │ │ │
215
+ │ │ └────────┬────────┘ │ │
216
+ │ │ │ │ │
217
+ │ │ ┌────────▼────────┐ │ │
218
+ │ │ │ Code Generator │ │ │
219
+ │ │ └────────┬────────┘ │ │
220
+ │ └───────────┼───────────┘ │
221
+ │ │ │
222
+ │ ┌───────────▼───────────┐ │
223
+ │ │ PinePaper Studio │ │
224
+ │ │ (Browser/App) │ │
225
+ │ └───────────────────────┘ │
226
+ └─────────────────────────────────────────────────────────────┘
227
+ ```
228
+
229
+ ## Development
230
+
231
+ ### Setup
232
+
233
+ ```bash
234
+ git clone https://github.com/pinepaper/mcp-server.git
235
+ cd mcp-server
236
+
237
+ # Using npm
238
+ npm install
239
+ npm run build
240
+
241
+ # Using bun (recommended)
242
+ bun install
243
+ bun run build
244
+ ```
245
+
246
+ ### Test with Claude Desktop (Local)
247
+
248
+ 1. Build the server:
249
+ ```bash
250
+ # Using npm
251
+ npm run build
252
+
253
+ # Using bun
254
+ bun run build
255
+ ```
256
+
257
+ 2. Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
258
+ ```json
259
+ {
260
+ "mcpServers": {
261
+ "pinepaper": {
262
+ "command": "node",
263
+ "args": ["/full/path/to/mcp-server/dist/cli.js"]
264
+ }
265
+ }
266
+ }
267
+ ```
268
+
269
+ 3. Restart Claude Desktop
270
+
271
+ 4. Test with: "What PinePaper tools do you have available?"
272
+
273
+ ### Run Tests
274
+
275
+ ```bash
276
+ # Using npm
277
+ npm test
278
+
279
+ # Using bun
280
+ bun test
281
+
282
+ # Run with coverage
283
+ bun test --coverage
284
+ ```
285
+
286
+ ### Development Watch Mode
287
+
288
+ ```bash
289
+ # Using npm
290
+ npm run dev
291
+
292
+ # Using bun
293
+ bun run dev
294
+ ```
295
+
296
+ ## Internationalization (i18n)
297
+
298
+ PinePaper MCP Server supports 51 languages, providing localized tool descriptions and messages for AI agents.
299
+
300
+ ### Supported Languages
301
+
302
+ | Category | Languages |
303
+ |----------|-----------|
304
+ | **European** | English, Spanish, French, German, Italian, Portuguese (+ Brazilian), Dutch, Polish, Russian, Ukrainian, Swedish, Danish, Norwegian, Finnish, Czech, Greek, Hungarian, Romanian, Turkish, Icelandic |
305
+ | **East Asian** | Chinese (Simplified & Traditional), Japanese, Korean |
306
+ | **Southeast Asian** | Thai, Vietnamese, Indonesian, Malay, Tagalog, Filipino |
307
+ | **South Asian** | Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Urdu |
308
+ | **Middle Eastern** | Arabic, Hebrew, Persian (RTL support) |
309
+ | **Indigenous (Canada)** | Chipewyan, Cree, Michif, Inuktitut, Mi'kmaq, Mohawk, Ojibwe |
310
+
311
+ ### How It Works
312
+
313
+ The i18n system provides localized:
314
+ - Tool names and descriptions
315
+ - Error messages
316
+ - Success messages
317
+ - UI labels for item types, relations, animations, and generators
318
+
319
+ ### Setting Language
320
+
321
+ Set the `PINEPAPER_LOCALE` environment variable:
322
+
323
+ ```bash
324
+ # In Claude Desktop config
325
+ {
326
+ "mcpServers": {
327
+ "pinepaper": {
328
+ "command": "npx",
329
+ "args": ["-y", "@pinepaper/mcp-server"],
330
+ "env": {
331
+ "PINEPAPER_LOCALE": "ja"
332
+ }
333
+ }
334
+ }
335
+ }
336
+ ```
337
+
338
+ Or programmatically:
339
+
340
+ ```typescript
341
+ import { setLocale, t } from '@pinepaper/mcp-server';
342
+
343
+ // Set locale
344
+ setLocale('fr');
345
+
346
+ // Get translated string
347
+ const description = t('tools.pinepaper_create_item.description');
348
+ ```
349
+
350
+ ### Adding New Languages
351
+
352
+ 1. Create a new locale file in `src/i18n/locales/` (e.g., `xx.ts`)
353
+ 2. Copy the structure from `en.ts`
354
+ 3. Translate all strings
355
+ 4. Export from `src/i18n/locales/index.ts`
356
+ 5. Add to the `localeMap`
357
+
358
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
359
+
360
+ ## Configuration
361
+
362
+ ### Environment Variables
363
+
364
+ | Variable | Description | Default |
365
+ |----------|-------------|---------|
366
+ | `PINEPAPER_DEBUG` | Enable debug logging | `false` |
367
+ | `PINEPAPER_LOG_LEVEL` | Log level (error/warn/info/debug) | `info` |
368
+ | `PINEPAPER_LOCALE` | Language locale code | `en` |
369
+
370
+ ## API Documentation
371
+
372
+ Full API documentation available at:
373
+ - [PinePaper API Docs](https://pinepaper.studio/docs/api)
374
+ - [MCP Tools Specification](https://pinepaper.studio/docs/mcp)
375
+
376
+ ## Contributing
377
+
378
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
379
+
380
+ ### Development Workflow
381
+
382
+ 1. Fork the repository
383
+ 2. Create a feature branch
384
+ 3. Make your changes
385
+ 4. Run tests: `npm test`
386
+ 5. Submit a pull request
387
+
388
+ ## License
389
+
390
+ MIT License - see [LICENSE](LICENSE) for details.
391
+
392
+ ## Links
393
+
394
+ - [PinePaper Studio](https://pinepaper.studio)
395
+ - [Documentation](https://pinepaper.studio/docs)
396
+ - [GitHub Issues](https://github.com/pinepaper/mcp-server/issues)
397
+ - [MCP Specification](https://modelcontextprotocol.io)
398
+
399
+ ## Support
400
+
401
+ - 📧 Email: support@pinepaper.studio
402
+ - 🐛 Issues: [GitHub Issues](https://github.com/pinepaper/mcp-server/issues)
403
+
404
+ ---
405
+
406
+ Made with ❤️ by the PinePaper team
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Test Fixtures Index
3
+ */
4
+ export * from './mock-items.js';
5
+ export * from './mock-relations.js';
6
+ export * from './mock-animations.js';
7
+ export * from './mock-generators.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Test Fixtures Index
3
+ */
4
+ export * from './mock-items.js';
5
+ export * from './mock-relations.js';
6
+ export * from './mock-animations.js';
7
+ export * from './mock-generators.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,213 @@
1
+ /**
2
+ * Mock Animations for Testing
3
+ */
4
+ export declare const mockPulseAnimation: {
5
+ itemId: string;
6
+ animationType: "pulse";
7
+ speed: number;
8
+ };
9
+ export declare const mockRotateAnimation: {
10
+ itemId: string;
11
+ animationType: "rotate";
12
+ speed: number;
13
+ };
14
+ export declare const mockBounceAnimation: {
15
+ itemId: string;
16
+ animationType: "bounce";
17
+ speed: number;
18
+ };
19
+ export declare const mockFadeAnimation: {
20
+ itemId: string;
21
+ animationType: "fade";
22
+ speed: number;
23
+ };
24
+ export declare const mockWobbleAnimation: {
25
+ itemId: string;
26
+ animationType: "wobble";
27
+ speed: number;
28
+ };
29
+ export declare const mockSlideAnimation: {
30
+ itemId: string;
31
+ animationType: "slide";
32
+ speed: number;
33
+ };
34
+ export declare const mockTypewriterAnimation: {
35
+ itemId: string;
36
+ animationType: "typewriter";
37
+ speed: number;
38
+ };
39
+ export declare const mockFadeInKeyframes: {
40
+ itemId: string;
41
+ keyframes: ({
42
+ time: number;
43
+ properties: {
44
+ opacity: number;
45
+ };
46
+ easing: "linear";
47
+ } | {
48
+ time: number;
49
+ properties: {
50
+ opacity: number;
51
+ };
52
+ easing: "easeOut";
53
+ })[];
54
+ duration: number;
55
+ loop: boolean;
56
+ };
57
+ export declare const mockMoveKeyframes: {
58
+ itemId: string;
59
+ keyframes: ({
60
+ time: number;
61
+ properties: {
62
+ x: number;
63
+ y: number;
64
+ };
65
+ easing: "linear";
66
+ } | {
67
+ time: number;
68
+ properties: {
69
+ x: number;
70
+ y: number;
71
+ };
72
+ easing: "easeInOut";
73
+ })[];
74
+ duration: number;
75
+ loop: boolean;
76
+ };
77
+ export declare const mockColorKeyframes: {
78
+ itemId: string;
79
+ keyframes: {
80
+ time: number;
81
+ properties: {
82
+ fillColor: string;
83
+ };
84
+ easing: "linear";
85
+ }[];
86
+ duration: number;
87
+ loop: boolean;
88
+ };
89
+ export declare const mockScaleKeyframes: {
90
+ itemId: string;
91
+ keyframes: ({
92
+ time: number;
93
+ properties: {
94
+ scale: number;
95
+ };
96
+ easing: "linear";
97
+ } | {
98
+ time: number;
99
+ properties: {
100
+ scale: number;
101
+ };
102
+ easing: "bounce";
103
+ } | {
104
+ time: number;
105
+ properties: {
106
+ scale: number;
107
+ };
108
+ easing: "elastic";
109
+ })[];
110
+ duration: number;
111
+ loop: boolean;
112
+ };
113
+ export declare const allSimpleAnimations: ({
114
+ itemId: string;
115
+ animationType: "pulse";
116
+ speed: number;
117
+ } | {
118
+ itemId: string;
119
+ animationType: "rotate";
120
+ speed: number;
121
+ } | {
122
+ itemId: string;
123
+ animationType: "bounce";
124
+ speed: number;
125
+ } | {
126
+ itemId: string;
127
+ animationType: "fade";
128
+ speed: number;
129
+ } | {
130
+ itemId: string;
131
+ animationType: "wobble";
132
+ speed: number;
133
+ } | {
134
+ itemId: string;
135
+ animationType: "slide";
136
+ speed: number;
137
+ } | {
138
+ itemId: string;
139
+ animationType: "typewriter";
140
+ speed: number;
141
+ })[];
142
+ export declare const allKeyframeAnimations: ({
143
+ itemId: string;
144
+ keyframes: ({
145
+ time: number;
146
+ properties: {
147
+ opacity: number;
148
+ };
149
+ easing: "linear";
150
+ } | {
151
+ time: number;
152
+ properties: {
153
+ opacity: number;
154
+ };
155
+ easing: "easeOut";
156
+ })[];
157
+ duration: number;
158
+ loop: boolean;
159
+ } | {
160
+ itemId: string;
161
+ keyframes: ({
162
+ time: number;
163
+ properties: {
164
+ x: number;
165
+ y: number;
166
+ };
167
+ easing: "linear";
168
+ } | {
169
+ time: number;
170
+ properties: {
171
+ x: number;
172
+ y: number;
173
+ };
174
+ easing: "easeInOut";
175
+ })[];
176
+ duration: number;
177
+ loop: boolean;
178
+ } | {
179
+ itemId: string;
180
+ keyframes: {
181
+ time: number;
182
+ properties: {
183
+ fillColor: string;
184
+ };
185
+ easing: "linear";
186
+ }[];
187
+ duration: number;
188
+ loop: boolean;
189
+ } | {
190
+ itemId: string;
191
+ keyframes: ({
192
+ time: number;
193
+ properties: {
194
+ scale: number;
195
+ };
196
+ easing: "linear";
197
+ } | {
198
+ time: number;
199
+ properties: {
200
+ scale: number;
201
+ };
202
+ easing: "bounce";
203
+ } | {
204
+ time: number;
205
+ properties: {
206
+ scale: number;
207
+ };
208
+ easing: "elastic";
209
+ })[];
210
+ duration: number;
211
+ loop: boolean;
212
+ })[];
213
+ //# sourceMappingURL=mock-animations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-animations.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/mock-animations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;CAInC,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAS7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAS9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;CAS9B,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQ/B,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKjC,CAAC"}