codex-photoshop-psd-automation
Enables Codex to orchestrate Adobe Photoshop via MCP to reconstruct AI-generated artwork into editable, validated layered PSDs, with automated saving, reopening, and verification.
README
Codex Photoshop PSD Automation
Turn AI-generated artwork into editable, validated layered PSDs.
A successful API call is not delivery evidence — the PSD is saved, closed, reopened, and validated.
AI image generators are excellent at producing final visuals. Commercial delivery often needs more: editable text, replaceable assets, independent objects, structured groups, and a PSD that can actually be opened and reviewed.
This project uses Codex and Photoshop MCP to assemble, validate, reopen, and verify Reconstructed Layered PSDs from AI-generated or isolated design assets.
AI Artwork / Isolated Assets
↓
Codex
↓
Photoshop MCP
↓
Adobe Photoshop
↓
Reconstructed Layered PSD
↓
Save → Close → Reopen → Validate
The problem
Putting a flat PNG inside a PSD is not an editable source delivery.
Clients may need editable copy, Smart Objects, replaceable assets, visible groups, transparent elements, and a layered file that still works after it is saved and reopened. Manual reconstruction is slow and error-prone; trusting an in-memory automation result is not enough.
What this project does
Codex can orchestrate Photoshop to:
- create structured PSD documents and named groups;
- place isolated assets as independent Smart Objects;
- preserve transparent PNG and Alpha behavior;
- create editable TEXT layers with exact content, font, size, alignment, and RGB validation;
- validate transforms, opacity, effective visibility, required group content, and duplicate layer names;
- reserve non-overwriting output versions;
- save, close, reopen, and inspect the persisted PSD;
- independently decode the final preview and retain failure evidence on errors.
Why this is different
Why not just put a PNG inside a PSD?
Because that does not prove the source file is editable or deliverable.
This workflow verifies that required assets remain independent, text remains editable, Smart Objects survive reopening, Alpha survives reopening, transforms remain correct, required groups are effectively visible, and previews are decodable. The final artifact is validated from disk rather than trusted because an API returned success.
Reconstructed Layered PSD
This project does not claim to magically restore the unknown original layers of a flat image. Instead, it reconstructs an editable PSD from complete backgrounds, isolated major elements, editable text, and declared layout rules.
Final AI concept
↓
Generate or extract a complete background and isolated elements
↓
Reassemble in Photoshop with Smart Objects and editable text
↓
Validate the persisted layered PSD
Real Photoshop evidence
Validated on Adobe Photoshop 2026 / 27.8.0:
| Gate | Result |
|---|---|
| PSD save → close → authoritative reopen | PASS |
| Editable TEXT content, alignment, RGB, exact font, and size | PASS |
| Smart Object transforms, opacity, and effective visibility | PASS |
| Required group visibility and recursive content | PASS |
| Transparent PNG / Alpha preservation | PASS |
| Case C multi-transparent-PNG composition | PASS |
| Independent preview decoding | PASS |
| Full-resolution preview pixel round-trip | PASS |
| Photoshop state restoration | PASS |
| Unit tests | 221 / 221 PASS |
Status: PRODUCTION READY FOR REVIEWED DELIVERY.
That means the technical delivery workflow is verified for commercial review. New customer artwork still requires human visual approval; this is not autonomous aesthetic approval.
Architecture
┌──────────────┐
│ Codex │
└──────┬───────┘
│ MCP
▼
┌────────────────────┐
│ Photoshop MCP │
│ TypeScript / Node │
└────────┬───────────┘
│ COM / ExtendScript
▼
┌────────────────────┐
│ Adobe Photoshop │
└────────┬───────────┘
▼
┌────────────────────┐
│ Editable PSD │
│ + Preview + Report │
└────────────────────┘
Quick start
Windows with Adobe Photoshop is required for real Photoshop integration.
npm ci
npm run build
npm run test:unit
Then configure the MCP server for Codex or another MCP client. See Windows installation and Codex MCP setup.
Useful validation commands:
npm run test:delivery-mcp
npm run test:production-closure
test:production-closure is a real Photoshop test and creates local, gitignored disposable evidence.
Example delivery
background.png
main-subject.png
element-01.png
element-02.png
element-03.png
↓
01_Background
02_Main Subject
03_Elements
04_Text
05_Effects
06_Adjustments
↓
delivery-v01.psd
delivery-v01.png
delivery-v01-report.json
Who is this for?
- AI designers delivering editable source files
- automation engineers and creative-tooling developers
- freelancers who need reliable PSD handoff
- MCP and agent developers working with desktop creative software
- Photoshop automation enthusiasts
Use cases
- AI packaging artwork → editable PSD
- marketing artwork → structured source file
- AI illustration → separated production layers
- automated PSD QA and delivery validation
- creative delivery pipelines built around Codex and MCP
Limitations
- This is reconstructed layered delivery, not lossless recovery of an unknown original PSD.
- New customer artwork requires human visual review.
- Transactional editing of arbitrary existing customer PSDs (Case D) is not part of v1.0.
- Long-batch and large-file stress testing are outside the current verified matrix.
- Real Photoshop automation currently targets Windows.
Upstream attribution
Built on top of alisaitteke/photoshop-mcp, with additional production-oriented PSD delivery, extraction, validation, recovery, safety, and real-Photoshop verification workflows.
The upstream project provides the MCP server, Photoshop connection and execution foundation. This project adds the delivery-oriented workflow and evidence gates described above; it does not claim the entire Photoshop MCP was created from scratch.
See upstream audit, delivery specification, and production readiness.
License
MIT. See LICENSE. The upstream attribution is retained.
If you are building AI-assisted creative workflows, Photoshop automation, or MCP tooling, a ⭐ helps others discover the project.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。