Metadata-Version: 2.5
Name: dcc-mcp-premiere
Version: 0.6.1
Summary: MCP adapter for Adobe Premiere Pro
Project-URL: Homepage, https://github.com/dcc-mcp/dcc-mcp-premiere
Project-URL: Repository, https://github.com/dcc-mcp/dcc-mcp-premiere
Author-email: loonghao <hal.long@outlook.com>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Requires-Dist: adobepy<1.0.0,>=0.6.2
Requires-Dist: dcc-mcp-core<1.0.0,>=0.19.45
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: twine>=6; extra == 'dev'
Description-Content-Type: text/markdown

# dcc-mcp-premiere

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/assets/dcc-mcp-premiere-dark.svg">
    <source media="(prefers-color-scheme: light)" srcset="docs/assets/dcc-mcp-premiere.svg">
    <img src="docs/assets/dcc-mcp-premiere.svg" alt="DCC-MCP · PREMIERE PRO" width="600">
  </picture>
</p>

Typed DCC-MCP control for Adobe Premiere Pro through the shared `adobepy`
broker and Adobe's UXP runtime. The adapter exposes bounded project, media,
timeline, marker, save, frame-export, and AME queue operations. It deliberately
does not expose raw JavaScript, `evalJs`, shell commands, or arbitrary UXP calls.

![Premiere Pro typed project and timeline workflow](docs/images/premiere-showcase.webp)

_Illustrative workflow generated with OpenAI ImageGen from the retained source in `docs/images/sources`; it is not a Premiere Pro screenshot or host-validation artifact._

## Install

```bash
python -m pip install dcc-mcp-premiere
adobepy install-bridge premiere --dest <plugin-dir> --token <non-default-token>
```

For development or an Internal deployment with an approved prebuilt UXP bridge,
the shared CLI can link that bridge into the Adobe debug-plugin directory:

```powershell
dcc-mcp-cli install --dcc-type premiere `
  --plugin-source F:\studio\artifacts\premiere-uxp-bridge `
  --adobe-debug-root F:\studio\adobe-debug `
  --execute
```

`DCC_MCP_PLUGIN_SOURCE` and `DCC_MCP_ADOBE_DEBUG_ROOT` can be used in a studio
profile. The source directory must be the bridge root and contain its
`manifest.json`; the command does not assume that the adapter repository itself
contains UXP assets. It creates an idempotent directory link, does not copy the
bridge, and does not require UXP Developer Tool. Enable Premiere's UXP debug
mode once, then restart Premiere after the link is created. Premiere Pro 25.6
or later is required. Set
`ADOBEPY_TOKEN` to the bridge token, start the adapter, then verify the
connected host through DCC-MCP discovery:

```bash
dcc-mcp-cli wait-ready --dcc-type premiere --timeout-secs 60
dcc-mcp-cli load-skill premiere-project --dcc-type premiere
```

UXP Developer Tool remains a fallback for investigating a host-specific load
problem.

Each adapter instance uses an OS-assigned port and registers with DCC-MCP
discovery. Agents should connect through the stable local gateway at
`http://127.0.0.1:9765/mcp`. Set `DCC_MCP_PREMIERE_PORT` only for a deliberately
fixed direct endpoint.

## Typed tools

Inspection:

- `get_status`
- `inspect_project`
- `list_sequences`
- `inspect_sequence`
- `list_project_items`
- `list_selected_clips`
- `list_encoder_presets`

Project and timeline authoring:

- `create_bin`
- `import_media`
- `create_sequence`
- `insert_project_item`
- `overwrite_project_item`
- `create_marker`

Persistence and export:

- `save_project`
- `save_project_as`
- `queue_sequence_export`
- `export_frame`

List and scan operations are paginated and bounded. Imports accept at most 100
files, with per-file and aggregate byte limits. Track indices, marker text,
frame dimensions, and output extensions are validated before invoking the host.
AME export reports `queued=true`; completion must be verified separately.

## Safe local paths

The adapter resolves paths before calling Premiere and confines them to:

- `DCC_MCP_PREMIERE_ALLOWED_INPUT_ROOTS` for imported media
- `DCC_MCP_PREMIERE_ALLOWED_OUTPUT_ROOTS` for `.prproj` and exported media
- `DCC_MCP_PREMIERE_ALLOWED_PRESET_ROOTS` for `.sqpreset` and `.epr` files

Each variable uses the platform path separator and defaults to the current
user's home directory. Existing outputs require `overwrite=true`; missing
parent directories require `create_parents=true`. Verified synchronous outputs
include byte count and SHA-256.

## Real-host acceptance

Automated tests use contract-compatible facade fakes; they are not represented
as live Premiere proof. With a disposable project open and the UXP bridge
connected, configure the three allowlists and run:

```bash
set DCC_MCP_PREMIERE_SMOKE_MEDIA=C:\path\to\media.mp4
set DCC_MCP_PREMIERE_SMOKE_ROOT=C:\path\to\writable-evidence
python tools/live_premiere_smoke.py
```

The smoke script uses `dcc-mcp-cli` for readiness, skill loading, and every
typed call. It imports media, authors and inspects a sequence, adds a marker,
saves a verified project copy, exports a verified frame, and prints hashes.
Set `DCC_MCP_PREMIERE_SMOKE_EPR` to an allowlisted `.epr` file to include an AME
queue test.

## Development

```bash
python -m pip install -e ".[dev]"
python -m pytest -q
python -m ruff check src tests tools
python -m ruff format --check src tests tools
python tools/lint_skills.py
python -m build
python -m twine check dist/*
```

See `docs/architecture.md` for ownership, readiness, and security boundaries.
