DeepSeek Harness (DSH) adopts a plugin-based architecture, providing extensibility for agent development. When an agent needs to process images or interact with the local desktop, directly integrating native graphical interface tools is often cumbersome. dsh-photocraft is a community plugin that bridges PhotoCraft’s image editing capabilities and desktop automation functions to DSH via the MCP protocol, enabling agents to perform image editing, layer management, color adjustment, adding text and shapes, running filters, as well as operating native desktop canvases and taking screenshots.
This is an independent community integration project and is not an official plugin of PhotoCraft or DeepSeek. The plugin itself does not contain the editor binary or generative AI models; instead, it installs and links to the official PhotoCraft runtime via scripts.
Installation and Activation¶
Before installation, ensure the environment meets the requirements: DSH version must be compatible with ^0.2.0-rc.2, PowerShell version must be PowerShell 7 (pwsh), and the system must have an available desktop session.
1. Install the Plugin Package¶
Run the following command in PowerShell 7 to add the plugin:
dsh plugin --profile web add github:DASHAN-0079/dsh-photocraft#v0.2.0
2. Install Native PhotoCraft Runtime¶
The plugin depends on a locally installed PhotoCraft. Execute the installation script included in the plugin package:
$dshRoot = if ($env:DSH_HOME) { $env:DSH_HOME } else { Join-Path ([Environment]::GetFolderPath('UserProfile')) '.dsh' }
& "$dshRoot/profiles/web/node_modules/dsh-photocraft/scripts/Install-PhotoCraft.ps1"
The script will automatically download, verify the SHA-256 checksum, and install PhotoCraft to the specified directory based on the system. After installation is complete, restart DSH and create a new session. Note: Linux, Windows ARM64, and servers without a desktop session are not supported.
3. Configure Environment Variables¶
If you need to customize the installation path or control the port, set the following environment variables before starting DSH:
PHOTOCRAFT_DSH_HOME: Defaults to%LOCALAPPDATA%\dsh-photocraft(Windows) or~/Library/Application Support/dsh-photocraft(macOS). The installer and the plugin must use the same path.PHOTOCRAFT_DSH_PWSH: Specifies the path to the PowerShell 7 executable, defaulting topwsh.PHOTOCRAFT_DSH_PORT: Specifies the local desktop control port, defaulting to17878.
Usage¶
Workspace Path¶
All input images and output files should be stored in the workspace directory:
* Windows: %LOCALAPPDATA%\dsh-photocraft\workspace
* macOS: ~/Library/Application Support/dsh-photocraft/workspace
Relative paths in the plugin are based on this directory.
Tool Categories¶
The plugin provides two sets of tools, corresponding to headless operations and desktop interactions respectively:
mcp__photocraft__*: Used for headless editing, saving, batch processing, previewing, switching, and closing documents.mcp__photocraft_ui__*: Used for desktop editing, interface inspection, brush/mouse events, menu operations, and screenshots.
The two backends have independent document sessions. To open a document in the headless backend, you must first save and close it in the desktop backend, then open it via the headless backend. Disconnecting the MCP connection does not close the desktop window.
Typical Examples¶
Example 1: Create a Promo Image
The agent can use the following instruction:
Use PhotoCraft to create a 1200×800 promo image with a dark blue background, a white title “Weekend Photo Exhibition”, and add yellow circular decorations. Generate a preview, and save as poster.pcraft and poster.png.
Example 2: Adjust Image Parameters
Open input.jpg in the workspace using PhotoCraft, increase brightness and contrast, scale to 1600 pixels wide while maintaining the aspect ratio, and export as output.jpg without overwriting the original image.
Use Cases and Notes¶
Use Cases:
* When DSH agents need to process image files (e.g., generating promotional images, adjusting screenshot quality).
* When needing to utilize PhotoCraft’s layer, filter, and text typography features.
* When needing to control the desktop environment for screenshots or simple mouse interactions.
Notes:
* System Limitations: This version only supports Windows x64 and macOS Intel / Apple Silicon. Linux, Windows ARM64, and server environments without a desktop session are not supported.
* Safe Rendering: Uses --safe-gpu mode by default to render on the CPU, ensuring compatibility and stability.
* Permission Requirements: The plugin runs with the current DSH process permissions. It is recommended to review the source code and license before installation.
* Version Dependency: Depends on PowerShell 7; Windows PowerShell 5.1 is not supported.