Run ekphrasis --root /absolute/path/to/library mcp as a stdio server. Use an absolute binary path in your MCP client’s configuration. The server exposes the same local services as the editor; it is not an HTTP server.

A configuration for clients using the mcpServers convention:

{
  "mcpServers": {
    "ekphrasis": {
      "command": "/absolute/path/to/ekphrasis",
      "args": ["--root", "/absolute/path/to/library", "mcp"]
    }
  }
}

The exact place to save this configuration depends on the client. Restart or reload its MCP connection after changing paths.

ToolPurposeRequired arguments
list_photosList library photos—
show_photoRead metadata and version treeid
import_photoImport a fileabsolute path
edit_photoStart a Codex editid, prompt
apply_toolsApply local adjustmentsid, ops object
auto_adjustAutomatic local adjustmentsid
smart_cropFind/apply cropid, aspect such as 4:5
eraseStart masked fillid, absolute mask_path, engine (lama/codex)
remove_backgroundStart background operationid, mode (transparent/color/blur)
export_photoExport a versionid, format, absolute out_path
list_stylesList saved styles—
apply_styleStart a batchstyle_id, ids array
job_statusPoll status and recent logjob_id

Optional arguments and their schemas are returned by MCP tool discovery and defined in mcp.rs. Editing tools can select a base version with from; export uses version. Export refuses paths inside the library and refuses symlink targets. Existing files require explicit overwrite: true.

Long-running tools return a job_id, such as photo:PHOTO_ID or batch:BATCH_ID. Poll job_status on the same live server process for status, result, message, and the last 50 log lines. Jobs are not durable across restarts. There are no tools for deleting photos, creating styles, or compiling styles; use the app or CLI.

Only connect trusted clients: tools can read supplied import paths, write exports, modify library contents, and invoke Codex with selected images.