@alisaitteke/photoshop-mcp 0.1.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 (115) hide show
  1. package/.prettierrc +9 -0
  2. package/README.md +1300 -0
  3. package/dist/api/batch-play.d.ts +62 -0
  4. package/dist/api/batch-play.d.ts.map +1 -0
  5. package/dist/api/batch-play.js +131 -0
  6. package/dist/api/batch-play.js.map +1 -0
  7. package/dist/api/extendscript.d.ts +258 -0
  8. package/dist/api/extendscript.d.ts.map +1 -0
  9. package/dist/api/extendscript.js +1437 -0
  10. package/dist/api/extendscript.js.map +1 -0
  11. package/dist/api/photoshop-api.d.ts +20 -0
  12. package/dist/api/photoshop-api.d.ts.map +1 -0
  13. package/dist/api/photoshop-api.js +88 -0
  14. package/dist/api/photoshop-api.js.map +1 -0
  15. package/dist/core/server.d.ts +14 -0
  16. package/dist/core/server.d.ts.map +1 -0
  17. package/dist/core/server.js +191 -0
  18. package/dist/core/server.js.map +1 -0
  19. package/dist/core/session.d.ts +24 -0
  20. package/dist/core/session.d.ts.map +1 -0
  21. package/dist/core/session.js +83 -0
  22. package/dist/core/session.js.map +1 -0
  23. package/dist/core/tool-registry.d.ts +23 -0
  24. package/dist/core/tool-registry.d.ts.map +1 -0
  25. package/dist/core/tool-registry.js +55 -0
  26. package/dist/core/tool-registry.js.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +18 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/platform/connection.d.ts +20 -0
  32. package/dist/platform/connection.d.ts.map +1 -0
  33. package/dist/platform/connection.js +94 -0
  34. package/dist/platform/connection.js.map +1 -0
  35. package/dist/platform/detector.d.ts +19 -0
  36. package/dist/platform/detector.d.ts.map +1 -0
  37. package/dist/platform/detector.js +63 -0
  38. package/dist/platform/detector.js.map +1 -0
  39. package/dist/platform/macos-detector.d.ts +13 -0
  40. package/dist/platform/macos-detector.d.ts.map +1 -0
  41. package/dist/platform/macos-detector.js +145 -0
  42. package/dist/platform/macos-detector.js.map +1 -0
  43. package/dist/platform/macos-executor.d.ts +22 -0
  44. package/dist/platform/macos-executor.d.ts.map +1 -0
  45. package/dist/platform/macos-executor.js +161 -0
  46. package/dist/platform/macos-executor.js.map +1 -0
  47. package/dist/platform/script-executor.d.ts +23 -0
  48. package/dist/platform/script-executor.d.ts.map +1 -0
  49. package/dist/platform/script-executor.js +2 -0
  50. package/dist/platform/script-executor.js.map +1 -0
  51. package/dist/platform/windows-detector.d.ts +14 -0
  52. package/dist/platform/windows-detector.d.ts.map +1 -0
  53. package/dist/platform/windows-detector.js +173 -0
  54. package/dist/platform/windows-detector.js.map +1 -0
  55. package/dist/platform/windows-executor.d.ts +15 -0
  56. package/dist/platform/windows-executor.d.ts.map +1 -0
  57. package/dist/platform/windows-executor.js +148 -0
  58. package/dist/platform/windows-executor.js.map +1 -0
  59. package/dist/tools/action-tools.d.ts +4 -0
  60. package/dist/tools/action-tools.d.ts.map +1 -0
  61. package/dist/tools/action-tools.js +102 -0
  62. package/dist/tools/action-tools.js.map +1 -0
  63. package/dist/tools/adjustment-tools.d.ts +4 -0
  64. package/dist/tools/adjustment-tools.d.ts.map +1 -0
  65. package/dist/tools/adjustment-tools.js +274 -0
  66. package/dist/tools/adjustment-tools.js.map +1 -0
  67. package/dist/tools/document-tools.d.ts +4 -0
  68. package/dist/tools/document-tools.d.ts.map +1 -0
  69. package/dist/tools/document-tools.js +230 -0
  70. package/dist/tools/document-tools.js.map +1 -0
  71. package/dist/tools/filter-tools.d.ts +4 -0
  72. package/dist/tools/filter-tools.d.ts.map +1 -0
  73. package/dist/tools/filter-tools.js +230 -0
  74. package/dist/tools/filter-tools.js.map +1 -0
  75. package/dist/tools/history-tools.d.ts +4 -0
  76. package/dist/tools/history-tools.d.ts.map +1 -0
  77. package/dist/tools/history-tools.js +137 -0
  78. package/dist/tools/history-tools.js.map +1 -0
  79. package/dist/tools/image-placement-tools.d.ts +4 -0
  80. package/dist/tools/image-placement-tools.d.ts.map +1 -0
  81. package/dist/tools/image-placement-tools.js +109 -0
  82. package/dist/tools/image-placement-tools.js.map +1 -0
  83. package/dist/tools/image-tools.d.ts +4 -0
  84. package/dist/tools/image-tools.d.ts.map +1 -0
  85. package/dist/tools/image-tools.js +123 -0
  86. package/dist/tools/image-tools.js.map +1 -0
  87. package/dist/tools/layer-ordering-tools.d.ts +4 -0
  88. package/dist/tools/layer-ordering-tools.d.ts.map +1 -0
  89. package/dist/tools/layer-ordering-tools.js +210 -0
  90. package/dist/tools/layer-ordering-tools.js.map +1 -0
  91. package/dist/tools/layer-properties-tools.d.ts +4 -0
  92. package/dist/tools/layer-properties-tools.d.ts.map +1 -0
  93. package/dist/tools/layer-properties-tools.js +421 -0
  94. package/dist/tools/layer-properties-tools.js.map +1 -0
  95. package/dist/tools/layer-tools.d.ts +4 -0
  96. package/dist/tools/layer-tools.d.ts.map +1 -0
  97. package/dist/tools/layer-tools.js +251 -0
  98. package/dist/tools/layer-tools.js.map +1 -0
  99. package/dist/tools/layer-transform-tools.d.ts +4 -0
  100. package/dist/tools/layer-transform-tools.d.ts.map +1 -0
  101. package/dist/tools/layer-transform-tools.js +199 -0
  102. package/dist/tools/layer-transform-tools.js.map +1 -0
  103. package/dist/tools/selection-tools.d.ts +4 -0
  104. package/dist/tools/selection-tools.d.ts.map +1 -0
  105. package/dist/tools/selection-tools.js +295 -0
  106. package/dist/tools/selection-tools.js.map +1 -0
  107. package/dist/tools/text-tools.d.ts +4 -0
  108. package/dist/tools/text-tools.d.ts.map +1 -0
  109. package/dist/tools/text-tools.js +210 -0
  110. package/dist/tools/text-tools.js.map +1 -0
  111. package/dist/utils/logger.d.ts +17 -0
  112. package/dist/utils/logger.d.ts.map +1 -0
  113. package/dist/utils/logger.js +43 -0
  114. package/dist/utils/logger.js.map +1 -0
  115. package/package.json +47 -0
