@alisaitteke/photoshop-mcp 1.3.13 → 1.6.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 (166) hide show
  1. package/README.de.md +787 -0
  2. package/README.es.md +737 -0
  3. package/README.ja.md +732 -0
  4. package/README.md +204 -41
  5. package/README.tr.md +842 -0
  6. package/README.zh-CN.md +727 -0
  7. package/dist/api/extendscript.d.ts +17 -1
  8. package/dist/api/extendscript.d.ts.map +1 -1
  9. package/dist/api/extendscript.js +301 -3
  10. package/dist/api/extendscript.js.map +1 -1
  11. package/dist/api/photoshop-api.d.ts +1 -1
  12. package/dist/api/photoshop-api.d.ts.map +1 -1
  13. package/dist/api/photoshop-api.js +4 -4
  14. package/dist/api/photoshop-api.js.map +1 -1
  15. package/dist/core/server.d.ts.map +1 -1
  16. package/dist/core/server.js +8 -0
  17. package/dist/core/server.js.map +1 -1
  18. package/dist/errors/envelope.d.ts +1 -1
  19. package/dist/errors/envelope.d.ts.map +1 -1
  20. package/dist/errors/envelope.js +4 -0
  21. package/dist/errors/envelope.js.map +1 -1
  22. package/dist/platform/capabilities.d.ts +7 -0
  23. package/dist/platform/capabilities.d.ts.map +1 -1
  24. package/dist/platform/capabilities.js +23 -1
  25. package/dist/platform/capabilities.js.map +1 -1
  26. package/dist/platform/macos-detector.d.ts.map +1 -1
  27. package/dist/platform/macos-detector.js +7 -4
  28. package/dist/platform/macos-detector.js.map +1 -1
  29. package/dist/platform/macos-executor.d.ts +11 -0
  30. package/dist/platform/macos-executor.d.ts.map +1 -1
  31. package/dist/platform/macos-executor.js +103 -32
  32. package/dist/platform/macos-executor.js.map +1 -1
  33. package/dist/platform/uxp-bridge-client.d.ts +13 -0
  34. package/dist/platform/uxp-bridge-client.d.ts.map +1 -0
  35. package/dist/platform/uxp-bridge-client.js +31 -0
  36. package/dist/platform/uxp-bridge-client.js.map +1 -0
  37. package/dist/platform/uxp-bridge-server.d.ts +16 -0
  38. package/dist/platform/uxp-bridge-server.d.ts.map +1 -0
  39. package/dist/platform/uxp-bridge-server.js +105 -0
  40. package/dist/platform/uxp-bridge-server.js.map +1 -0
  41. package/dist/prompts/instructions.d.ts.map +1 -1
  42. package/dist/prompts/instructions.js +21 -12
  43. package/dist/prompts/instructions.js.map +1 -1
  44. package/dist/prompts/registry.d.ts +2 -2
  45. package/dist/prompts/registry.d.ts.map +1 -1
  46. package/dist/prompts/registry.js +15 -0
  47. package/dist/prompts/registry.js.map +1 -1
  48. package/dist/prompts/templates/batch-watermark.d.ts +3 -0
  49. package/dist/prompts/templates/batch-watermark.d.ts.map +1 -0
  50. package/dist/prompts/templates/batch-watermark.js +67 -0
  51. package/dist/prompts/templates/batch-watermark.js.map +1 -0
  52. package/dist/prompts/templates/generative-expand.d.ts +3 -0
  53. package/dist/prompts/templates/generative-expand.d.ts.map +1 -0
  54. package/dist/prompts/templates/generative-expand.js +34 -0
  55. package/dist/prompts/templates/generative-expand.js.map +1 -0
  56. package/dist/prompts/templates/generative-fill.d.ts +3 -0
  57. package/dist/prompts/templates/generative-fill.d.ts.map +1 -0
  58. package/dist/prompts/templates/generative-fill.js +29 -0
  59. package/dist/prompts/templates/generative-fill.js.map +1 -0
  60. package/dist/prompts/templates/generative-remove.d.ts +3 -0
  61. package/dist/prompts/templates/generative-remove.d.ts.map +1 -0
  62. package/dist/prompts/templates/generative-remove.js +36 -0
  63. package/dist/prompts/templates/generative-remove.js.map +1 -0
  64. package/dist/prompts/templates/passport-photo.d.ts +3 -0
  65. package/dist/prompts/templates/passport-photo.d.ts.map +1 -0
  66. package/dist/prompts/templates/passport-photo.js +36 -0
  67. package/dist/prompts/templates/passport-photo.js.map +1 -0
  68. package/dist/prompts/templates/remove-distraction.d.ts.map +1 -1
  69. package/dist/prompts/templates/remove-distraction.js +4 -5
  70. package/dist/prompts/templates/remove-distraction.js.map +1 -1
  71. package/dist/prompts/templates/split-carousel.d.ts +3 -0
  72. package/dist/prompts/templates/split-carousel.d.ts.map +1 -0
  73. package/dist/prompts/templates/split-carousel.js +49 -0
  74. package/dist/prompts/templates/split-carousel.js.map +1 -0
  75. package/dist/tools/generative/_shared.d.ts +14 -0
  76. package/dist/tools/generative/_shared.d.ts.map +1 -0
  77. package/dist/tools/generative/_shared.js +79 -0
  78. package/dist/tools/generative/_shared.js.map +1 -0
  79. package/dist/tools/generative-tools.d.ts +8 -0
  80. package/dist/tools/generative-tools.d.ts.map +1 -0
  81. package/dist/tools/generative-tools.js +221 -0
  82. package/dist/tools/generative-tools.js.map +1 -0
  83. package/dist/tools/layer-properties-tools.d.ts.map +1 -1
  84. package/dist/tools/layer-properties-tools.js +2 -1
  85. package/dist/tools/layer-properties-tools.js.map +1 -1
  86. package/dist/tools/neural-tools.d.ts +8 -0
  87. package/dist/tools/neural-tools.d.ts.map +1 -0
  88. package/dist/tools/neural-tools.js +99 -0
  89. package/dist/tools/neural-tools.js.map +1 -0
  90. package/dist/tools/recipes/_shared.d.ts +8 -0
  91. package/dist/tools/recipes/_shared.d.ts.map +1 -1
  92. package/dist/tools/recipes/_shared.js +45 -0
  93. package/dist/tools/recipes/_shared.js.map +1 -1
  94. package/dist/tools/recipes/batch-watermark.d.ts +4 -0
  95. package/dist/tools/recipes/batch-watermark.d.ts.map +1 -0
  96. package/dist/tools/recipes/batch-watermark.js +283 -0
  97. package/dist/tools/recipes/batch-watermark.js.map +1 -0
  98. package/dist/tools/recipes/enhance-portrait.d.ts.map +1 -1
  99. package/dist/tools/recipes/enhance-portrait.js +47 -0
  100. package/dist/tools/recipes/enhance-portrait.js.map +1 -1
  101. package/dist/tools/recipes/index.d.ts +1 -1
  102. package/dist/tools/recipes/index.d.ts.map +1 -1
  103. package/dist/tools/recipes/index.js +9 -0
  104. package/dist/tools/recipes/index.js.map +1 -1
  105. package/dist/tools/recipes/passport-photo.d.ts +4 -0
  106. package/dist/tools/recipes/passport-photo.d.ts.map +1 -0
  107. package/dist/tools/recipes/passport-photo.js +202 -0
  108. package/dist/tools/recipes/passport-photo.js.map +1 -0
  109. package/dist/tools/recipes/remove-background.d.ts.map +1 -1
  110. package/dist/tools/recipes/remove-background.js +5 -0
  111. package/dist/tools/recipes/remove-background.js.map +1 -1
  112. package/dist/tools/recipes/remove-distraction.d.ts.map +1 -1
  113. package/dist/tools/recipes/remove-distraction.js +48 -8
  114. package/dist/tools/recipes/remove-distraction.js.map +1 -1
  115. package/dist/tools/recipes/sky-blend.d.ts.map +1 -1
  116. package/dist/tools/recipes/sky-blend.js +43 -1
  117. package/dist/tools/recipes/sky-blend.js.map +1 -1
  118. package/dist/tools/recipes/split-carousel.d.ts +4 -0
  119. package/dist/tools/recipes/split-carousel.d.ts.map +1 -0
  120. package/dist/tools/recipes/split-carousel.js +163 -0
  121. package/dist/tools/recipes/split-carousel.js.map +1 -0
  122. package/dist/tools/state-tools.js +2 -2
  123. package/dist/tools/state-tools.js.map +1 -1
  124. package/dist/ui/cli.js +7 -1
  125. package/dist/ui/cli.js.map +1 -1
  126. package/dist/ui/providers/anthropic.d.ts.map +1 -1
  127. package/dist/ui/providers/anthropic.js +11 -1
  128. package/dist/ui/providers/anthropic.js.map +1 -1
  129. package/dist/ui/providers/types.d.ts +1 -0
  130. package/dist/ui/providers/types.d.ts.map +1 -1
  131. package/dist/ui/security/session-token.d.ts +24 -0
  132. package/dist/ui/security/session-token.d.ts.map +1 -0
  133. package/dist/ui/security/session-token.js +72 -0
  134. package/dist/ui/security/session-token.js.map +1 -0
  135. package/dist/ui/server.d.ts +4 -0
  136. package/dist/ui/server.d.ts.map +1 -1
  137. package/dist/ui/server.js +79 -11
  138. package/dist/ui/server.js.map +1 -1
  139. package/dist/utils/js-string.d.ts.map +1 -1
  140. package/dist/utils/js-string.js +6 -1
  141. package/dist/utils/js-string.js.map +1 -1
  142. package/package.json +8 -4
  143. package/uxp-plugin/index.html +20 -0
  144. package/uxp-plugin/main.js +139 -0
  145. package/uxp-plugin/manifest.json +26 -0
  146. package/web/dist/assets/index-SNfxhJjr.js +350 -0
  147. package/web/dist/assets/index-vi5C3hqd.css +1 -0
  148. package/web/dist/index.html +2 -2
  149. package/dist/analytics/client-ip.d.ts +0 -5
  150. package/dist/analytics/client-ip.d.ts.map +0 -1
  151. package/dist/analytics/client-ip.js +0 -39
  152. package/dist/analytics/client-ip.js.map +0 -1
  153. package/dist/analytics/debug-log.d.ts +0 -3
  154. package/dist/analytics/debug-log.d.ts.map +0 -1
  155. package/dist/analytics/debug-log.js +0 -21
  156. package/dist/analytics/debug-log.js.map +0 -1
  157. package/dist/prompts/templates.d.ts +0 -8
  158. package/dist/prompts/templates.d.ts.map +0 -1
  159. package/dist/prompts/templates.js +0 -162
  160. package/dist/prompts/templates.js.map +0 -1
  161. package/dist/tools/recipe-tools.d.ts +0 -4
  162. package/dist/tools/recipe-tools.d.ts.map +0 -1
  163. package/dist/tools/recipe-tools.js +0 -265
  164. package/dist/tools/recipe-tools.js.map +0 -1
  165. package/web/dist/assets/index-BgiXf1Jy.css +0 -1
  166. package/web/dist/assets/index-DvGX0LLy.js +0 -346
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
  </a>
