davinci-resolve-mcp 2.67.1 → 2.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +147 -0
- package/README.md +27 -2
- package/docs/SKILL.md +20 -0
- package/install.py +1 -1
- package/package.json +1 -1
- package/scripts/bridge_differential.py +431 -0
- package/scripts/install_resolve_bridge.py +260 -0
- package/scripts/resolve_bridge_launcher.py +202 -0
- package/scripts/resolve_bridge_probe.py +162 -0
- package/scripts/resolve_capability_probe.py +270 -0
- package/src/granular/common.py +6 -1
- package/src/server.py +378 -41
- package/src/utils/bridge_differential.py +375 -0
- package/src/utils/captions.py +323 -0
- package/src/utils/colorimetry.py +196 -0
- package/src/utils/delivery_targets.py +225 -0
- package/src/utils/edit_engine.py +181 -7
- package/src/utils/image_qc.py +499 -0
- package/src/utils/page_lock.py +5 -1
- package/src/utils/resolve_bridge.py +557 -0
- package/src/utils/resolve_bridge_client.py +423 -0
- package/src/utils/resolve_bridge_ops.py +714 -0
- package/src/utils/resolve_connection.py +29 -1
- package/src/utils/silence_ripple.py +256 -8
- package/src/utils/strata_analyzers.py +7 -0
- package/src/utils/strata_faces.py +6 -0
- package/src/utils/transcript_edit.py +372 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,153 @@
|
|
|
2
2
|
|
|
3
3
|
Release history for the DaVinci Resolve MCP Server. The latest release is summarized in the root README; older entries live here to keep the README focused.
|
|
4
4
|
|
|
5
|
+
## What's New in v2.68.1
|
|
6
|
+
|
|
7
|
+
Bug fix. A missing tool argument now returns the structured error envelope the
|
|
8
|
+
rest of the surface uses, instead of escaping as a raw `KeyError`.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **A missing argument reached the client as an unroutable crash.** Actions read
|
|
13
|
+
`p["track_type"]` directly; when the key was absent the resulting `KeyError`
|
|
14
|
+
escaped the action, escaped the tool, and arrived as
|
|
15
|
+
`ToolError: Error executing tool timeline: 'track_type'` — no code, no
|
|
16
|
+
category, no remediation. Walking the whole surface found **99 of 512 declared
|
|
17
|
+
actions** failing this way across 16 tools (`timeline`, `graph`, `render`,
|
|
18
|
+
`media_pool`, `media_storage`, `fusion_comp`, `folder`, `gallery_stills`,
|
|
19
|
+
`layout_presets`, `project_settings`, `project_manager_*`, `render_presets`,
|
|
20
|
+
`resolve_control`, `timeline_markers`). They now return, for example:
|
|
21
|
+
|
|
22
|
+
{"error": {"message": "'track_type' is required",
|
|
23
|
+
"code": "MISSING_TRACK_TYPE", "category": "invalid_input",
|
|
24
|
+
"retryable": false, "remediation": "...", "state": {...}}}
|
|
25
|
+
|
|
26
|
+
`retryable: false` matters as much as the code: an input error the caller must
|
|
27
|
+
fix was previously reported through a path that defaulted to retryable, which
|
|
28
|
+
sends an agent into a loop it cannot win.
|
|
29
|
+
|
|
30
|
+
The mechanism is a params dict whose missing keys raise a dedicated
|
|
31
|
+
`KeyError` subclass, caught at the tool boundary. Catching plain `KeyError`
|
|
32
|
+
there would have been simpler and wrong — it cannot tell a missing argument
|
|
33
|
+
from an internal lookup failure on some other dict, so our own bugs would have
|
|
34
|
+
been relabelled as the caller's mistake. `contracts.validate` remains the
|
|
35
|
+
preferred tool where a type, range or enum also needs checking, and the actions
|
|
36
|
+
already using it are unchanged.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- `tests/test_tool_argument_validation.py` walks **every declared action** with an
|
|
41
|
+
empty params dict and asserts none leaks a `KeyError`. Reading the source cannot
|
|
42
|
+
find this class — `p[...]` after a guard is correct and `p[...]` without one is a
|
|
43
|
+
bug — so the walk executes each branch against a stub Resolve. It fails on the
|
|
44
|
+
pre-fix tree and runs in 2 s.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- `test_doc_tool_counts` counts `@mcp.tool()` decorators from the parsed syntax
|
|
49
|
+
tree rather than by matching the text. A docstring explaining where the
|
|
50
|
+
decorator has to sit was counted as a 35th tool; prose that mentions a
|
|
51
|
+
decorator is not a tool.
|
|
52
|
+
|
|
53
|
+
## What's New in v2.68.0
|
|
54
|
+
|
|
55
|
+
Six engines that let an agent judge its own output before shipping it — audio
|
|
56
|
+
loudness, silence calibration, image QC, transcript editing, captions — plus the
|
|
57
|
+
**in-app bridge**, which reaches the **free edition** of DaVinci Resolve, whose
|
|
58
|
+
external scripting API refuses foreign processes entirely.
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
- **Audio delivery QC.** Delivery targets carry a named loudness contract
|
|
63
|
+
(`web`, `podcast`, `ebu_r128`, `atsc_a85`, `ott_dialogue_gated`) and project it
|
|
64
|
+
into the existing `loudness_qc` vocabulary. Dialogue-gated standards emit no
|
|
65
|
+
gradeable `integrated` figure — `loudness_qc` measures full-program, so grading
|
|
66
|
+
a dialogue-gated number against it produces a verdict that means nothing; it
|
|
67
|
+
travels as advisory metadata with the reason stated. No shipped target names a
|
|
68
|
+
standard, because a ProRes master has no inherent programme loudness.
|
|
69
|
+
`render(action='list_loudness_standards')`.
|
|
70
|
+
- **Auto-calibrated silence gate.** `plan_silence_ripple` derives the threshold
|
|
71
|
+
from each clip's own dynamics instead of a fixed −30 dB. The metric is `astats`
|
|
72
|
+
**RMS trough** paired with RMS peak: `mean_volume` tracks programme level, and
|
|
73
|
+
`Noise floor dB` moved 19 dB between two fixtures sharing an identical noise
|
|
74
|
+
bed purely because one was quieter for longer. Against ground truth the fixed
|
|
75
|
+
threshold was wrong on all four fixtures. When calibration cannot be trusted
|
|
76
|
+
the item is **kept whole** rather than stripped — a fixed threshold applied to
|
|
77
|
+
material it does not suit is not a degraded answer, it is a wrong one.
|
|
78
|
+
- **Image QC.** `media_analysis(action='assess_grade')` gives an agent
|
|
79
|
+
deterministic grounds to reject its own grade: tonal frame, noise
|
|
80
|
+
amplification, banding, highlight posterization and clipping growth, with
|
|
81
|
+
validated **CIEDE2000** (all 33 Sharma/Wu/Dalal reference pairs to 4 dp). A
|
|
82
|
+
clean grade costs zero tokens; vision is spent only where the numbers cannot
|
|
83
|
+
settle it. Non-display-referred working spaces are **refused, never guessed** —
|
|
84
|
+
the right transform depends on camera and project colour management, which a
|
|
85
|
+
frame cannot tell you.
|
|
86
|
+
- **Word-level transcript editing.** `edit_engine(action='plan_transcript_tighten')`
|
|
87
|
+
removes fillers, false starts and over-long pauses at word boundaries with a
|
|
88
|
+
reason per cut, and `search_spoken_content` searches word timings across a
|
|
89
|
+
whole shoot to build selects. A lexical axis alongside `find_similar`'s
|
|
90
|
+
semantic-visual one.
|
|
91
|
+
- **Captions.** `media_analysis(action='generate_captions')` emits SRT and WebVTT
|
|
92
|
+
under broadcast line rules, plus chapters and YouTube description text.
|
|
93
|
+
- **The in-app bridge — live read and write control of the FREE edition.**
|
|
94
|
+
Opt-in with `DAVINCI_RESOLVE_BRIDGE=1`; unset changes nothing for existing
|
|
95
|
+
installs. A script launched from Workspace ▸ Scripts is handed the live
|
|
96
|
+
`resolve` object on any edition and re-exports it over an authenticated
|
|
97
|
+
loopback listener, which `connect_resolve` uses as a third transport beside
|
|
98
|
+
Local and Network. Existing call sites need no changes. This is the documented
|
|
99
|
+
in-app path, not a licence circumvention — but Blackmagic could close it, so
|
|
100
|
+
treat it as supported-until-it-is-not.
|
|
101
|
+
- **`shutdown` and `reload` for the bridge.** The launcher blocks (correctly — a
|
|
102
|
+
Scripts-menu script is a child process, so a daemon thread dies the instant it
|
|
103
|
+
returns), which used to mean a stale in-Resolve copy could only be replaced by
|
|
104
|
+
quitting Resolve. `reload` re-imports the runtime from disk in place, and
|
|
105
|
+
refuses before stopping if the new sources will not compile.
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
|
|
109
|
+
- **The bridge was unreachable on the machine it exists for.** `_try_connect`
|
|
110
|
+
returned on `dvr_script is None` before calling `connect_resolve`, the function
|
|
111
|
+
that accepts None in bridge mode. Blackmagic's scripting module ships with the
|
|
112
|
+
*installer*, not the App Store build, so a free-edition-only machine has no
|
|
113
|
+
`Developer/Scripting/Modules` tree and the import fails. Verified by blocking
|
|
114
|
+
the import against a healthy live bridge: `get_resolve()` answered None.
|
|
115
|
+
- **Auto-launch started the wrong Resolve, or one nobody asked for.** The macOS
|
|
116
|
+
path list contained only the installer location, so a free-only machine found
|
|
117
|
+
nothing and a machine with both always started Studio. In bridge mode it now
|
|
118
|
+
refuses outright: launching cannot create a listener that only a Scripts-menu
|
|
119
|
+
run creates.
|
|
120
|
+
- **Interchange export over the bridge was degrading silently.** Resolve's API
|
|
121
|
+
constants (`EXPORT_AAF`, `AUDIO_SYNC_*`) are plain attributes and `dir()` does
|
|
122
|
+
not list them — measured on 21.0.3.7, `dir(resolve)` returns 34 names with no
|
|
123
|
+
`EXPORT_*` among them while the constants read back as real values. The proxy
|
|
124
|
+
could only call methods, so `hasattr` said False and the server fell through to
|
|
125
|
+
handing Resolve the bare string `"EXPORT_AAF"`.
|
|
126
|
+
- **The proxy broke every chain longer than one call.** Every live Resolve object
|
|
127
|
+
reports `type(obj).__name__ == "PyRemoteObject"` — root 34 methods, Project 49,
|
|
128
|
+
TimelineItem 88, one class name — so caching method sets on it let the first
|
|
129
|
+
object touched define `hasattr` for everything after. Method sets are now keyed
|
|
130
|
+
on provenance, and absence is re-verified against the object itself.
|
|
131
|
+
- **Bridge error codes never crossed the transport.** Every surface code was
|
|
132
|
+
flattened to `operation_failed`, so `stale_handle` (re-fetch) and
|
|
133
|
+
`ambiguous_locator` (disambiguate) arrived as one undifferentiated failure.
|
|
134
|
+
|
|
135
|
+
### Validated live
|
|
136
|
+
|
|
137
|
+
On **DaVinci Resolve 21.0.3.7 (App Store, free, sandboxed)**, with Blackmagic's
|
|
138
|
+
scripting module blocked to reproduce a free-only machine: 34 tools, 583 declared
|
|
139
|
+
actions, **165 read-shaped actions attempted, 145 clean, zero bridge-attributable
|
|
140
|
+
failures**; 109 of the 112 API read methods the tools actually call exercised on
|
|
141
|
+
the live object graph; a render completed to a non-empty file; AAF/DRT/EDL/FCPXML
|
|
142
|
+
all written by `Timeline.Export`; 400 clips appended in 1.23 s and enumerated at
|
|
143
|
+
0.81 ms/item; an evicted handle refusing with `stale_handle` rather than
|
|
144
|
+
resolving to another object; and reads *and* writes continuing to work with a
|
|
145
|
+
native file dialog open, because the bridge runs in its own process.
|
|
146
|
+
|
|
147
|
+
`scripts/bridge_differential.py --mode differential` diffs the bridge against
|
|
148
|
+
native scripting on one Studio instance. That comparison has **not** been run
|
|
149
|
+
yet, so the evidenced claim is that the bridge carries the surface the tools use
|
|
150
|
+
on the free edition — not that it is byte-identical to native scripting.
|
|
151
|
+
|
|
5
152
|
## What's New in v2.67.1
|
|
6
153
|
|
|
7
154
|
Documentation correction. No code changes — v2.67.0 already ships the correct
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DaVinci Resolve MCP Server
|
|
2
2
|
|
|
3
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
4
4
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
5
5
|
[](docs/reference/api-coverage.md)
|
|
6
6
|
[-blue.svg)](#server-modes)
|
|
@@ -22,7 +22,7 @@ A local browser control panel ships with the server for inspecting Resolve state
|
|
|
22
22
|
npx davinci-resolve-mcp setup
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Before connecting, open DaVinci Resolve Studio and set **Preferences > General > External scripting using** to **Local**. The npm launcher installs a managed copy under your user application-data directory, then runs the universal Python installer. The installer creates a virtual environment, detects Resolve paths, and can configure Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed, Continue, Cline, Roo Code, OpenCode, and JetBrains IDEs.
|
|
25
|
+
Before connecting, open DaVinci Resolve Studio and set **Preferences > General > External scripting using** to **Local**. (On the **free edition** that preference does not help — see [Free edition](#free-edition-in-app-bridge) below.) The npm launcher installs a managed copy under your user application-data directory, then runs the universal Python installer. The installer creates a virtual environment, detects Resolve paths, and can configure Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed, Continue, Cline, Roo Code, OpenCode, and JetBrains IDEs.
|
|
26
26
|
|
|
27
27
|
For source installs:
|
|
28
28
|
|
|
@@ -36,6 +36,31 @@ For platform paths, client-specific config, and manual setup, see [Installation
|
|
|
36
36
|
|
|
37
37
|
The installer and server check the latest GitHub release for MCP updates. Checks are best-effort and throttled; the server never blocks MCP startup for a prompt. The installer can prompt, snooze, ignore a release, disable checks, or apply an opt-in safe auto-update for clean git checkouts.
|
|
38
38
|
|
|
39
|
+
## Free edition (in-app bridge)
|
|
40
|
+
|
|
41
|
+
Blackmagic gates *external* scripting to Studio: on the free edition
|
|
42
|
+
`scriptapp("Resolve")` refuses a foreign process, whatever the preference says.
|
|
43
|
+
The **Workspace ▸ Scripts** menu is not gated — a script launched from it is
|
|
44
|
+
handed the live `resolve` object on any edition — so the server can reach the
|
|
45
|
+
free edition through a small script that runs *inside* Resolve and re-exports it
|
|
46
|
+
over an authenticated loopback listener.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python scripts/install_resolve_bridge.py
|
|
50
|
+
# restart Resolve, open a project, then: Workspace > Scripts > resolve_bridge
|
|
51
|
+
export DAVINCI_RESOLVE_BRIDGE=1 # opt-in; unset changes nothing
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Requires a **framework Python** (python.org). Resolve enumerates `.py` scripts
|
|
55
|
+
only when it finds one — Homebrew, pyenv and conda interpreters are not
|
|
56
|
+
detected, and the script silently never appears in the menu. A Lua canary is
|
|
57
|
+
installed alongside so you can tell that apart from a wrong folder.
|
|
58
|
+
|
|
59
|
+
Validated on free 21.0.3.7 and Studio 19.1.3.7. This is the documented in-app
|
|
60
|
+
path, not a licence circumvention, but Blackmagic could close it — treat it as a
|
|
61
|
+
supported-until-it-is-not tier. Loopback only, HMAC-signed requests, one-use
|
|
62
|
+
nonces.
|
|
63
|
+
|
|
39
64
|
## Local Control Panel
|
|
40
65
|
|
|
41
66
|
Launch the single-user local control panel from the repository root:
|
package/docs/SKILL.md
CHANGED
|
@@ -19,6 +19,26 @@ configured to the Resolve host IP (use `127.0.0.1` on the same machine). The
|
|
|
19
19
|
server auto-launches Resolve if it is not running, but that first connection can
|
|
20
20
|
take up to 60 seconds.
|
|
21
21
|
|
|
22
|
+
**Free edition.** Both of those preferences are Studio features; on the free
|
|
23
|
+
edition `scriptapp("Resolve")` refuses a foreign process regardless. A third
|
|
24
|
+
transport reaches it — a script run from **Workspace ▸ Scripts** is handed the
|
|
25
|
+
live `resolve` object on any edition and re-exports it over an authenticated
|
|
26
|
+
loopback listener. Install with `python scripts/install_resolve_bridge.py`, start
|
|
27
|
+
it from that menu, and set `DAVINCI_RESOLVE_BRIDGE=1`. Existing tool call sites
|
|
28
|
+
work unchanged. Two things to know when diagnosing it:
|
|
29
|
+
|
|
30
|
+
- Resolve lists `.py` scripts only when it can find a **framework Python**
|
|
31
|
+
(python.org). Homebrew/pyenv/conda are not detected and the script simply never
|
|
32
|
+
appears, with no error. The installer preflights this and ships a Lua canary,
|
|
33
|
+
which always lists, so "Python not detected" is distinguishable from "wrong
|
|
34
|
+
folder".
|
|
35
|
+
- The in-Resolve runtime is a **copy taken at install time**. After changing the
|
|
36
|
+
repository, re-run the installer and then ask the running bridge to reload —
|
|
37
|
+
it re-imports from disk in place, so Resolve does not need restarting.
|
|
38
|
+
|
|
39
|
+
The bridge is a documented in-app path rather than a licence circumvention, but
|
|
40
|
+
Blackmagic could close it; treat it as a supported-until-it-is-not tier.
|
|
41
|
+
|
|
22
42
|
Network scripting permits remote control of Resolve. Use Local mode when remote
|
|
23
43
|
access is unnecessary; otherwise restrict access with host firewall and network
|
|
24
44
|
controls.
|
package/install.py
CHANGED
|
@@ -36,7 +36,7 @@ from src.utils.update_check import (
|
|
|
36
36
|
|
|
37
37
|
# ─── Version ──────────────────────────────────────────────────────────────────
|
|
38
38
|
|
|
39
|
-
VERSION = "2.
|
|
39
|
+
VERSION = "2.68.1"
|
|
40
40
|
# Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
|
|
41
41
|
# Resolve's scripting bridge loads into newer interpreters on recent builds
|
|
42
42
|
# (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
|