🌐 Language: English | 한국어
A Model Context Protocol (MCP) server that enables AI assistants to control Adobe Photoshop via Windows COM automation. Built with .NET 10 and C# 14 using the official MCP C# SDK.
This MCP server exposes Photoshop automation as a set of tools that any MCP-compatible AI client (Claude Desktop, GitHub Copilot, etc.) can invoke. The primary tool is ExecuteJavaScript, which gives the AI full access to Photoshop's scripting engine — allowing it to flexibly decide what to do at runtime.
- Windows (COM automation is Windows-only)
- Adobe Photoshop (any version supporting COM automation and
DoJavaScript) - .NET 10 SDK or later
git clone https://github.com/airtaxi/PhotoshopMcpServer.git
cd PhotoshopMcpServerdotnet builddotnet publish PhotoshopMcpServer/PhotoshopMcpServer.csproj -c Release -r win-x64 --self-containedThe executable will be in PhotoshopMcpServer/bin/Release/net10.0-windows/win-x64/publish/.
Add the following to your Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"photoshop": {
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\PhotoshopMcpServer\\PhotoshopMcpServer"]
}
}
}{
"mcpServers": {
"photoshop": {
"command": "C:\\path\\to\\PhotoshopMcpServer.exe"
}
}
}Add to your .vscode/mcp.json or VS Code settings:
{
"servers": {
"photoshop": {
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\PhotoshopMcpServer\\PhotoshopMcpServer"]
}
}
}Add to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"photoshop": {
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\PhotoshopMcpServer\\PhotoshopMcpServer"]
}
}
}Note: Replace
C:\path\to\PhotoshopMcpServerwith the actual path where you cloned the repository.
| Tool | Description |
|---|---|
ExecuteJavaScript |
Primary tool — execute arbitrary JavaScript in Photoshop's scripting engine |
IsPhotoshopRunning |
Check if Photoshop is running and accessible |
LaunchPhotoshop |
Launch Photoshop or connect to a running instance |
GetPhotoshopVersion |
Get the Photoshop version string |
GetActiveDocumentInfo |
Get info about the active document (name, size, color mode, resolution) |
GetOpenDocuments |
List all open document names |
OpenDocument |
Open an image file by path |
SaveActiveDocument |
Save the current document |
CreateNewDocument |
Create a new document with specified dimensions |
ExportAsPng |
Export the active document as PNG |
ExportAsJpeg |
Export the active document as JPEG with quality setting |
GetLayerInfo |
Get a summary of all layers in the active document |
The ExecuteJavaScript tool is intentionally flexible. It allows the AI to construct and execute any valid Photoshop JavaScript, giving it full control over Photoshop. Example scripts:
// Get document name
app.activeDocument.name
// Create a new document
app.documents.add(1920, 1080, 72, "My Canvas")
// Resize the active document
app.activeDocument.resizeImage(800, 600)
// Flatten all layers
app.activeDocument.flatten()
// Apply Gaussian blur to the active layer
app.activeDocument.activeLayer.applyGaussianBlur(5.0)
// Get all layer names
var names = [];
for (var i = 0; i < app.activeDocument.layers.length; i++)
names.push(app.activeDocument.layers[i].name);
names.join(", ");PhotoshopMcpServer/
├── .github/
│ └── copilot-instructions.md # C# code style rules for Copilot
├── PhotoshopMcpServer/
│ ├── Program.cs # MCP server entry point (stdio transport)
│ ├── Models/
│ │ └── PhotoshopModels.cs # Record types for results and document info
│ ├── Services/
│ │ ├── IPhotoshopService.cs # Photoshop COM service interface
│ │ └── PhotoshopService.cs # COM automation implementation
│ └── Tools/
│ └── PhotoshopTools.cs # MCP tool definitions (13 tools)
├── PhotoshopMcpServer.Tests/
│ ├── PhotoshopToolsTests.cs # Tool unit tests (28 tests)
│ └── PhotoshopServiceTests.cs # Model tests (7 tests)
├── PhotoshopMcpServer.slnx
├── LICENSE
└── README.md
dotnet test- The MCP server starts and communicates over stdio (standard input/output)
- An AI client connects and discovers the available tools
- When the AI invokes a tool, the server uses Windows COM automation to send commands to Photoshop
- Photoshop executes the command (typically via
DoJavaScript) and returns the result - The result is sent back to the AI client
AI Client ←→ MCP (stdio) ←→ PhotoshopMcpServer ←→ COM ←→ Adobe Photoshop
This project is licensed under the MIT License.
- Model Context Protocol C# SDK — Official MCP SDK for .NET
- GitHub Copilot — AI-assisted development of this project
Howon Lee (@airtaxi)