package/README.md ADDED
@@ -0,0 +1,1300 @@
1
+ # Photoshop MCP Server
2
+ > **Note:** This is an unofficial, community-maintained project and is not affiliated with or endorsed by Adobe Inc.
3
+
4
+ [![npm version](https://img.shields.io/npm/v/@alisaitteke/photoshop-mcp.svg)](https://www.npmjs.com/package/@alisaitteke/photoshop-mcp)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue.svg)](https://www.typescriptlang.org/)
7
+ [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS-lightgrey.svg)]()
8
+
9
+ A Model Context Protocol (MCP) server that enables AI assistants like Claude and Cursor to control Adobe Photoshop programmatically. This allows you to create designs, manipulate images, and automate Photoshop workflows through natural language commands while working in your IDE.
10
+
11
+ > **🎨 50+ Tools** | **🖥️ Cross-Platform** | **📦 NPX Ready** | **🔧 ExtendScript API** | **⏮️ Undo/Redo**
12
+
13
+ ## Features
14
+
15
+ - ✅ **Cross-Platform Support**: Works on both Windows and macOS
16
+ - ✅ **Multiple Photoshop Versions**: Supports Photoshop 2012-2025+
17
+ - ✅ **ExtendScript API**: Universal compatibility via AppleScript/COM automation
18
+ - ✅ **Auto-Detection**: Automatically finds Photoshop installation on your system
19
+ - ✅ **50+ Tools**: Comprehensive Photoshop automation
20
+ - ✅ **Document Management**: Create, open, save, close, crop documents
21
+ - ✅ **Layer Operations**: Create, delete, duplicate, merge, transform layers
22
+ - ✅ **Layer Properties**: Opacity, blend modes, visibility, locking
23
+ - ✅ **Text Formatting**: Font, size, color, alignment controls
24
+ - ✅ **Image Placement**: Place images, open files, fit to document
25
+ - ✅ **Filters**: Gaussian Blur, Sharpen, Noise, Motion Blur
26
+ - ✅ **Color Adjustments**: Brightness/Contrast, Hue/Saturation, Auto Levels/Contrast
27
+ - ✅ **Selections & Masks**: Rectangular selections, layer masks
28
+ - ✅ **History Control**: Undo/Redo operations, view history states
29
+ - ✅ **Actions**: Play recorded actions, execute custom scripts
30
+ - ✅ **Auto-Rasterize**: Automatically converts layers when needed for filters
31
+ - ✅ **Context Tracking**: Returns document/layer state after each operation for AI context awareness
32
+ - ✅ **NPX Support**: Easy execution via npx without installation
33
+
34
+ ## Installation
35
+
36
+ ### Using NPX (Recommended)
37
+
38
+ No installation required! Just configure your MCP client:
39
+
40
+ ```bash
41
+ npx @alisaitteke/photoshop-mcp
42
+ ```
43
+
44
+ ### From Source
45
+
46
+ ```bash
47
+ git clone https://github.com/yourusername/photoshop-mcp.git
48
+ cd photoshop-mcp
49
+ npm install
50
+ npm run build
51
+ ```
52
+
53
+ ## Configuration
54
+
55
+ ### For Cursor
56
+
57
+ Add to your Cursor settings (`.cursor/config.json` or workspace settings):
58
+
59
+ ```json
60
+ {
61
+ "mcpServers": {
62
+ "photoshop": {
63
+ "command": "npx",
64
+ "args": ["-y", "@alisaitteke/photoshop-mcp"],
65
+ "env": {
66
+ "LOG_LEVEL": "1"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ### For Claude Desktop
74
+
75
+ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
76
+
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "photoshop": {
81
+ "command": "npx",
82
+ "args": ["-y", "@alisaitteke/photoshop-mcp"],
83
+ "env": {
84
+ "LOG_LEVEL": "1"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ ### Environment Variables
92
+
93
+ - `PHOTOSHOP_PATH`: (Optional) Specify custom Photoshop installation path
94
+ - `LOG_LEVEL`: Logging level (0=DEBUG, 1=INFO, 2=WARN, 3=ERROR)
95
+
96
+ ## Available Tools
97
+
98
+ ### Connection & Info
99
+
100
+ #### `photoshop_ping`
101
+ Test connection to Photoshop.
102
+
103
+ ```javascript
104
+ // Example: Check if Photoshop is accessible
105
+ photoshop_ping()
106
+ ```
107
+
108
+ #### `photoshop_get_version`
109
+ Get Photoshop version information.
110
+
111
+ ```javascript
112
+ // Example: Get version details
113
+ photoshop_get_version()
114
+ ```
115
+
116
+ ### Document Management
117
+
118
+ #### `photoshop_create_document`
119
+ Create a new Photoshop document.
120
+
121
+ **Parameters:**
122
+ - `width` (number, required): Document width in pixels
123
+ - `height` (number, required): Document height in pixels
124
+ - `resolution` (number, optional): DPI resolution (default: 72)
125
+ - `colorMode` (string, optional): Color mode - RGB, CMYK, or Grayscale (default: RGB)
126
+
127
+ ```javascript
128
+ // Example: Create a 1920x1080 RGB document
129
+ photoshop_create_document({
130
+ width: 1920,
131
+ height: 1080,
132
+ resolution: 72,
133
+ colorMode: "RGB"
134
+ })
135
+ ```
136
+
137
+ #### `photoshop_get_document_info`
138
+ Get information about the active document.
139
+
140
+ ```javascript
141
+ // Example: Get current document details
142
+ photoshop_get_document_info()
143
+ ```
144
+
145
+ #### `photoshop_save_document`
146
+ Save the active document.
147
+
148
+ **Parameters:**
149
+ - `path` (string, required): Full path where to save
150
+ - `format` (string, optional): PSD, JPEG, or PNG (default: PSD)
151
+ - `quality` (number, optional): JPEG quality 1-12 (default: 8)
152
+
153
+ ```javascript
154
+ // Example: Save as JPEG
155
+ photoshop_save_document({
156
+ path: "/Users/username/Desktop/output.jpg",
157
+ format: "JPEG",
158
+ quality: 10
159
+ })
160
+ ```
161
+
162
+ #### `photoshop_close_document`
163
+ Close the active document.
164
+
165
+ **Parameters:**
166
+ - `save` (boolean, optional): Save before closing (default: false)
167
+
168
+ ```javascript
169
+ // Example: Close without saving
170
+ photoshop_close_document({ save: false })
171
+ ```
172
+
173
+ ### Layer Operations
174
+
175
+ #### `photoshop_create_layer`
176
+ Create a new layer.
177
+
178
+ **Parameters:**
179
+ - `name` (string, optional): Layer name
180
+
181
+ ```javascript
182
+ // Example: Create a named layer
183
+ photoshop_create_layer({ name: "Background" })
184
+ ```
185
+
186
+ #### `photoshop_delete_layer`
187
+ Delete the active layer.
188
+
189
+ ```javascript
190
+ // Example: Delete current layer
191
+ photoshop_delete_layer()
192
+ ```
193
+
194
+ #### `photoshop_create_text_layer`
195
+ Create a text layer.
196
+
197
+ **Parameters:**
198
+ - `text` (string, required): Text content
199
+ - `x` (number, optional): X position in pixels (default: 100)
200
+ - `y` (number, optional): Y position in pixels (default: 100)
201
+ - `fontSize` (number, optional): Font size in points (default: 24)
202
+
203
+ ```javascript
204
+ // Example: Create a text layer
205
+ photoshop_create_text_layer({
206
+ text: "Hello World",
207
+ x: 200,
208
+ y: 150,
209
+ fontSize: 48
210
+ })
211
+ ```
212
+
213
+ #### `photoshop_fill_layer`
214
+ Fill the active layer with a solid color.
215
+
216
+ **Parameters:**
217
+ - `red` (number, required): Red component (0-255)
218
+ - `green` (number, required): Green component (0-255)
219
+ - `blue` (number, required): Blue component (0-255)
220
+
221
+ ```javascript
222
+ // Example: Fill with blue
223
+ photoshop_fill_layer({
224
+ red: 0,
225
+ green: 100,
226
+ blue: 255
227
+ })
228
+ ```
229
+
230
+ #### `photoshop_get_layers`
231
+ Get list of all layers in the active document.
232
+
233
+ ```javascript
234
+ // Example: List all layers
235
+ photoshop_get_layers()
236
+ ```
237
+
238
+ #### `photoshop_set_layer_opacity`
239
+ Set the opacity of the active layer.
240
+
241
+ **Parameters:**
242
+ - `opacity` (number, required): Opacity value (0-100)
243
+
244
+ ```javascript
245
+ // Example: Set opacity to 75%
246
+ photoshop_set_layer_opacity({ opacity: 75 })
247
+ ```
248
+
249
+ #### `photoshop_set_layer_blend_mode`
250
+ Set the blend mode of the active layer.
251
+
252
+ **Parameters:**
253
+ - `blendMode` (string, required): Blend mode (NORMAL, MULTIPLY, SCREEN, OVERLAY, etc.)
254
+
255
+ ```javascript
256
+ // Example: Set blend mode to multiply
257
+ photoshop_set_layer_blend_mode({ blendMode: "MULTIPLY" })
258
+ ```
259
+
260
+ Available blend modes: NORMAL, DISSOLVE, DARKEN, MULTIPLY, COLORBURN, LINEARBURN, DARKERCOLOR, LIGHTEN, SCREEN, COLORDODGE, LINEARDODGE, LIGHTERCOLOR, OVERLAY, SOFTLIGHT, HARDLIGHT, VIVIDLIGHT, LINEARLIGHT, PINLIGHT, HARDMIX, DIFFERENCE, EXCLUSION, SUBTRACT, DIVIDE, HUE, SATURATION, COLOR, LUMINOSITY
261
+
262
+ #### `photoshop_set_layer_visibility`
263
+ Show or hide the active layer.
264
+
265
+ **Parameters:**
266
+ - `visible` (boolean, required): Visibility state
267
+
268
+ ```javascript
269
+ // Example: Hide layer
270
+ photoshop_set_layer_visibility({ visible: false })
271
+ ```
272
+
273
+ #### `photoshop_set_layer_locked`
274
+ Lock or unlock the active layer.
275
+
276
+ **Parameters:**
277
+ - `locked` (boolean, required): Lock state
278
+
279
+ ```javascript
280
+ // Example: Lock layer
281
+ photoshop_set_layer_locked({ locked: true })
282
+ ```
283
+
284
+ #### `photoshop_rename_layer`
285
+ Rename the active layer.
286
+
287
+ **Parameters:**
288
+ - `name` (string, required): New layer name
289
+
290
+ ```javascript
291
+ // Example: Rename layer
292
+ photoshop_rename_layer({ name: "Hero Image" })
293
+ ```
294
+
295
+ #### `photoshop_duplicate_layer`
296
+ Duplicate the active layer.
297
+
298
+ **Parameters:**
299
+ - `newName` (string, optional): Name for duplicated layer
300
+
301
+ ```javascript
302
+ // Example: Duplicate layer with new name
303
+ photoshop_duplicate_layer({ newName: "Background Copy" })
304
+ ```
305
+
306
+ #### `photoshop_merge_visible_layers`
307
+ Merge all visible layers into one.
308
+
309
+ ```javascript
310
+ // Example: Merge visible layers
311
+ photoshop_merge_visible_layers()
312
+ ```
313
+
314
+ #### `photoshop_flatten_image`
315
+ Flatten all layers into a single background layer.
316
+
317
+ ```javascript
318
+ // Example: Flatten image
319
+ photoshop_flatten_image()
320
+ ```
321
+
322
+ #### `photoshop_rasterize_layer`
323
+ Rasterize the active layer (convert text/smart object to normal layer).
324
+
325
+ ```javascript
326
+ // Example: Rasterize layer
327
+ photoshop_rasterize_layer()
328
+ ```
329
+
330
+ ### Layer Ordering
331
+
332
+ #### `photoshop_move_layer_to_position`
333
+ Move the active layer relative to another layer.
334
+
335
+ **Parameters:**
336
+ - `targetLayerName` (string, required): Name of the reference layer
337
+ - `position` (string, required): ABOVE, BELOW, TOP, or BOTTOM
338
+
339
+ ```javascript
340
+ // Example: Move layer above "Background"
341
+ photoshop_move_layer_to_position({
342
+ targetLayerName: "Background",
343
+ position: "ABOVE"
344
+ })
345
+ ```
346
+
347
+ #### `photoshop_move_layer_to_top`
348
+ Move the active layer to the top of the layer stack.
349
+
350
+ ```javascript
351
+ // Example: Move to top
352
+ photoshop_move_layer_to_top()
353
+ ```
354
+
355
+ #### `photoshop_move_layer_to_bottom`
356
+ Move the active layer to the bottom of the layer stack.
357
+
358
+ ```javascript
359
+ // Example: Move to bottom
360
+ photoshop_move_layer_to_bottom()
361
+ ```
362
+
363
+ #### `photoshop_move_layer_up`
364
+ Move the active layer up one position.
365
+
366
+ ```javascript
367
+ // Example: Move up
368
+ photoshop_move_layer_up()
369
+ ```
370
+
371
+ #### `photoshop_move_layer_down`
372
+ Move the active layer down one position.
373
+
374
+ ```javascript
375
+ // Example: Move down
376
+ photoshop_move_layer_down()
377
+ ```
378
+
379
+ ### Layer Transformations
380
+
381
+ #### `photoshop_fit_layer_to_document`
382
+ Scale the active layer to fit the document canvas while maintaining aspect ratio.
383
+
384
+ **Parameters:**
385
+ - `fillDocument` (boolean, optional): If true, fills entire canvas (may crop). If false, fits within canvas (may have margins). Default: false
386
+
387
+ ```javascript
388
+ // Example: Fit layer within canvas
389
+ photoshop_fit_layer_to_document({ fillDocument: false })
390
+
391
+ // Example: Fill entire canvas (cropping if needed)
392
+ photoshop_fit_layer_to_document({ fillDocument: true })
393
+ ```
394
+
395
+ #### `photoshop_scale_layer`
396
+ Scale the active layer by a percentage.
397
+
398
+ **Parameters:**
399
+ - `scalePercent` (number, required): Scale percentage (e.g., 50 for 50%, 200 for 200%)
400
+ - `centerAnchor` (boolean, optional): Scale from center (true) or top-left (false). Default: true
401
+
402
+ ```javascript
403
+ // Example: Scale to 150%
404
+ photoshop_scale_layer({
405
+ scalePercent: 150,
406
+ centerAnchor: true
407
+ })
408
+ ```
409
+
410
+ #### `photoshop_move_layer`
411
+ Move the active layer by specified offset.
412
+
413
+ **Parameters:**
414
+ - `deltaX` (number, required): Horizontal offset in pixels
415
+ - `deltaY` (number, required): Vertical offset in pixels
416
+
417
+ ```javascript
418
+ // Example: Move layer 100px right and 50px down
419
+ photoshop_move_layer({
420
+ deltaX: 100,
421
+ deltaY: 50
422
+ })
423
+ ```
424
+
425
+ #### `photoshop_rotate_layer`
426
+ Rotate the active layer.
427
+
428
+ **Parameters:**
429
+ - `degrees` (number, required): Rotation angle in degrees (positive = clockwise)
430
+
431
+ ```javascript
432
+ // Example: Rotate 45 degrees clockwise
433
+ photoshop_rotate_layer({ degrees: 45 })
434
+ ```
435
+
436
+ ### Filters
437
+
438
+ #### `photoshop_apply_gaussian_blur`
439
+ Apply Gaussian Blur filter to the active layer.
440
+
441
+ **Parameters:**
442
+ - `radius` (number, required): Blur radius in pixels (0.1-250)
443
+
444
+ ```javascript
445
+ // Example: Apply 10px blur
446
+ photoshop_apply_gaussian_blur({ radius: 10 })
447
+ ```
448
+
449
+ #### `photoshop_apply_sharpen`
450
+ Apply Unsharp Mask (sharpen) filter.
451
+
452
+ **Parameters:**
453
+ - `amount` (number, required): Sharpening amount in percent (1-500)
454
+ - `radius` (number, required): Radius in pixels (0.1-250)
455
+ - `threshold` (number, optional): Threshold levels (0-255, default: 0)
456
+
457
+ ```javascript
458
+ // Example: Sharpen image
459
+ photoshop_apply_sharpen({
460
+ amount: 100,
461
+ radius: 1.5,
462
+ threshold: 0
463
+ })
464
+ ```
465
+
466
+ #### `photoshop_apply_noise`
467
+ Apply Add Noise filter.
468
+
469
+ **Parameters:**
470
+ - `amount` (number, required): Noise amount in percent (0.1-400)
471
+ - `distribution` (string, optional): UNIFORM or GAUSSIAN (default: UNIFORM)
472
+ - `monochromatic` (boolean, optional): Monochromatic noise (default: false)
473
+
474
+ ```javascript
475
+ // Example: Add noise
476
+ photoshop_apply_noise({
477
+ amount: 10,
478
+ distribution: "GAUSSIAN",
479
+ monochromatic: false
480
+ })
481
+ ```
482
+
483
+ #### `photoshop_apply_motion_blur`
484
+ Apply Motion Blur filter.
485
+
486
+ **Parameters:**
487
+ - `angle` (number, required): Blur angle in degrees (-360 to 360)
488
+ - `radius` (number, required): Blur distance in pixels (1-999)
489
+
490
+ ```javascript
491
+ // Example: Apply motion blur
492
+ photoshop_apply_motion_blur({
493
+ angle: 45,
494
+ radius: 20
495
+ })
496
+ ```
497
+
498
+ ### Color Adjustments
499
+
500
+ #### `photoshop_adjust_brightness_contrast`
501
+ Adjust brightness and contrast.
502
+
503
+ **Parameters:**
504
+ - `brightness` (number, required): Brightness adjustment (-100 to 100)
505
+ - `contrast` (number, required): Contrast adjustment (-100 to 100)
506
+
507
+ ```javascript
508
+ // Example: Increase brightness and contrast
509
+ photoshop_adjust_brightness_contrast({
510
+ brightness: 20,
511
+ contrast: 15
512
+ })
513
+ ```
514
+
515
+ #### `photoshop_adjust_hue_saturation`
516
+ Adjust hue, saturation, and lightness.
517
+
518
+ **Parameters:**
519
+ - `hue` (number, required): Hue shift (-180 to 180)
520
+ - `saturation` (number, required): Saturation adjustment (-100 to 100)
521
+ - `lightness` (number, required): Lightness adjustment (-100 to 100)
522
+
523
+ ```javascript
524
+ // Example: Adjust colors
525
+ photoshop_adjust_hue_saturation({
526
+ hue: 30,
527
+ saturation: 20,
528
+ lightness: 0
529
+ })
530
+ ```
531
+
532
+ #### `photoshop_auto_levels`
533
+ Apply auto levels adjustment.
534
+
535
+ ```javascript
536
+ // Example: Auto levels
537
+ photoshop_auto_levels()
538
+ ```
539
+
540
+ #### `photoshop_auto_contrast`
541
+ Apply auto contrast adjustment.
542
+
543
+ ```javascript
544
+ // Example: Auto contrast
545
+ photoshop_auto_contrast()
546
+ ```
547
+
548
+ #### `photoshop_desaturate`
549
+ Desaturate the layer (convert to grayscale).
550
+
551
+ ```javascript
552
+ // Example: Desaturate
553
+ photoshop_desaturate()
554
+ ```
555
+
556
+ #### `photoshop_invert`
557
+ Invert colors of the layer.
558
+
559
+ ```javascript
560
+ // Example: Invert colors
561
+ photoshop_invert()
562
+ ```
563
+
564
+ ### Text Formatting
565
+
566
+ #### `photoshop_set_text_font`
567
+ Set font family and size for active text layer.
568
+
569
+ **Parameters:**
570
+ - `fontName` (string, required): Font family name
571
+ - `fontSize` (number, optional): Font size in points
572
+
573
+ ```javascript
574
+ // Example: Change font
575
+ photoshop_set_text_font({
576
+ fontName: "Helvetica",
577
+ fontSize: 48
578
+ })
579
+ ```
580
+
581
+ #### `photoshop_set_text_color`
582
+ Set color for active text layer.
583
+
584
+ **Parameters:**
585
+ - `red` (number, required): Red component (0-255)
586
+ - `green` (number, required): Green component (0-255)
587
+ - `blue` (number, required): Blue component (0-255)
588
+
589
+ ```javascript
590
+ // Example: Set text to blue
591
+ photoshop_set_text_color({
592
+ red: 0,
593
+ green: 100,
594
+ blue: 255
595
+ })
596
+ ```
597
+
598
+ #### `photoshop_set_text_alignment`
599
+ Set text alignment.
600
+
601
+ **Parameters:**
602
+ - `alignment` (string, required): LEFT, CENTER, RIGHT, LEFTJUSTIFIED, CENTERJUSTIFIED, RIGHTJUSTIFIED, FULLYJUSTIFIED
603
+
604
+ ```javascript
605
+ // Example: Center align text
606
+ photoshop_set_text_alignment({ alignment: "CENTER" })
607
+ ```
608
+
609
+ #### `photoshop_update_text_content`
610
+ Update text content of active text layer.
611
+
612
+ **Parameters:**
613
+ - `text` (string, required): New text content
614
+
615
+ ```javascript
616
+ // Example: Update text
617
+ photoshop_update_text_content({ text: "New Text" })
618
+ ```
619
+
620
+ ### Selections & Masks
621
+
622
+ #### `photoshop_select_rectangle`
623
+ Create a rectangular selection.
624
+
625
+ **Parameters:**
626
+ - `left`, `top`, `right`, `bottom` (number, required): Selection bounds in pixels
627
+
628
+ ```javascript
629
+ // Example: Select area
630
+ photoshop_select_rectangle({
631
+ left: 100,
632
+ top: 100,
633
+ right: 500,
634
+ bottom: 400
635
+ })
636
+ ```
637
+
638
+ #### `photoshop_select_all`
639
+ Select the entire document.
640
+
641
+ ```javascript
642
+ // Example: Select all
643
+ photoshop_select_all()
644
+ ```
645
+
646
+ #### `photoshop_deselect`
647
+ Clear all selections.
648
+
649
+ ```javascript
650
+ // Example: Deselect
651
+ photoshop_deselect()
652
+ ```
653
+
654
+ #### `photoshop_invert_selection`
655
+ Invert the current selection.
656
+
657
+ ```javascript
658
+ // Example: Invert selection
659
+ photoshop_invert_selection()
660
+ ```
661
+
662
+ #### `photoshop_create_layer_mask`
663
+ Create a layer mask from the current selection.
664
+
665
+ ```javascript
666
+ // Example: Create mask
667
+ photoshop_create_layer_mask()
668
+ ```
669
+
670
+ #### `photoshop_delete_layer_mask`
671
+ Delete the layer mask from active layer.
672
+
673
+ ```javascript
674
+ // Example: Delete mask
675
+ photoshop_delete_layer_mask()
676
+ ```
677
+
678
+ #### `photoshop_apply_layer_mask`
679
+ Apply (merge) the layer mask to the layer.
680
+
681
+ ```javascript
682
+ // Example: Apply mask
683
+ photoshop_apply_layer_mask()
684
+ ```
685
+
686
+ ### History & Undo/Redo
687
+
688
+ #### `photoshop_undo`
689
+ Undo the last operation(s) - equivalent to Ctrl/Cmd+Z.
690
+
691
+ **Parameters:**
692
+ - `steps` (number, optional): Number of steps to undo (default: 1)
693
+
694
+ ```javascript
695
+ // Example: Undo last operation
696
+ photoshop_undo()
697
+
698
+ // Example: Undo last 3 operations
699
+ photoshop_undo({ steps: 3 })
700
+ ```
701
+
702
+ #### `photoshop_redo`
703
+ Redo previously undone operation(s) - equivalent to Ctrl/Cmd+Shift+Z.
704
+
705
+ **Parameters:**
706
+ - `steps` (number, optional): Number of steps to redo (default: 1)
707
+
708
+ ```javascript
709
+ // Example: Redo last undone operation
710
+ photoshop_redo()
711
+
712
+ // Example: Redo last 2 undone operations
713
+ photoshop_redo({ steps: 2 })
714
+ ```
715
+
716
+ #### `photoshop_get_history`
717
+ Get the history states of the active document.
718
+
719
+ ```javascript
720
+ // Example: View history
721
+ photoshop_get_history()
722
+ ```
723
+
724
+ ### Actions & Automation
725
+
726
+ #### `photoshop_play_action`
727
+ Play a recorded action from the Actions palette.
728
+
729
+ **Parameters:**
730
+ - `actionName` (string, required): Action name
731
+ - `actionSetName` (string, required): Action set name
732
+
733
+ ```javascript
734
+ // Example: Play action
735
+ photoshop_play_action({
736
+ actionName: "My Action",
737
+ actionSetName: "Default Actions"
738
+ })
739
+ ```
740
+
741
+ #### `photoshop_execute_script`
742
+ Execute custom ExtendScript code (advanced).
743
+
744
+ **Parameters:**
745
+ - `code` (string, required): ExtendScript code
746
+
747
+ ```javascript
748
+ // Example: Execute custom code
749
+ photoshop_execute_script({
750
+ code: "app.beep();"
751
+ })
752
+ ```
753
+
754
+ ### Image Manipulation
755
+
756
+ #### `photoshop_resize_image`
757
+ Resize the active image.
758
+
759
+ **Parameters:**
760
+ - `width` (number, required): New width in pixels
761
+ - `height` (number, required): New height in pixels
762
+
763
+ ```javascript
764
+ // Example: Resize to Instagram post size
765
+ photoshop_resize_image({
766
+ width: 1080,
767
+ height: 1080
768
+ })
769
+ ```
770
+
771
+ #### `photoshop_crop_document`
772
+ Crop the document to specified bounds.
773
+
774
+ **Parameters:**
775
+ - `left` (number, required): Left edge in pixels
776
+ - `top` (number, required): Top edge in pixels
777
+ - `right` (number, required): Right edge in pixels
778
+ - `bottom` (number, required): Bottom edge in pixels
779
+
780
+ ```javascript
781
+ // Example: Crop document
782
+ photoshop_crop_document({
783
+ left: 100,
784
+ top: 100,
785
+ right: 1820,
786
+ bottom: 980
787
+ })
788
+ ```
789
+
790
+ #### `photoshop_place_image`
791
+ Place an image file as a layer in the active document.
792
+
793
+ **Parameters:**
794
+ - `filePath` (string, required): Full path to the image file
795
+ - `x` (number, optional): X position offset in pixels (default: 0)
796
+ - `y` (number, optional): Y position offset in pixels (default: 0)
797
+
798
+ ```javascript
799
+ // Example: Place an image at specific position
800
+ photoshop_place_image({
801
+ filePath: "/Users/username/Pictures/photo.jpg",
802
+ x: 100,
803
+ y: 200
804
+ })
805
+ ```
806
+
807
+ #### `photoshop_open_image`
808
+ Open an image file as a new document.
809
+
810
+ **Parameters:**
811
+ - `filePath` (string, required): Full path to the image file
812
+
813
+ ```javascript
814
+ // Example: Open an image
815
+ photoshop_open_image({
816
+ filePath: "/Users/username/Pictures/photo.jpg"
817
+ })
818
+ ```
819
+
820
+ ## Example Prompts
821
+
822
+ Below are example prompts you can use with AI assistants (Claude, Cursor, etc.) when this MCP server is configured:
823
+
824
+ <details>
825
+ <summary>🎨 Basic Design Creation</summary>
826
+
827
+ ```
828
+ Create a 1920x1080 Photoshop document with RGB color mode.
829
+ Add a light blue background layer and fill it with RGB(240, 248, 255).
830
+ Add centered text "Welcome" in 64pt font.
831
+ Save as welcome.psd to my Desktop.
832
+ ```
833
+
834
+ </details>
835
+
836
+ <details>
837
+ <summary>🖼️ Stock Image Design (with Pexels MCP)</summary>
838
+
839
+ ```
840
+ Search Pexels for "mountain sunset" images.
841
+ Create a 1920x1080 Photoshop document.
842
+ Place the downloaded image and fit it to fill the entire canvas.
843
+ Apply a subtle Gaussian blur of 3px.
844
+ Increase brightness by 15 and contrast by 10.
845
+ Add white text "Adventure Awaits" centered at the top in 72pt.
846
+ Set the text opacity to 90% and blend mode to OVERLAY.
847
+ Save as adventure.jpg with quality 10.
848
+ ```
849
+
850
+ </details>
851
+
852
+ <details>
853
+ <summary>✨ Photo Enhancement</summary>
854
+
855
+ ```
856
+ Open photo.jpg from my Desktop in Photoshop.
857
+ Apply auto levels and auto contrast.
858
+ Apply unsharp mask with amount 120%, radius 1.5, threshold 0.
859
+ Increase saturation by 15.
860
+ Crop to remove 100px from each edge.
861
+ Save as enhanced-photo.jpg with quality 12.
862
+ ```
863
+
864
+ </details>
865
+
866
+ <details>
867
+ <summary>🎭 Layer Effects & Blending</summary>
868
+
869
+ ```
870
+ Create a 1200x800 document.
871
+ Add a new layer named "Background" and fill with RGB(50, 50, 50).
872
+ Place logo.png at position (100, 100).
873
+ Fit the logo layer to 50% of its current size.
874
+ Set blend mode to SCREEN and opacity to 85%.
875
+ Add another layer, fill with RGB(255, 100, 50).
876
+ Set this layer's blend mode to MULTIPLY and opacity to 60%.
877
+ Merge all visible layers.
878
+ Save as composite.psd.
879
+ ```
880
+
881
+ </details>
882
+
883
+ <details>
884
+ <summary>📝 Text Poster Design</summary>
885
+
886
+ ```
887
+ Create a 1080x1350 portrait document (Instagram story size).
888
+ Add a layer and fill with gradient-like color RGB(120, 40, 200).
889
+ Add text "SUMMER" at (540, 300) in 96pt.
890
+ Change text color to white RGB(255, 255, 255).
891
+ Set text alignment to CENTER.
892
+ Add another text "2026" at (540, 450) in 128pt, white color.
893
+ Apply Gaussian blur 2px to the background layer.
894
+ Save as summer-poster.png.
895
+ ```
896
+
897
+ </details>
898
+
899
+ <details>
900
+ <summary>🎬 Batch Processing</summary>
901
+
902
+ ```
903
+ Open image1.jpg.
904
+ Resize to 1920x1080.
905
+ Apply auto contrast.
906
+ Apply subtle sharpen (amount 80%, radius 1.0).
907
+ Save as processed-1.jpg with quality 10.
908
+ Close without saving changes to original.
909
+
910
+ Repeat for image2.jpg and image3.jpg.
911
+ ```
912
+
913
+ </details>
914
+
915
+ <details>
916
+ <summary>🖌️ Creative Manipulation</summary>
917
+
918
+ ```
919
+ Create a 2000x2000 square document.
920
+ Place abstract-pattern.jpg and fit to fill document.
921
+ Duplicate the layer.
922
+ On the duplicate, apply motion blur at 45 degrees, radius 50px.
923
+ Set blend mode to OVERLAY and opacity to 70%.
924
+ Add centered text "MOTION" in 120pt white.
925
+ Apply a rectangular selection from (200, 200) to (1800, 1800).
926
+ Invert the selection and delete (to create a border effect).
927
+ Flatten the image.
928
+ Save as motion-art.jpg.
929
+ ```
930
+
931
+ </details>
932
+
933
+ <details>
934
+ <summary>🎯 Advanced Workflow</summary>
935
+
936
+ ```
937
+ Create a 3000x2000 document at 300 DPI for print.
938
+ Place hero-image.jpg and fit to fill the canvas.
939
+ Duplicate the image layer.
940
+ On the duplicate, desaturate it completely.
941
+ Set blend mode to LUMINOSITY and opacity to 50%.
942
+ Create a new layer named "Overlay".
943
+ Fill with RGB(255, 150, 0) and set blend mode to SOFTLIGHT at 30% opacity.
944
+ Add text "PORTFOLIO" at top center (1500, 200) in 96pt.
945
+ Set text color to white.
946
+ Add subtext "2026 Collection" at (1500, 320) in 36pt.
947
+ Create a rectangular selection around the text area.
948
+ Create a layer mask on the overlay layer.
949
+ Merge visible layers.
950
+ Save as portfolio-cover.psd.
951
+ Export as portfolio-cover.jpg at quality 12.
952
+ ```
953
+
954
+ </details>
955
+
956
+ <details>
957
+ <summary>🔄 Using Actions</summary>
958
+
959
+ ```
960
+ Open my-photo.jpg.
961
+ Play the "Vintage Look" action from "My Actions" set.
962
+ Adjust brightness by -10 to darken slightly.
963
+ Save as vintage-photo.jpg.
964
+ ```
965
+
966
+ </details>
967
+
968
+ <details>
969
+ <summary>⚡ Custom Script Execution</summary>
970
+
971
+ ```
972
+ Execute this custom ExtendScript code:
973
+ app.beep();
974
+ alert('Processing started!');
975
+ ```
976
+
977
+ </details>
978
+
979
+ <details>
980
+ <summary>⏮️ Undo/Redo Operations</summary>
981
+
982
+ ```
983
+ Apply Gaussian blur 15px to the active layer.
984
+ [Wait for result]
985
+ Actually, that's too much blur. Undo that.
986
+ Apply Gaussian blur 5px instead.
987
+ ```
988
+
989
+ Or:
990
+
991
+ ```
992
+ Get the history states to see what operations were performed.
993
+ Undo the last 3 operations.
994
+ Redo 1 step to bring back one operation.
995
+ ```
996
+
997
+ </details>
998
+
999
+ ---
1000
+
1001
+ ## Usage Examples
1002
+
1003
+ ### Create a Simple Design
1004
+
1005
+ ```javascript
1006
+ // 1. Create a new document
1007
+ photoshop_create_document({
1008
+ width: 800,
1009
+ height: 600,
1010
+ colorMode: "RGB"
1011
+ })
1012
+
1013
+ // 2. Create a background layer
1014
+ photoshop_create_layer({ name: "Background" })
1015
+
1016
+ // 3. Fill it with a color
1017
+ photoshop_fill_layer({
1018
+ red: 240,
1019
+ green: 240,
1020
+ blue: 255
1021
+ })
1022
+
1023
+ // 4. Add a text layer
1024
+ photoshop_create_text_layer({
1025
+ text: "My Design",
1026
+ x: 400,
1027
+ y: 300,
1028
+ fontSize: 64
1029
+ })
1030
+
1031
+ // 5. Save the result
1032
+ photoshop_save_document({
1033
+ path: "/Users/username/Desktop/design.psd",
1034
+ format: "PSD"
1035
+ })
1036
+ ```
1037
+
1038
+ ### Batch Process Images
1039
+
1040
+ ```javascript
1041
+ // 1. Open existing document (manual step)
1042
+ // 2. Resize image
1043
+ photoshop_resize_image({ width: 1920, height: 1080 })
1044
+
1045
+ // 3. Save as JPEG
1046
+ photoshop_save_document({
1047
+ path: "/Users/username/Desktop/resized.jpg",
1048
+ format: "JPEG",
1049
+ quality: 12
1050
+ })
1051
+
1052
+ // 4. Close document
1053
+ photoshop_close_document({ save: false })
1054
+ ```
1055
+
1056
+ ### Create Design with Stock Images (using Pexels MCP)
1057
+
1058
+ This example shows how to combine Photoshop MCP with Pexels MCP:
1059
+
1060
+ ```javascript
1061
+ // 1. Search for images on Pexels (using Pexels MCP server)
1062
+ // Note: You need to have Pexels MCP server configured
1063
+ pexels_photos_search({
1064
+ query: "nature landscape",
1065
+ per_page: 5
1066
+ })
1067
+
1068
+ // 2. Download the image you want (manually or via script)
1069
+ // 3. Create a new Photoshop document
1070
+ photoshop_create_document({
1071
+ width: 1920,
1072
+ height: 1080,
1073
+ colorMode: "RGB"
1074
+ })
1075
+
1076
+ // 4. Place the downloaded image
1077
+ photoshop_place_image({
1078
+ filePath: "/Users/username/Downloads/pexels-photo.jpg",
1079
+ x: 0,
1080
+ y: 0
1081
+ })
1082
+
1083
+ // 5. Fit the image to document (NEW!)
1084
+ photoshop_fit_layer_to_document({
1085
+ fillDocument: true // Fill entire canvas
1086
+ })
1087
+
1088
+ // 6. Add text overlay
1089
+ photoshop_create_text_layer({
1090
+ text: "Beautiful Nature",
1091
+ x: 960,
1092
+ y: 100,
1093
+ fontSize: 72
1094
+ })
1095
+
1096
+ // 7. Save the final design
1097
+ photoshop_save_document({
1098
+ path: "/Users/username/Desktop/nature-design.psd",
1099
+ format: "PSD"
1100
+ })
1101
+ ```
1102
+
1103
+ ## Context Tracking
1104
+
1105
+ Each tool returns comprehensive context information about the current state of Photoshop, including:
1106
+
1107
+ - **Document Info**: Name, dimensions, resolution, color mode, layer count
1108
+ - **Active Layer Info**: Name, type, opacity, blend mode, visibility, lock state
1109
+ - **Selection State**: Whether a selection is active
1110
+ - **Operation Result**: Specific details about what was changed
1111
+
1112
+ This allows AI assistants to maintain awareness of:
1113
+ - Which document is active
1114
+ - Which layer is being worked on
1115
+ - Current layer properties (opacity, blend mode, etc.)
1116
+ - Document dimensions and settings
1117
+
1118
+ **Example Response:**
1119
+ ```javascript
1120
+ {
1121
+ "applied": true,
1122
+ "filter": "Gaussian Blur",
1123
+ "radius": 10,
1124
+ "wasRasterized": true,
1125
+ "context": {
1126
+ "hasDocument": true,
1127
+ "document": {
1128
+ "name": "design.psd",
1129
+ "width": 1920,
1130
+ "height": 1080,
1131
+ "resolution": 72,
1132
+ "colorMode": "RGBColorMode",
1133
+ "layerCount": 3,
1134
+ "hasSelection": false
1135
+ },
1136
+ "activeLayer": {
1137
+ "name": "Background",
1138
+ "kind": "NORMAL",
1139
+ "opacity": 100,
1140
+ "blendMode": "NORMAL",
1141
+ "visible": true,
1142
+ "locked": false,
1143
+ "isBackground": false
1144
+ }
1145
+ }
1146
+ }
1147
+ ```
1148
+
1149
+ This context helps AI assistants remember what document and layer they're working on across multiple commands.
1150
+
1151
+ ---
1152
+
1153
+ ## Platform-Specific Notes
1154
+
1155
+ ### Windows
1156
+
1157
+ - Uses COM automation to communicate with Photoshop
1158
+ - Registry-based auto-detection for installation paths
1159
+ - Supports both 32-bit and 64-bit versions
1160
+
1161
+ ### macOS
1162
+
1163
+ - Uses AppleScript/OSA for Photoshop communication
1164
+ - Spotlight-based auto-detection
1165
+ - Supports multiple Photoshop versions installed simultaneously
1166
+
1167
+ ## Supported Photoshop Versions
1168
+
1169
+ - **All Photoshop versions** (2012-2025+): Uses ExtendScript API via AppleScript (macOS) or COM (Windows)
1170
+
1171
+ **Important Note**: While Photoshop 2022+ supports UXP for plugins, external automation via AppleScript/COM can only use ExtendScript. UXP is designed for internal plugins and cannot be invoked from external scripts. Therefore, this MCP server uses ExtendScript for maximum compatibility across all Photoshop versions.
1172
+
1173
+ ## Troubleshooting
1174
+
1175
+ ### "Photoshop not found"
1176
+
1177
+ 1. Make sure Photoshop is installed in the default location
1178
+ 2. Or set `PHOTOSHOP_PATH` environment variable to custom installation path
1179
+
1180
+ ```json
1181
+ {
1182
+ "env": {
1183
+ "PHOTOSHOP_PATH": "C:\\Custom\\Path\\Adobe Photoshop 2025\\Photoshop.exe"
1184
+ }
1185
+ }
1186
+ ```
1187
+
1188
+ ### "Failed to connect to Photoshop"
1189
+
1190
+ 1. Ensure Photoshop is running (the server will try to launch it if not)
1191
+ 2. Check that scripting is enabled in Photoshop preferences
1192
+ 3. On Windows, verify COM automation is not blocked by security settings
1193
+
1194
+ ### "Script execution timeout"
1195
+
1196
+ - Some operations may take longer on large documents
1197
+ - The default timeout is 30 seconds
1198
+ - For complex operations, consider breaking them into smaller steps
1199
+
1200
+ ### Debug Logging
1201
+
1202
+ Enable detailed logging by setting `LOG_LEVEL=0`:
1203
+
1204
+ ```json
1205
+ {
1206
+ "env": {
1207
+ "LOG_LEVEL": "0"
1208
+ }
1209
+ }
1210
+ ```
1211
+
1212
+ ## Development
1213
+
1214
+ ### Build
1215
+
1216
+ ```bash
1217
+ npm run build
1218
+ ```
1219
+
1220
+ ### Watch Mode
1221
+
1222
+ ```bash
1223
+ npm run dev
1224
+ ```
1225
+
1226
+ ### Lint & Format
1227
+
1228
+ ```bash
1229
+ npm run lint
1230
+ npm run format
1231
+ ```
1232
+
1233
+ ## Quick Start Examples
1234
+
1235
+ ### 💡 Common Use Cases
1236
+
1237
+ | Task | Prompt Example |
1238
+ |------|----------------|
1239
+ | **Basic Design** | "Create 1920x1080 document, add blue background, center text 'Hello'" |
1240
+ | **Photo Edit** | "Open photo.jpg, apply auto levels, sharpen 100%, save as edited.jpg" |
1241
+ | **Stock Image** | "Place image.jpg, fit to fill canvas, add overlay text 'Summer 2026'" |
1242
+ | **Layer Effects** | "Set active layer blend mode to MULTIPLY, opacity 80%" |
1243
+ | **Filters** | "Apply 10px Gaussian blur to current layer" |
1244
+ | **Text Styling** | "Change text to Helvetica 64pt, color red, center aligned" |
1245
+ | **Batch Work** | "Resize to 1080x1080, auto contrast, save as square.jpg, close" |
1246
+ | **Masks** | "Select rectangle 100,100 to 500,500, create layer mask" |
1247
+
1248
+ ---
1249
+
1250
+ ## Architecture
1251
+
1252
+ ```
1253
+ photoshop-mcp/
1254
+ ├── src/
1255
+ │ ├── core/ # MCP server core
1256
+ │ │ ├── server.ts # Main MCP server
1257
+ │ │ ├── session.ts # Session management
1258
+ │ │ └── tool-registry.ts # Tool registration system
1259
+ │ ├── platform/ # Platform-specific detection & execution
1260
+ │ │ ├── detector.ts # Main detector
1261
+ │ │ ├── connection.ts # Connection manager
1262
+ │ │ ├── windows-detector.ts # Windows registry detection
1263
+ │ │ ├── windows-executor.ts # Windows COM automation
1264
+ │ │ ├── macos-detector.ts # macOS Spotlight detection
1265
+ │ │ └── macos-executor.ts # macOS AppleScript execution
1266
+ │ ├── api/ # Photoshop API abstractions
1267
+ │ │ ├── photoshop-api.ts # API factory
1268
+ │ │ ├── batch-play.ts # UXP batchPlay helpers (legacy)
1269
+ │ │ └── extendscript.ts # ExtendScript snippets library
1270
+ │ ├── tools/ # MCP tool implementations (42+ tools)
1271
+ │ │ ├── document-tools.ts # Document operations
1272
+ │ │ ├── layer-tools.ts # Layer creation/deletion
1273
+ │ │ ├── layer-properties-tools.ts # Opacity, blend modes, etc.
1274
+ │ │ ├── layer-transform-tools.ts # Scale, rotate, move
1275
+ │ │ ├── image-tools.ts # Resize, crop
1276
+ │ │ ├── image-placement-tools.ts # Place/open images
1277
+ │ │ ├── filter-tools.ts # Blur, sharpen, noise
1278
+ │ │ ├── adjustment-tools.ts # Color adjustments
1279
+ │ │ ├── text-tools.ts # Text formatting
1280
+ │ │ ├── selection-tools.ts # Selections & masks
1281
+ │ │ └── action-tools.ts # Actions & custom scripts
1282
+ │ └── utils/ # Utilities
1283
+ │ └── logger.ts # Logging system (stderr-based)
1284
+ └── examples/ # Configuration examples
1285
+ ├── cursor-config.json
1286
+ └── claude-desktop-config.json
1287
+ ```
1288
+
1289
+ ## Contributing
1290
+
1291
+ Contributions are welcome! Please feel free to submit a Pull Request.
1292
+
1293
+ ## License
1294
+
1295
+ MIT
1296
+
1297
+ ## Acknowledgments
1298
+
1299
+ - Built with the [Model Context Protocol SDK](https://github.com/modelcontextprotocol/sdk)
1300
+ - Inspired by the Adobe Photoshop scripting community