dcc-mcp-photoshop

dcc-mcp-photoshop

Adobe Photoshop adapter bridging AI agents (Claude, Cursor, Copilot) to Photoshop via UXP WebSocket for document and layer management.

Category
访问服务器

README

dcc-mcp-photoshop

PyPI Python 3.8+ License: MIT Status: Pre-Alpha

Adobe Photoshop adapter for the DCC Model Context Protocol ecosystem. Bridges AI agents (Claude, Cursor, Copilot) to Adobe Photoshop via UXP WebSocket.

⚠️ Pre-Alpha: UXP plugin implementation is pending. API design is stable.

Architecture

AI Agent (Claude / Cursor)
    ↓  MCP Streamable HTTP (port 8765)
PhotoshopMcpServer  [this package, Python]
    ↓  WebSocket JSON-RPC (port 3000)
UXP Plugin  [bridge/uxp-plugin/, JavaScript]
    ↓  Photoshop UXP API
Adobe Photoshop 2022+

DCC Capabilities:

DccCapabilities(
    has_embedded_python=False,
    bridge_kind="websocket",
    bridge_endpoint="ws://localhost:3000",
    snapshot=True,
    file_operations=True,
    selection=True,
)

Features

Current (v0.1.0 — Placeholder):

  • ✅ Package structure and API design
  • PhotoshopBridge WebSocket client scaffold
  • ✅ Skill authoring helpers (ps_success, ps_error, with_photoshop)
  • PhotoshopMcpServer wrapping dcc-mcp-core
  • ⏳ UXP plugin implementation (pending)
  • ⏳ WebSocket bridge implementation (pending)

Planned:

  • Document management (open, save, export)
  • Layer management (create, delete, reorder, blend modes)
  • Selection tools (marquee, lasso, magic wand)
  • Filter application
  • Color adjustments
  • Smart Object operations
  • Batch processing

Requirements

  • Adobe Photoshop 2022+ (UXP support)
  • Python 3.8+
  • dcc-mcp-core >= 0.12.14
  • websockets >= 12.0

Installation

pip install dcc-mcp-photoshop

Or from source:

git clone https://github.com/loonghao/dcc-mcp-photoshop
cd dcc-mcp-photoshop
pip install -e ".[dev]"

Photoshop UXP Plugin Setup

  1. Install the UXP plugin from bridge/uxp-plugin/ (pending implementation)
  2. Open Photoshop
  3. Go to Plugins > Browse Plugins
  4. Install from local manifest
  5. The plugin starts a WebSocket server on port 3000 automatically

Quick Start

import dcc_mcp_photoshop

handle = dcc_mcp_photoshop.start_server(
    port=8765,     # MCP HTTP port
    ws_port=3000,  # Photoshop UXP WebSocket port
)
print(handle.mcp_url())
handle.shutdown()

Skill Authoring Guide

Photoshop skills use get_bridge() to communicate via the UXP WebSocket plugin instead of importing a DCC Python module directly.

from dcc_mcp_core.skill import skill_entry
from dcc_mcp_photoshop.api import get_bridge, with_photoshop, ps_success


@skill_entry
@with_photoshop
def list_layers(document_index: int = 0, **kwargs) -> dict:
    """List all layers in a Photoshop document."""
    bridge = get_bridge()
    layers = bridge.call("ps.listLayers", documentIndex=document_index)
    return ps_success(
        f"Found {len(layers)} layer(s)",
        count=len(layers),
        layers=[layer["name"] for layer in layers],
    )


def main(**kwargs):
    return list_layers(**kwargs)


if __name__ == "__main__":
    from dcc_mcp_core.skill import run_main
    run_main(main)

SKILL.md format

---
name: my-photoshop-skill
description: "Description of what this skill does"
dcc: photoshop
version: "1.0.0"
tags: [photoshop, layers, document]
license: "MIT"
depends: []
---

Setting skill paths

export DCC_MCP_PHOTOSHOP_SKILL_PATHS=/path/to/my/skills

UXP Plugin Protocol

The UXP plugin (JavaScript) runs inside Photoshop and implements a WebSocket server with JSON-RPC 2.0 protocol:

Request format:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ps.listLayers",
  "params": {"documentIndex": 0}
}

Response format:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [{"name": "Background", "visible": true}]
}

Supported methods (planned):

Method Description
ps.executeScript Execute JavaScript/UXP code
ps.getDocumentInfo Get active document metadata
ps.listDocuments List all open documents
ps.listLayers List layers in active document
ps.createLayer Create a new layer
ps.applyFilter Apply a filter to a layer
ps.exportDocument Export document to file

Roadmap

v0.1.0 — Foundation (current)

  • [x] Package structure and API design
  • [x] PhotoshopBridge WebSocket client scaffold
  • [x] Skill authoring helpers
  • [ ] UXP plugin architecture design

v0.2.0 — UXP Plugin + Bridge

  • [ ] UXP plugin WebSocket server (JavaScript)
  • [ ] Python bridge WebSocket client
  • [ ] JSON-RPC 2.0 protocol implementation
  • [ ] Authentication and security

v0.3.0 — Document Skills

  • [ ] get_document_info skill
  • [ ] list_documents skill
  • [ ] list_layers skill
  • [ ] create_layer skill
  • [ ] export_document skill

v0.4.0 — Advanced Skills

  • [ ] apply_filter skill
  • [ ] color_adjustment skill
  • [ ] selection_tool skill
  • [ ] smart_object skill

v1.0.0 — Production Ready

  • [ ] Smart Object support
  • [ ] Batch processing
  • [ ] Photoshop 2025+ UXP API compatibility
  • [ ] Performance optimizations

Contributing

This project is especially looking for contributors with:

  • Adobe UXP / ExtendScript experience
  • Photoshop automation knowledge
  • WebSocket and JSON-RPC protocol experience

See CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选