7
7
  </p>
8
8
 
9
+ **Languages:** English · [简体中文](README.zh-CN.md) · [Español](README.es.md) · [Deutsch](README.de.md) · [日本語](README.ja.md) · [Türkçe](README.tr.md)
10
+
9
11
  *v1.1+ — recipe workflows, fewer round-trips, snappier sessions. Standalone UI ships **Action Plan (beta)** for plan-then-execute runs.*
10
12
 
11
13
  > **Note:** This is an unofficial, community-maintained project and is not affiliated with or endorsed by Adobe Inc.
@@ -124,6 +126,25 @@ Auth method is stored per provider in `~/.photoshop-mcp/data.db` (`authMethod`:
124
126
  photoshop-mcp-ui [--port 5174] [--host 127.0.0.1] [--no-open]
125
127
  ```
126
128
 
129
+ ### Local API security
130
+
131
+ The UI server stores your provider API keys and can drive Photoshop, so `/api/*`
132
+ is not open to everything running on your machine. Each request must pass three
133
+ checks:
134
+
135
+ 1. **Host** — must be the loopback address (or the `--host` you bound to) on the
136
+ server's port. Blocks DNS rebinding.
137
+ 2. **Origin** — when present, must match the UI's own origin. Blocks
138
+ cross-origin browser callers.
139
+ 3. **Session token** — a random per-start secret. Blocks other local processes,
140
+ which can forge any header but cannot read the token.
141
+
142
+ The browser never has to deal with the token: the server injects it into the
143
+ `index.html` it serves. For scripting, read it from
144
+ `~/.photoshop-mcp/ui-session.json` (chmod 600) and send it as `x-psmcp-token` or
145
+ `Authorization: Bearer`, or pin your own with `PSMCP_UI_TOKEN` before starting
146
+ the server. Requests without a valid token get `401 unauthorized`.
147
+
127
148
  ### Notes
128
149
 
129
150
  - The agent is restricted to Photoshop MCP tools only — built-in shell, file
@@ -150,15 +171,21 @@ requests into reliable Photoshop actions:
150
171
  - **Server `instructions`** — workflow contract advertised on MCP `initialize`
151
172
  (ping once, state-before-action, prefer recipes, error recovery). See
152
173
  [`src/prompts/instructions.ts`](src/prompts/instructions.ts).
153
- - **MCP `prompts` primitive** — 16 pre-engineered templates (12 recipe + 4 guide:
154
- `ps.enhance_portrait`, `ps.remove_background`, `ps.gradient_fade`, `ps.sky_blend`, …)
174
+ - **MCP `prompts` primitive** — 22 pre-engineered templates (15 recipe + 7 guide:
175
+ `ps.enhance_portrait`, `ps.remove_background`, `ps.generative_fill`, …)
155
176
  via `prompts/list` and `prompts/get`.
156
- - **Recipe tools** — 12 outcome-oriented `photoshop_recipe_*` tools (remove
177
+ - **Recipe tools** — 15 outcome-oriented `photoshop_recipe_*` tools (remove
157
178
  background, enhance portrait, prepare for web, export social variants, color
158
179
  grade, frequency separation, batch mockup, organize layers, gradient fade,
159
- sky blend, dodge & burn, remove distraction). Each wraps steps in a single
160
- Photoshop history state (one Undo reverts all). **80 tools total** (68 atomic
161
- + 12 recipe).
180
+ sky blend, dodge & burn, remove distraction, split carousel, batch watermark,
181
+ passport photo). Each wraps steps in a single
182
+ Photoshop history state (one Undo reverts all). **89 tools total** (74 atomic
183
+ + 15 recipe).
184
+ - **Generative AI** — `photoshop_generative_fill`, `photoshop_generative_remove`,
185
+ `photoshop_generative_expand`, `photoshop_generative_upscale`, `photoshop_sky_replacement`,
186
+ `photoshop_generate_image` (Firefly via ExtendScript; Adobe account + credits required).
187
+ - **Neural Filters** — `photoshop_neural_filter` via optional UXP bridge plugin (`uxp-plugin/`):
188
+ skin smoothing, harmonize, depth blur, super zoom, and colorize (B&W → color).
162
189
  - **State & preview** — `photoshop_get_state` (cheap snapshot),
163
190
  `photoshop_get_preview` (base64 JPEG for vision verification),
164
191
  `photoshop_get_capabilities` (version-aware feature flags).
@@ -189,22 +216,13 @@ After each major recipe, get another preview to confirm the result.
189
216
 
190
217
  </details>
191
218
 
192
- <details>
193
- <summary>👤 Portrait retouch (recipe)</summary>
219
+ ### Recipes
194
220
 
195
- ```
196
- Enhance the portrait on the active layer at medium intensity with skin smoothing.
197
- Use the enhance-portrait recipe — I want frequency separation + auto-tone in one undoable step.
198
- If the active layer is text or a Smart Object, rasterize first or pick a raster layer.
199
- Show me a preview when done.
200
- ```
221
+ Every recipe wraps a multi-step outcome in a **single undo step** and maps 1:1 to a `ps.*` prompt template.
201
222
 
202
- Equivalent MCP prompt template: `ps.enhance_portrait` with `{ intensity: "medium", skin_smoothing: "true" }`.
223
+ #### ✂️ Background removal
203
224
 
204
- </details>
205
-
206
- <details>
207
- <summary>✂️ Background removal (recipe)</summary>
225
+ <img src="./images/recipe-remove-bg.svg" alt="Remove background: subject isolated on transparency via Select Subject + layer mask" width="640" />
208
226
 
209
227
  ```
210
228
  Remove the background from the active portrait layer.
@@ -214,21 +232,45 @@ The subject must be on the active layer — not a flat color fill.
214
232
 
215
233
  Equivalent MCP prompt template: `ps.remove_background` with `{ feather_px: "2", keep_shadow: "false" }`.
216
234
 
217
- </details>
235
+ #### 🧹 Remove distraction
218
236
 
219
- <details>
220
- <summary>🎨 Color grade (recipe)</summary>
237
+ <img src="./images/recipe-remove-distraction.svg" alt="Remove distraction: content-aware fill on the current selection" width="640" />
221
238
 
222
239
  ```
223
- Apply a warm film color grade to the open document as non-destructive adjustment layers.
224
- Use the apply-color-grade recipe with preset warm_film.
225
- Preview the result when finished.
240
+ There's a tourist photobombing my landscape on the active layer.
241
+ I'll rough-select him with the lasso — then run the remove-distraction recipe with a 1px feather.
242
+ Content-aware fill only; don't touch anything outside the selection.
226
243
  ```
227
244
 
228
- </details>
245
+ Equivalent MCP prompt template: `ps.remove_distraction` with `{ feather_px: "1" }`.
229
246
 
230
- <details>
231
- <summary>🔬 Frequency separation setup (recipe)</summary>
247
+ #### 👤 Portrait retouch
248
+
249
+ <img src="./images/recipe-enhance-portrait.svg" alt="Enhance portrait: skin smoothing + auto tone in one undoable step" width="640" />
250
+
251
+ ```
252
+ Enhance the portrait on the active layer at medium intensity with skin smoothing.
253
+ Use the enhance-portrait recipe — I want frequency separation + auto-tone in one undoable step.
254
+ If the active layer is text or a Smart Object, rasterize first or pick a raster layer.
255
+ Show me a preview when done.
256
+ ```
257
+
258
+ Equivalent MCP prompt template: `ps.enhance_portrait` with `{ intensity: "medium", skin_smoothing: "true" }`.
259
+
260
+ #### 🔥 Dodge & burn
261
+
262
+ <img src="./images/recipe-dodge-burn.svg" alt="Dodge and burn: 50% gray overlay for non-destructive light sculpting" width="640" />
263
+
264
+ ```
265
+ Set up dodge & burn on the active portrait layer: a 50% gray layer in overlay blend mode.
266
+ I'll paint with a white/black brush myself — just prepare the non-destructive setup.
267
+ ```
268
+
269
+ Equivalent MCP prompt template: `ps.dodge_burn` with `{ blend_mode: "overlay" }`.
270
+
271
+ #### 🔬 Frequency separation setup
272
+
273
+ <img src="./images/recipe-frequency-separation.svg" alt="Frequency separation: split texture from color into Low and High layers" width="640" />
232
274
 
233
275
  ```
234
276
  Set up frequency separation on the active raster layer with a 6px blur radius.
@@ -238,10 +280,45 @@ Tell me which layers to edit when the stack is ready.
238
280
 
239
281
  Equivalent MCP prompt template: `ps.frequency_separation` with `{ radius_px: "6" }`.
240
282
 
241
- </details>
283
+ #### 🌗 Gradient fade
242
284
 
243
- <details>
244
- <summary>🌐 Prepare for web + social export (recipes)</summary>
285
+ <img src="./images/recipe-gradient-fade.svg" alt="Gradient fade: melt the subject into the background via a mask gradient" width="640" />
286
+
287
+ ```
288
+ Fade the isolated subject into the background from the bottom up.
289
+ Apply a bottom_to_top gradient on the layer mask, 0 to 100%. Keep the mask editable.
290
+ ```
291
+
292
+ Equivalent MCP prompt template: `ps.gradient_fade` with `{ direction: "bottom_to_top" }`.
293
+
294
+ #### 🌤️ Sky blend
295
+
296
+ <img src="./images/recipe-sky-blend.svg" alt="Sky blend: replace a blown sky with your own sky image at the horizon" width="640" />
297
+
298
+ ```
299
+ The sky in my landscape is blown out. Blend ~/skies/sunset.jpg in as the new sky,
300
+ horizon at 45% of the frame height, feathered so the treeline stays natural.
301
+ ```
302
+
303
+ Equivalent MCP prompt template: `ps.sky_blend` with `{ sky_image_path: "~/skies/sunset.jpg", horizon_pct: "45" }`.
304
+
305
+ #### 🎨 Color grade
306
+
307
+ <img src="./images/recipe-color-grade.svg" alt="Apply color grade: flat image to teal-orange via adjustment layers" width="640" />
308
+
309
+ ```
310
+ Apply a warm film color grade to the open document as non-destructive adjustment layers.
311
+ Use the apply-color-grade recipe with preset warm_film.
312
+ Preview the result when finished.
313
+ ```
314
+
315
+ Equivalent MCP prompt template: `ps.apply_color_grade` with `{ preset: "warm_film" }`.
316
+
317
+ #### 🌐 Prepare for web + social export
318
+
319
+ <img src="./images/recipe-prepare-web.svg" alt="Prepare for web: sRGB, downscale, sharpen, optimized JPEG" width="640" />
320
+
321
+ <img src="./images/recipe-social-variants.svg" alt="Export social variants: one JPEG per platform at spec dimensions" width="640" />
245
322
 
246
323
  ```
247
324
  Prepare the active document for web: sRGB, downscale, sharpen, export one optimized JPEG to ~/.photoshop-mcp/exports.
@@ -251,10 +328,9 @@ List the output paths in a table.
251
328
 
252
329
  Equivalent templates: `ps.prepare_for_web`, `ps.export_social_variants`.
253
330
 
254
- </details>
331
+ #### 📦 Batch mockup replace
255
332
 
256
- <details>
257
- <summary>📦 Batch mockup replace (recipe)</summary>
333
+ <img src="./images/recipe-mockup.svg" alt="Batch mockup replace: swap a Smart Object per asset, one render each" width="640" />
258
334
 
259
335
  ```
260
336
  I have a mockup PSD open with a Smart Object layer named "Screen".
@@ -264,17 +340,54 @@ Do not place flat layers — swap the Smart Object so perspective is preserved.
264
340
 
265
341
  Equivalent MCP prompt template: `ps.batch_mockup_replace`.
266
342
 
267
- </details>
343
+ #### 🗂️ Organize layers
268
344
 
269
- <details>
270
- <summary>🗂️ Organize layers (recipe)</summary>
345
+ <img src="./images/recipe-organize-layers.svg" alt="Organize layers: messy stack renamed by kind and grouped into folders" width="640" />
271
346
 
272
347
  ```
273
348
  Organize the layer stack: rename by kind, auto-group related layers, preserve originals.
274
349
  Run the organize-layers recipe, then list layers so I can review the new structure.
275
350
  ```
276
351
 
277
- </details>
352
+ Equivalent MCP prompt template: `ps.organize_layers`.
353
+
354
+ #### 🎞️ Seamless carousel split
355
+
356
+ <img src="./images/recipe-carousel.svg" alt="Split one wide document into numbered carousel slides" width="640" />
357
+
358
+ ```
359
+ Split the active document into a 5-slide seamless Instagram carousel.
360
+ Each slide should be 1080x1350 — crop the slices, don't letterbox them.
361
+ Give me the exported file paths in swipe order so I can upload them as-is.
362
+ ```
363
+
364
+ Equivalent MCP prompt template: `ps.split_carousel` with `{ slides: "5", size: "1080x1350" }`.
365
+
366
+ #### 💧 Batch watermark
367
+
368
+ <img src="./images/recipe-watermark.svg" alt="Watermark every image in a folder" width="640" />
369
+
370
+ ```
371
+ Watermark every photo in ~/photos/portfolio with the text "© Jane Doe 2026".
372
+ Bottom-right corner, 40% opacity, small margin from the edges.
373
+ Export watermarked JPEGs — never touch the originals.
374
+ ```
375
+
376
+ Equivalent MCP prompt template: `ps.batch_watermark` with `{ assets_dir: "~/photos/portfolio", text: "© Jane Doe 2026", position: "bottom_right", opacity: "40" }`.
377
+
378
+ #### 🛂 Passport / ID photo
379
+
380
+ <img src="./images/recipe-passport.svg" alt="Turn a portrait into a passport photo at official size" width="640" />
381
+
382
+ ```
383
+ Turn the open portrait into a US passport photo: white background, proper headroom,
384
+ exact 600x600 px at 300 DPI. Also give me a 10x15 cm print sheet with copies.
385
+ Note: framing is approximated from subject bounds — official acceptance is not guaranteed.
386
+ ```
387
+
388
+ Equivalent MCP prompt template: `ps.passport_photo` with `{ spec: "us_2x2", make_sheet: "true" }`.
389
+
390
+ ### More examples
278
391
 
279
392
  <details>
280
393
  <summary>🎨 Basic Design Creation</summary>
@@ -312,6 +425,7 @@ Open photo.jpg from my Desktop in Photoshop.
312
425
  Get state, then run the enhance-portrait recipe at low intensity.
313
426
  If I only need quick tone fixes, apply auto levels, auto contrast, and unsharp mask (120%, 1.5, 0) on the active layer instead.
314
427
  Adjust hue +15 and saturation +15, or use prepare-for-web when I'm ready to export.
428
+ For old black-and-white scans, run the colorize neural filter first (requires the UXP bridge plugin).
315
429
  Save as enhanced-photo.jpg with quality 12.
316
430
  ```
317
431
 
@@ -471,8 +585,8 @@ Never guess — read get_state after a failure and propose the next single step.
471
585
  - **Supports Photoshop 2012-2025+**
472
586
  - **ExtendScript API**: Universal compatibility via AppleScript/COM automation
473
587
  - **Auto-Detection**: Automatically finds Photoshop installation on your system
474
- - **78 Tools**: 66 atomic `photoshop_*` + 12 recipe `photoshop_recipe_*`
475
- - **AI/Prompt Layer**: 16 MCP prompt templates (12 recipe + 4 guide), server instructions, state/preview/capabilities tools
588
+ - **89 Tools**: 74 atomic `photoshop_*` + 15 recipe `photoshop_recipe_*`
589
+ - **AI/Prompt Layer**: 22 MCP prompt templates (15 recipe + 7 guide), server instructions, state/preview/capabilities tools
476
590
  - **Document Management**: Create, open, save, close, crop documents
477
591
  - **Layer Operations**: Create, delete, duplicate, merge, transform layers
478
592
  - **Layer Properties**: Opacity, blend modes, visibility, locking
@@ -536,6 +650,54 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
536
650
  }
537
651
  ```
538
652
 
653
+ **Can't find the config file?** In Claude Desktop, open **Settings → Developer → Edit Config** — it opens the correct path for your install (the `%APPDATA%` path may differ on some setups).
654
+
655
+ ### For Claude Code
656
+
657
+ Use the [Claude Code CLI](https://code.claude.com/docs/en/agent-sdk/mcp) or the [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/mcp) with the same MCP server entry.
658
+
659
+ **Recommended (CLI):**
660
+
661
+ ```bash
662
+ claude mcp add photoshop -- npx -y @alisaitteke/photoshop-mcp
663
+ ```
664
+
665
+ **Manual JSON** — merge into your project `.mcp.json` or Claude Code MCP settings (see [`examples/claude-code-mcp.json`](examples/claude-code-mcp.json)):
666
+
667
+ ```json
668
+ {
669
+ "mcpServers": {
670
+ "photoshop": {
671
+ "command": "npx",
672
+ "args": ["-y", "@alisaitteke/photoshop-mcp"],
673
+ "env": {
674
+ "LOG_LEVEL": "1"
675
+ }
676
+ }
677
+ }
678
+ }
679
+ ```
680
+
681
+ **Agent SDK (TypeScript)** — pass the same `mcpServers` block in your `query()` options:
682
+
683
+ ```typescript
684
+ import { query } from '@anthropic-ai/claude-agent-sdk';
685
+
686
+ const q = query({
687
+ prompt: 'List open documents in Photoshop',
688
+ options: {
689
+ mcpServers: {
690
+ photoshop: {
691
+ command: 'npx',
692
+ args: ['-y', '@alisaitteke/photoshop-mcp'],
693
+ env: { LOG_LEVEL: '1' },
694
+ },
695
+ },
696
+ allowedTools: ['mcp__photoshop__*'],
697
+ },
698
+ });
699
+ ```
700
+
539
701
  ### Environment Variables
540
702
 
541
703
  - `PHOTOSHOP_PATH`: (Optional) Specify custom Photoshop installation path
@@ -638,7 +800,8 @@ Common connection, scripting, and logging issues:
638
800
  | Symptom | Likely cause | Fix |
639
801
  |---|---|---|
640
802
  | `cli_not_found` | Claude Code / Gemini CLI not installed | `npm i -g @anthropic-ai/claude-code` or `npm i -g @google/gemini-cli` |
641
- | `not_authenticated` | No OAuth session | Run `claude auth login` or `gemini auth login` in Terminal |
803
+ | `not_authenticated` | No CLI OAuth session (API key / SDK auth does not count) | Run `claude auth login` or `gemini auth login` in Terminal, or switch to **API key** auth |
804
+ | SDK client works, UI CLI mode fails | SDK/API credentials are separate from Claude Code CLI OAuth | Use **API key** in the standalone UI, or log in with `claude auth login` for CLI account mode |
642
805
  | `claude` / `gemini` not on `PATH` | Custom install location | Settings → **CLI path** → **Check connection** |
643
806
  | Chat works in IDE but not UI (CLI mode) | OAuth tokens are CLI-only | Use **CLI account** in UI; API keys and CLI sessions are separate |
644
807
  | Gemini multi-turn feels forgetful | Headless CLI may start a fresh session each turn | Known limitation; history is prepended to the prompt (MVP) |