illustrator-mcp-server 1.2.10 → 1.2.12

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 (57) hide show
  1. package/README.ja.md +67 -343
  2. package/README.md +68 -331
  3. package/dist/bundle.cjs +164 -57
  4. package/dist/executor/file-transport.d.ts +3 -2
  5. package/dist/executor/file-transport.d.ts.map +1 -1
  6. package/dist/executor/file-transport.js +14 -9
  7. package/dist/executor/file-transport.js.map +1 -1
  8. package/dist/executor/jsx-runner.d.ts.map +1 -1
  9. package/dist/executor/jsx-runner.js +3 -3
  10. package/dist/executor/jsx-runner.js.map +1 -1
  11. package/dist/prompts/print-preflight-workflow.d.ts.map +1 -1
  12. package/dist/prompts/print-preflight-workflow.js +6 -0
  13. package/dist/prompts/print-preflight-workflow.js.map +1 -1
  14. package/dist/tools/export/export-pdf.d.ts.map +1 -1
  15. package/dist/tools/export/export-pdf.js +30 -3
  16. package/dist/tools/export/export-pdf.js.map +1 -1
  17. package/dist/tools/export/export.d.ts.map +1 -1
  18. package/dist/tools/export/export.js +45 -3
  19. package/dist/tools/export/export.js.map +1 -1
  20. package/dist/tools/modify/create-ellipse.d.ts.map +1 -1
  21. package/dist/tools/modify/create-ellipse.js +3 -5
  22. package/dist/tools/modify/create-ellipse.js.map +1 -1
  23. package/dist/tools/modify/create-line.d.ts.map +1 -1
  24. package/dist/tools/modify/create-line.js +3 -5
  25. package/dist/tools/modify/create-line.js.map +1 -1
  26. package/dist/tools/modify/create-path.d.ts.map +1 -1
  27. package/dist/tools/modify/create-path.js +3 -5
  28. package/dist/tools/modify/create-path.js.map +1 -1
  29. package/dist/tools/modify/create-rectangle.d.ts.map +1 -1
  30. package/dist/tools/modify/create-rectangle.js +3 -5
  31. package/dist/tools/modify/create-rectangle.js.map +1 -1
  32. package/dist/tools/modify/save-document.d.ts.map +1 -1
  33. package/dist/tools/modify/save-document.js +26 -7
  34. package/dist/tools/modify/save-document.js.map +1 -1
  35. package/dist/tools/modify/shared.d.ts.map +1 -1
  36. package/dist/tools/modify/shared.js +3 -2
  37. package/dist/tools/modify/shared.js.map +1 -1
  38. package/dist/tools/read/get-artboards.d.ts.map +1 -1
  39. package/dist/tools/read/get-artboards.js +3 -5
  40. package/dist/tools/read/get-artboards.js.map +1 -1
  41. package/dist/tools/read/get-layers.d.ts.map +1 -1
  42. package/dist/tools/read/get-layers.js +3 -7
  43. package/dist/tools/read/get-layers.js.map +1 -1
  44. package/dist/tools/read/get-selection.d.ts.map +1 -1
  45. package/dist/tools/read/get-selection.js +3 -7
  46. package/dist/tools/read/get-selection.js.map +1 -1
  47. package/dist/tools/tool-executor.d.ts +17 -0
  48. package/dist/tools/tool-executor.d.ts.map +1 -0
  49. package/dist/tools/tool-executor.js +22 -0
  50. package/dist/tools/tool-executor.js.map +1 -0
  51. package/dist/tools/utility/check-text-consistency.d.ts.map +1 -1
  52. package/dist/tools/utility/check-text-consistency.js +10 -4
  53. package/dist/tools/utility/check-text-consistency.js.map +1 -1
  54. package/dist/tools/utility/preflight-check.d.ts.map +1 -1
  55. package/dist/tools/utility/preflight-check.js +7 -1
  56. package/dist/tools/utility/preflight-check.js.map +1 -1
  57. package/package.json +3 -3
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [![MCP](https://img.shields.io/badge/MCP-Compatible-purple.svg)](https://modelcontextprotocol.io/)
10
10
  [![Ko-fi](https://img.shields.io/badge/Ko--fi-FF5E5B?style=flat&logo=ko-fi&logoColor=white)](https://ko-fi.com/cyocun)
11
11
 
12
- An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server for reading, manipulating, and exporting Adobe Illustrator design data.
12
+ An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server for reading, manipulating, and exporting Adobe Illustrator design data — with 63 built-in tools.
13
13
 
14
14
  Control Illustrator directly from AI assistants like Claude — extract design information for web implementation, verify print-ready data, and export assets.
15
15
 
@@ -17,49 +17,36 @@ Control Illustrator directly from AI assistants like Claude — extract design i
17
17
 
18
18
  ---
19
19
 
20
- ## Quick Start
20
+ > [!TIP]
21
+ > Developing and maintaining this tool takes time and resources.
22
+ > If it helps your workflow, your support means a lot — [☕ buy me a coffee!](https://ko-fi.com/cyocun)
21
23
 
22
- **Requirements:** macOS or Windows / Adobe Illustrator CC 2024+ / [Node.js 20+](https://nodejs.org/)
23
-
24
- <details>
25
- <summary><strong>How to install Node.js (first-time setup)</strong></summary>
26
-
27
- Node.js is a runtime required to run this tool.
28
- Skip this section if you already have it installed.
29
-
30
- 1. Go to [nodejs.org](https://nodejs.org/)
31
- 2. Click the **green "LTS" button** to download
32
- 3. Open the downloaded file and follow the installer instructions
33
-
34
- To verify the installation, open Terminal (macOS) or Command Prompt (Windows) and type:
35
-
36
- ```bash
37
- node -v
38
- ```
24
+ ---
39
25
 
40
- If you see a version number like `v20.x.x`, you're all set.
26
+ ## 🚀 Quick Start
41
27
 
42
- </details>
28
+ ### 🛠️ Claude Code
43
29
 
44
- ### Claude Code
30
+ Requires [Node.js 20+](https://nodejs.org/).
45
31
 
46
32
  ```bash
47
33
  claude mcp add illustrator-mcp -- npx illustrator-mcp-server
48
34
  ```
49
35
 
50
- ### Claude Desktop
36
+ ### 🖥️ Claude Desktop
51
37
 
52
- 1. Download **`illustrator-mcp-server-x.x.x.mcpb`** from [GitHub Releases](https://github.com/ie3jp/illustrator-mcp-server/releases/latest)
38
+ 1. Download **`illustrator-mcp-server.mcpb`** from [GitHub Releases](https://github.com/ie3jp/illustrator-mcp-server/releases/latest)
53
39
  2. Open Claude Desktop → **Settings** → **Extensions**
54
40
  3. Drag and drop the `.mcpb` file into the Extensions panel
55
41
  4. Click the **Install** button
56
42
 
57
- > **Updating:** The `.mcpb` extension does not auto-update. To update, download the new version and reinstall. If you prefer automatic updates, use the npx method below instead.
58
-
59
43
  <details>
60
44
  <summary><strong>Alternative: manual config (always up to date via npx)</strong></summary>
61
45
 
62
- Open the config file and add the connection settings.
46
+ > [!NOTE]
47
+ > The `.mcpb` extension does not auto-update. To update, download the new version and reinstall. If you prefer automatic updates, use the npx method below instead.
48
+
49
+ Requires [Node.js 20+](https://nodejs.org/). Open the config file and add the connection settings.
63
50
 
64
51
  #### 1. Open the config file
65
52
 
@@ -80,7 +67,8 @@ From the Claude Desktop menu bar:
80
67
  }
81
68
  ```
82
69
 
83
- > **Note:** If you installed Node.js via a version manager (nvm, mise, fnm, etc.), Claude Desktop may not find `npx`. In that case, use the full path:
70
+ > [!NOTE]
71
+ > If you installed Node.js via a version manager (nvm, mise, fnm, etc.), Claude Desktop may not find `npx`. In that case, use the full path:
84
72
  > ```json
85
73
  > "command": "/full/path/to/npx"
86
74
  > ```
@@ -93,13 +81,18 @@ From the Claude Desktop menu bar:
93
81
 
94
82
  </details>
95
83
 
84
+ > [!CAUTION]
85
+ > AI can make mistakes. Do not over-rely on the output — **always have a human perform the final check on submission data**. The user is responsible for the results.
86
+
87
+ > [!NOTE]
96
88
  > **macOS:** On first run, allow automation access in System Settings > Privacy & Security > Automation.
97
89
 
98
- > **Note:** Modify and export tools will bring Illustrator to the foreground during execution.
90
+ > [!NOTE]
91
+ > Modify and export tools will bring Illustrator to the foreground during execution.
99
92
 
100
93
  ---
101
94
 
102
- ## What You Can Do
95
+ ## 🎬 What You Can Do
103
96
 
104
97
  ```
105
98
  You: Show me all the text information in this document
@@ -133,9 +126,7 @@ Claude: → get_document_info → resize_for_variation
133
126
 
134
127
  ---
135
128
 
136
- ## Recipes
137
-
138
- ### Web Implementation
129
+ ## 📖 Recipes
139
130
 
140
131
  <details>
141
132
  <summary><b>Extract colors and fonts for CSS</b></summary>
@@ -176,27 +167,6 @@ Claude: → get_artboards → convert_to_outlines → export (repeated)
176
167
 
177
168
  </details>
178
169
 
179
- <details>
180
- <summary><b>Inspect a specific object's styling</b></summary>
181
-
182
- ```
183
- You: Tell me about the "CTA Button" object
184
-
185
- Claude: → find_objects (name: "CTA Button") → get_path_items → get_effects
186
-
187
- ■ CTA Button (uuid: abc-123)
188
- - Size: 200×48px
189
- - Corner radius: 24px
190
- - Fill: #1A73E8
191
- - Stroke: none
192
- - Opacity: 100%
193
- - Drop shadow: present (parameters not readable due to API limitation)
194
- ```
195
-
196
- </details>
197
-
198
- ### Print & Pre-press
199
-
200
170
  <details>
201
171
  <summary><b>Check PDF/X-1a compliance before submission</b></summary>
202
172
 
@@ -216,63 +186,6 @@ Claude: → preflight_check (target_pdf_profile: "x1a")
216
186
 
217
187
  </details>
218
188
 
219
- <details>
220
- <summary><b>Audit overprint settings to prevent print accidents</b></summary>
221
-
222
- ```
223
- You: Check overprint settings
224
-
225
- Claude: → get_overprint_info
226
-
227
- ■ 4 objects with overprint
228
-
229
- ✅ Safe (K100 overprint — intentional):
230
- - "Headline" text (K100, ink coverage 100%)
231
- - "Rule line" path (K100, ink coverage 100%)
232
-
233
- ⚠ Review needed (possibly accidental):
234
- - "Background decoration" (C30 M80 Y0 K0, coverage 110%)
235
- - "Rich black frame" (C40 M40 Y40 K100, coverage 320%)
236
- → Rich black + overprint can cause unexpected color bleed
237
- ```
238
-
239
- </details>
240
-
241
- <details>
242
- <summary><b>Check color separations</b></summary>
243
-
244
- ```
245
- You: Show me the color separation info
246
-
247
- Claude: → get_separation_info
248
-
249
- ■ Separations (CMYK document)
250
- - Cyan: 342 uses
251
- - Magenta: 287 uses
252
- - Yellow: 301 uses
253
- - Black: 456 uses
254
- - DIC 2585 (spot): 12 uses
255
- → This will output as 5 plates.
256
- ```
257
-
258
- </details>
259
-
260
- <details>
261
- <summary><b>Export PDF with crop marks and bleed</b></summary>
262
-
263
- ```
264
- You: Export PDF with Japanese crop marks and 3mm bleed
265
-
266
- Claude: → export_pdf (trim_marks: true, marks_style: "japanese", bleed: true)
267
-
268
- Exported to /output/print_ready.pdf
269
- - Japanese crop marks (0.125pt)
270
- - 3mm bleed
271
- - Registration marks auto-applied
272
- ```
273
-
274
- </details>
275
-
276
189
  <details>
277
190
  <summary><b>Check image quality for print</b></summary>
278
191
 
@@ -290,137 +203,6 @@ Claude: → get_images (include_print_info: true)
290
203
 
291
204
  </details>
292
205
 
293
- ### Text Proofing
294
-
295
- <details>
296
- <summary><b>Find placeholder text and notation inconsistencies</b></summary>
297
-
298
- ```
299
- You: Check text for inconsistencies
300
-
301
- Claude: → check_text_consistency
302
-
303
- 📝 Consistency Report:
304
-
305
- ■ Notation variations
306
- ⚠ "Contact Us" (2 places) vs "Contact us" (1 place)
307
- ⚠ "e-mail" (1 place) vs "email" (3 places) vs "E-mail" (1 place)
308
-
309
- ■ Possible outdated content
310
- ❌ Header still says "2024" (all other instances are "2025")
311
- ❌ Footer phone number differs from other pages
312
-
313
- ■ Placeholder text
314
- ❌ "Lorem ipsum" (2 places) — forgotten placeholder?
315
- ❌ "Sample text" (1 place)
316
- ```
317
-
318
- </details>
319
-
320
- ### Design Variations
321
-
322
- <details>
323
- <summary><b>Create multiple banner sizes from a single design</b></summary>
324
-
325
- ```
326
- You: Create 3 web banner sizes from this A4 flyer
327
-
328
- Claude: → get_document_info → resize_for_variation (3 targets)
329
-
330
- Created 3 variations:
331
- - "Leaderboard" artboard (728×90pt, scaled to 11%)
332
- - "Medium Rectangle" artboard (300×250pt, scaled to 30%)
333
- - "Wide Skyscraper" artboard (160×600pt, scaled to 71%)
334
-
335
- ⚠ Text reflow is not applied.
336
- You may need to adjust text sizing and overflow manually.
337
- ```
338
-
339
- </details>
340
-
341
- <details>
342
- <summary><b>Build a layout with shapes and text</b></summary>
343
-
344
- ```
345
- You: Create a business card layout with company name, name, email, and phone
346
-
347
- Claude: → create_document (91×55mm, CMYK)
348
- → create_text_frame × 4
349
- → create_rectangle (background)
350
- → create_line (divider)
351
-
352
- Business card layout created:
353
- - Company: top center / Noto Sans JP Bold 9pt
354
- - Name: center / Noto Sans JP Bold 14pt
355
- - Email: bottom / Noto Sans JP Regular 7pt
356
- - Phone: bottom / Noto Sans JP Regular 7pt
357
- ```
358
-
359
- </details>
360
-
361
- ### Color Management
362
-
363
- <details>
364
- <summary><b>Diagnose color issues in a CMYK document</b></summary>
365
-
366
- ```
367
- You: Run a color diagnostic
368
-
369
- Claude: → get_colors (include_diagnostics: true)
370
-
371
- ■ Color Diagnostics (CMYK document)
372
- ❌ RGB colors found: 3 fills / 1 stroke
373
- ⚠ Gradient warning:
374
- - "Rainbow gradient": stop #2 is RGB
375
- ■ High ink coverage:
376
- - C80 M70 Y70 K90 (total 310%) — may cause ink pooling
377
- ```
378
-
379
- </details>
380
-
381
- ### Object Operations
382
-
383
- <details>
384
- <summary><b>Align and distribute multiple objects</b></summary>
385
-
386
- ```
387
- You: Align these 3 buttons to the left and distribute vertically
388
-
389
- Claude: → find_objects → align_objects (alignment: "left", distribute: "vertical")
390
-
391
- Aligned 3 objects: left-aligned + vertically distributed.
392
- ```
393
-
394
- </details>
395
-
396
- <details>
397
- <summary><b>Replace brand colors across the document</b></summary>
398
-
399
- ```
400
- You: Replace all red (C0 M100 Y100 K0) with the new brand blue (C80 M10 Y0 K0)
401
-
402
- Claude: → replace_color (from → to)
403
-
404
- Replaced 24 fills and 3 strokes.
405
- ```
406
-
407
- </details>
408
-
409
- <details>
410
- <summary><b>Place color chips outside the artboard</b></summary>
411
-
412
- ```
413
- You: Show all used colors as chips to the right of the artboard
414
-
415
- Claude: → place_color_chips (position: "right")
416
-
417
- Placed 12 color chips on "Color Chips" layer with CMYK labels.
418
- ```
419
-
420
- </details>
421
-
422
- ### Accessibility
423
-
424
206
  <details>
425
207
  <summary><b>Check WCAG color contrast ratios</b></summary>
426
208
 
@@ -437,67 +219,19 @@ Claude: → check_contrast (auto_detect: true)
437
219
 
438
220
  </details>
439
221
 
440
- ### Design System
441
-
442
- <details>
443
- <summary><b>Extract design tokens from a comp</b></summary>
444
-
445
- ```
446
- You: Extract design tokens as CSS custom properties
447
-
448
- Claude: → extract_design_tokens (format: "css")
449
-
450
- :root {
451
- --color-primary: #1A73E8;
452
- --color-secondary: #34A853;
453
- --font-heading-family: "NotoSansJP-Bold";
454
- --font-heading-size: 32pt;
455
- --spacing-8: 8pt;
456
- --spacing-16: 16pt;
457
- }
458
- ```
459
-
460
- </details>
222
+ ---
461
223
 
462
- ## MCP Prompts
224
+ ## Workflow Templates
463
225
 
464
- Workflow templates that guide Claude through multi-step tasks. Available in the Claude Desktop prompt picker.
226
+ Pre-built workflow templates available in the Claude Desktop prompt picker.
465
227
 
466
- | Prompt | Description |
467
- |--------|-------------|
228
+ | Template | Description |
229
+ |----------|-------------|
468
230
  | `quick-layout` | Paste text content and Claude arranges it on the artboard as headings, body, and captions |
469
231
  | `print-preflight-workflow` | Comprehensive 7-step pre-press check (document → preflight → overprint → separations → images → colors → text) |
470
232
 
471
233
  ---
472
234
 
473
- ## Claude Code Skills
474
-
475
- Add pre-built workflows as slash commands in Claude Code, combining multiple MCP tools into guided processes.
476
-
477
- ### Pre-press Preflight Check (`/illustrator-preflight`)
478
-
479
- Runs `preflight_check` + `get_overprint_info` + `check_text_consistency` in parallel, then merges results into a unified report grouped by severity (Critical / Warning / Info). Catches print-critical issues that are easy to miss manually.
480
-
481
- **Install:**
482
-
483
- ```bash
484
- /plugin install illustrator-preflight
485
- ```
486
-
487
- **Usage:**
488
-
489
- Type `/illustrator-preflight:illustrator-preflight` in Claude Code, or just ask "run a preflight check".
490
-
491
- ---
492
-
493
- ## Features
494
-
495
- - **63 tools + 2 prompts** — 21 read / 37 modify / 2 export / 3 utility
496
- - **Web coordinate system** — Y-axis down, artboard-relative (same as CSS/SVG)
497
- - **UUID tracking** — Stable object identification across tool calls
498
-
499
- ---
500
-
501
235
  ## Tool Reference
502
236
 
503
237
  ### Read Tools (21)
@@ -580,48 +314,72 @@ Type `/illustrator-preflight:illustrator-preflight` in Claude Code, or just ask
580
314
 
581
315
  ### Export Tools (2)
582
316
 
317
+ <details>
318
+ <summary>Click to expand</summary>
319
+
583
320
  | Tool | Description |
584
321
  |---|---|
585
322
  | `export` | SVG / PNG / JPG export (by artboard, selection, or UUID) |
586
323
  | `export_pdf` | Print-ready PDF export (crop marks, bleed, selective downsampling, output intent) |
587
324
 
325
+ </details>
326
+
588
327
  ### Utility (3)
589
328
 
329
+ <details>
330
+ <summary>Click to expand</summary>
331
+
590
332
  | Tool | Description |
591
333
  |---|---|
592
334
  | `preflight_check` | Pre-press check (RGB mixing, broken links, low resolution, white overprint, transparency+overprint interaction, PDF/X compliance, etc.) |
593
335
  | `check_text_consistency` | Text consistency check (placeholder detection, notation variation patterns, full text listing for LLM analysis) |
594
336
  | `set_workflow` | Set workflow mode (web/print) to configure default coordinate system |
595
337
 
338
+ </details>
339
+
340
+ ---
341
+
342
+ ## Known Limitations
343
+
344
+ | Limitation | Details |
345
+ |---|---|
346
+ | Windows support | Windows uses PowerShell COM automation (not yet tested on real hardware) |
347
+ | Live effects | Drop shadow and other effect parameters can be detected but not read |
348
+ | Color profiles | Color profile assignment only — full conversion is not available |
349
+ | Bleed settings | Bleed settings cannot be read (Illustrator API limitation) |
350
+ | WebP export | Not supported — use PNG or SVG instead |
351
+ | Japanese crop marks | May not render correctly in PDF export in some cases |
352
+ | Font embedding | Embedding mode (full/subset) cannot be controlled directly — use PDF presets |
353
+ | Size variations | Proportional scaling only — text may need manual adjustment afterward |
354
+
596
355
  ---
597
356
 
357
+ <br>
358
+
359
+ # For Developers
360
+
598
361
  ## Architecture
599
362
 
600
363
  ```mermaid
601
364
  flowchart LR
602
365
  Claude <-->|MCP Protocol| Server["MCP Server\n(TypeScript/Node.js)"]
603
- Server <-->|"execFile (macOS)"| osascript
604
- Server <-->|"execFile (Windows)"| PS["powershell.exe\n(COM Automation)"]
605
- osascript <-->|do javascript| AI["Adobe Illustrator\n(ExtendScript/JSX)"]
606
- PS <-->|DoJavaScript| AI
607
366
 
367
+ Server -.->|generate| Runner["run-{uuid}.scpt / .ps1"]
368
+ Server -.->|generate| JSX["script-{uuid}.jsx\n(BOM UTF-8)"]
608
369
  Server -.->|write| PF["params-{uuid}.json"]
370
+
371
+ Runner -->|execFile| osascript
372
+ Runner -->|execFile| PS["powershell.exe"]
373
+
374
+ osascript -->|do javascript| AI["Adobe Illustrator\n(ExtendScript/JSX)"]
375
+ PS -->|DoJavaScript| AI
376
+
377
+ JSX -.->|execute| AI
609
378
  PF -.->|read| AI
610
379
  AI -.->|write| RF["result-{uuid}.json"]
611
380
  RF -.->|read| Server
612
- Server -.->|generate| JSX["script-{uuid}.jsx\n(BOM UTF-8)"]
613
- Server -.->|generate| Runner["run-{uuid}.scpt / .ps1"]
614
381
  ```
615
382
 
616
- ### Coordinate System
617
-
618
- Geometry-aware read and modify tools accept a `coordinate_system` parameter. Export and document-wide utility tools do not.
619
-
620
- | Value | Origin | Y-axis | Use case |
621
- |---|---|---|---|
622
- | `artboard-web` (default) | Artboard top-left | Positive downward | Web / CSS implementation |
623
- | `document` | Pasteboard | Positive upward (Illustrator native) | Print / DTP |
624
-
625
383
  ---
626
384
 
627
385
  ## Building from Source
@@ -654,27 +412,6 @@ The E2E test creates a fresh document, places test objects, runs 106 test cases
654
412
 
655
413
  ---
656
414
 
657
- ## Known Limitations
658
-
659
- | Limitation | Details |
660
- |---|---|
661
- | macOS / Windows | macOS uses osascript, Windows uses PowerShell COM automation (not yet tested on real hardware) |
662
- | Live effects | ExtendScript DOM limitations prevent reading parameters for drop shadows, etc. |
663
- | Color profile conversion | Only profile assignment is supported; full ICC conversion is not available |
664
- | Bleed settings | Not accessible via the ExtendScript API (undocumented) |
665
- | WebP export | Not supported — ExportType does not include WebP in ExtendScript |
666
- | Japanese crop marks | `PageMarksTypes.Japanese` may not be applied correctly in PDF export |
667
- | Font embedding control | PDF font embedding mode (full/subset) is not exposed in the API. Use PDF presets instead |
668
- | Size variations | No text reflow. Proportional placement only (not smart layout) |
669
-
670
- ---
671
-
672
- ## Support
673
-
674
- Developing and maintaining this tool takes time and resources. If it helps your workflow, your support means a lot — [buy me a coffee ☕](https://ko-fi.com/cyocun)
675
-
676
- ---
677
-
678
415
  ## License
679
416
 
680
417
  [MIT](LICENSE)