Photoshop Python API

Design and media

A Model Context Protocol (MCP) server that interfaces with Adobe Photoshop's Python API. Enables LLMs to execute image editing operations, automate workflows, and manage Photoshop tasks through structured commands and context-aware interactions.

Your AI app calls the Photoshop Python API MCP server, which does the design and media work and sends the result back to the chat.

About Photoshop Python API

Photoshop Python API is a community MCP server from loonghao, filed in our directory under design and media. A Model Context Protocol (MCP) server that interfaces with Adobe Photoshop's Python API. Enables LLMs to execute image editing operations, automate workflows, and manage Photoshop tasks through structured commands and context-aware interactions.

At a glance

Publisher
loonghao (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
363

How to set up Photoshop Python API

  1. Follow the install steps in the Photoshop Python API README; it is written in Python, so have that toolchain ready.
  2. Check the Photoshop Python API README for keys or settings; the registry lists none that Photoshop Python API requires.
  3. Add Photoshop Python API to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Photoshop Python API tools to confirm the connection.
  5. Run one read-only task with Photoshop Python API first, and keep your app asking before each tool call until the results look right.

Photoshop Python API compared with similar servers

  • Kiln by instruktlabs has fewer GitHub stars than Photoshop Python API (359 against 363); both are community servers, and Kiln runs as a remote server and Photoshop Python API runs on your own machine.
  • Smart Drawio by yunshenwuchuxun has more GitHub stars than Photoshop Python API (367 against 363); both are community servers, and both run locally.
  • SysKnife by lacs-project has fewer GitHub stars than Photoshop Python API (358 against 363); both are community servers, and both run locally.

Before you connect Photoshop Python API

  • Give Photoshop Python API its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Photoshop Python API tool call until you trust what it does with them.
  • Treat text that Photoshop Python API fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Photoshop Python API on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Photoshop Python API

How marketing and sales teams put Photoshop Python API to work, by company size. Pick the size closest to yours and start Photoshop Python API on one use case.

Small business

  • A small business can use Photoshop Python API to resize and adapt one design for every channel instead of hiring for each version.
  • Owners can ask Photoshop Python API to pull brand assets and make quick ad and social variations that still look on brand.
  • Photoshop Python API runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Creative teams can connect Photoshop Python API so agents produce variants for testing while designers keep control of the master files.
  • Marketing teams can use Photoshop Python API to hand off designs to web and ads with specs attached, cutting review rounds.
  • Start Photoshop Python API on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can use Photoshop Python API with brand rules and approved assets only, so generated work stays inside the brand system.
  • Large creative ops teams can use Photoshop Python API to localize and version assets for many markets with review built in.
  • Photoshop Python API is a community server, so have security review the code and pin a version before Photoshop Python API touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Photoshop Python API README

From loonghao/photoshop-python-api-mcp-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Photoshop MCP Server

⚠️ WINDOWS ONLY: This server only works on Windows operating systems due to its dependency on Windows-specific COM interfaces.

A Model Context Protocol (MCP) server for Photoshop integration using photoshop-python-api.

English | 简体中文

Overview

This project provides a bridge between the Model Context Protocol (MCP) and Adobe Photoshop, allowing AI assistants and other MCP clients to control Photoshop programmatically.

What Can It Do?

With this MCP server, AI assistants can:

  • Create, open, and save Photoshop documents
  • Create and manipulate layers (text, solid color, etc.)
  • Get information about the Photoshop session and documents
  • Apply effects and adjustments to images
  • And much more!

Requirements

System Requirements
  • 🔴 WINDOWS OS ONLY: This server ONLY works on Windows operating systems
    • The server relies on Windows-specific COM interfaces to communicate with Photoshop
    • macOS and Linux are NOT supported and CANNOT run this software
Software Requirements
  • Adobe Photoshop: Must be installed locally (tested with versions CC2017 through 2024)
  • Python: Version 3.10 or higher

Installation

Note: Remember that this package only works on Windows systems.

# Install using pip
pip install photoshop-mcp-server

# Or using uv
uv install photoshop-mcp-server

MCP Host Configuration

This server is designed to work with various MCP hosts. The PS_VERSION environment variable is used to specify which Photoshop version to connect to (e.g., "2024", "2023", "2022", etc.).

The recommended way to configure the server is using uvx as the command, which is the official standard format.

Standard Configuration (Recommended)

Add the following to your MCP host configuration (works with Claude Desktop, Windsurf, Cline, and other MCP hosts):

{
  "mcpServers": {
    "photoshop": {
      "command": "uvx",
      "args": ["--python", "3.10", "photoshop-mcp-server"],
      "env": {
        "PS_VERSION": "2024"
      }
    }
  }
}
Configuration Options
  • PS_VERSION: Specify the Photoshop version to connect to (e.g., "2024", "2023", "2022", etc.)
  • command: Use uvx for the standard approach
  • args: Use ["photoshop-mcp-server"] to run the Photoshop MCP server
    • To specify a Python version explicitly, use ["--python", "3.10", "photoshop-mcp-server"] (any version from 3.10 to 3.14 is supported)

Key Features

Available Resources
  • photoshop://info - Get Photoshop application information
  • photoshop://document/info - Get active document information (name, width, height, resolution, layers count). When Photoshop does not report the document dimensions, width/height are 0.0 and an extra dimensions_unavailable: true field marks them as unreadable rather than genuinely zero. photoshop_open_document reports the same signal.
  • photoshop://document/layers - Get layers in the active document
Available Tools

The server provides various tools for controlling Photoshop:

  • Document Tools: Create, open, and save documents
  • Layer Tools: Create text layers, solid color layers, etc.
  • Session Tools: Get information about Photoshop session, active document, selection
  • Script Tools: Run arbitrary Photoshop JavaScript (JSX) with photoshop_execute_jsx
photoshop_execute_jsx

A universal escape hatch: it runs any Photoshop JavaScript (ExtendScript/JSX) snippet, so you can reach parts of the Photoshop API that the dedicated tools above do not cover (channels, paths, history states, filters, custom automation, batch operations, ...).

  • Supported scripts: any Photoshop JavaScript the running Photoshop version accepts. Photoshop's ExtendScript engine is based on ECMAScript 3, so stick to ES3 syntax (var, no arrow functions, no let/const). A JSON.stringify polyfill is injected automatically, so JSON.stringify(...) works even though the engine has no native JSON object.
  • Script type: pass the script body as a single string. Return a value with an explicit return statement, or leave the last expression as the result.
  • Return value: { "success": true, "result": <script output> } on success, and { "success": false, "error": <message> } on failure. A script that throws inside Photoshop and a Photoshop instance that cannot be reached at all both report success: false, so callers never have to inspect the payload to tell the two apart.

Examples:

// Count art layers in the active document
app.activeDocument.artLayers.length;
// Get every layer name as JSON
var doc = app.activeDocument;
var names = [];
for (var i = 0; i < doc.artLayers.length; i++) {
    names.push(doc.artLayers[i].name);
}
JSON.stringify(names);

Note: The script runs with the same privileges as the Photoshop UI, so it can modify or destroy the active document. Save your work before running destructive automation.

Example Prompts for AI Assistants

Once configured in your MCP host, you can use the Photoshop MCP server in your AI assistant conversations. Here are some example prompts to get you started:

Basic Examples
User: Can you create a new Photoshop document and add a text layer with "Hello World"?

AI Assistant: I'll create a new document and add the text layer for you.

[The AI uses the Photoshop MCP server to:
1. Create a new document using the `create_document` tool
2. Add a text layer using the `create_text_layer` tool with the text "Hello World"]

I've created a new Photoshop document and added a text layer with "Hello World".
More Advanced Examples
User: Open my latest PSD file and tell me how many layers it has.

AI Assistant: I'll check your latest PSD file and count the layers.

[The AI uses the Photoshop MCP server to:
1. Get information about open documents
2. If no document is open, it can browse and open a PSD file
3. Retrieve and analyze the layer structure]

Your document has 12 layers, including 3 group folders and 2 adjustment layers.
User: Create a social media post with a gradient background and the text "Summer Sale" in a bold font.

AI Assistant: I'll create that social media post for you.

[The AI uses the Photoshop MCP server to:
1. Create a new document with appropriate dimensions for social media
2. Create a gradient fill layer with summer colors
3. Add a text layer with "Summer Sale" in a bold font
4. Position and style the text appropriately]

I've created your social media post with a gradient background and bold "Summer Sale" text.

License

MIT

Acknowledgements

Questions about Photoshop Python API

What is the Photoshop Python API MCP server?

A Model Context Protocol (MCP) server that interfaces with Adobe Photoshop's Python API. Enables LLMs to execute image editing operations, automate workflows, and manage Photoshop tasks through structured commands and context-aware interactions. Photoshop Python API is maintained by loonghao on GitHub at loonghao/photoshop-python-api-mcp-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Photoshop Python API MCP server?

Photoshop Python API doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (loonghao/photoshop-python-api-mcp-server). Like most servers, Photoshop Python API ends with a command or URL you paste into your AI app's MCP config.

Does Photoshop Python API need an API key?

The registry lists no required keys for Photoshop Python API. Check the Photoshop Python API README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Photoshop Python API an official MCP server?

No. Photoshop Python API is a community server maintained by loonghao. Community servers can be excellent; read the code and the open issues before you give Photoshop Python API access to company data.

What license is Photoshop Python API under?

Photoshop Python API is released under the MIT license, according to its GitHub repository. The license covers the code of Photoshop Python API; the service it connects to has its own terms.