@synthetic-ai/premiere-mcp 2.1.0 → 2.2.0

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.2.0] — `--doctor` diagnostic command
4
+
5
+ `premiere-pro-mcp --doctor` runs a standalone setup check — no MCP client or
6
+ Premiere Pro needs to be running: Node version, Premiere Pro install
7
+ detected on disk, license key present + live-validated against
8
+ synthetic.com.ar, and the CEP bridge temp directory is writable. Prints a
9
+ pass/warn/fail summary and exits 1 if anything failed, so it's scriptable.
10
+ Fixed a real crash found while building this: forcing `process.exit()`
11
+ right after the live license check's `fetch()` call could crash with a
12
+ libuv assertion on Windows (`UV_HANDLE_CLOSING`, src/win/async.c) — now
13
+ sets `process.exitCode` and lets the event loop drain naturally instead.
14
+
3
15
  ## [v2.1.0] — CRITICAL: correct the version line, ship everything since 2.0.0
4
16
 
5
17
  `@synthetic-ai/premiere-mcp@2.0.0` (published 2026-06-10, the npm rename
package/dist/index.js CHANGED
@@ -2,12 +2,102 @@
2
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
3
  import { createServer } from "./server.js";
4
4
  import { cleanupTempDir, getTempDir } from "./bridge/file-bridge.js";
5
+ import { checkLicense } from "./license.js";
5
6
  import { execSync } from "child_process";
6
7
  import { fileURLToPath } from "url";
7
8
  import path from "path";
9
+ import { existsSync, mkdirSync, writeFileSync, unlinkSync } from "fs";
8
10
  const __filename = fileURLToPath(import.meta.url);
9
11
  const __dirname = path.dirname(__filename);
10
12
  const projectRoot = path.resolve(__dirname, "..");
13
+ // ---------------------------------------------------------------------------
14
+ // --doctor — standalone diagnostics, no MCP client or Premiere Pro required
15
+ // to run it. Prints a PASS/WARN/FAIL summary and exits 1 if anything failed,
16
+ // so it's also usable in a script (`premiere-mcp --doctor || echo "broken"`).
17
+ // Defined before the flag-handling block below since it's called from there.
18
+ // ---------------------------------------------------------------------------
19
+ const GREEN = "\x1b[32m";
20
+ const RED = "\x1b[31m";
21
+ const YELLOW = "\x1b[33m";
22
+ const DIM = "\x1b[2m";
23
+ const RESET = "\x1b[0m";
24
+ function printCheck(result, label, detail) {
25
+ const icon = result === "pass" ? `${GREEN}✓${RESET}` : result === "warn" ? `${YELLOW}!${RESET}` : `${RED}✗${RESET}`;
26
+ console.log(` ${icon} ${label}${detail ? `\n ${DIM}${detail}${RESET}` : ""}`);
27
+ }
28
+ function premiereInstallCandidates() {
29
+ const years = ["2026", "2025", "2024", "2023", "2022"];
30
+ if (process.platform === "darwin") {
31
+ return years.map((y) => `/Applications/Adobe Premiere Pro ${y}/Adobe Premiere Pro ${y}.app`);
32
+ }
33
+ return years.map((y) => `C:\\Program Files\\Adobe\\Adobe Premiere Pro ${y}\\Adobe Premiere Pro.exe`);
34
+ }
35
+ // Returns whether any check failed — the caller sets process.exitCode rather
36
+ // than us calling process.exit() here. On Windows, forcing process.exit()
37
+ // immediately after an in-flight fetch/AbortController teardown (the live
38
+ // license check below) can crash with a libuv assertion
39
+ // ("UV_HANDLE_CLOSING", src/win/async.c) before the process actually exits.
40
+ // Setting exitCode and letting the event loop drain naturally avoids it.
41
+ async function runDoctor() {
42
+ console.log(`\n${DIM}premiere-mcp doctor — checking your setup${RESET}\n`);
43
+ let hasFail = false;
44
+ // 1. Node version
45
+ const nodeMajor = parseInt(process.version.slice(1).split(".")[0], 10);
46
+ if (nodeMajor >= 18) {
47
+ printCheck("pass", `Node.js ${process.version}`);
48
+ }
49
+ else {
50
+ hasFail = true;
51
+ printCheck("fail", `Node.js ${process.version}`, "Requires Node 18 or newer — update from nodejs.org");
52
+ }
53
+ // 2. OS (informational — both are supported, this just confirms detection)
54
+ const osLabel = process.platform === "darwin" ? "macOS" : process.platform === "win32" ? "Windows" : process.platform;
55
+ printCheck(process.platform === "darwin" || process.platform === "win32" ? "pass" : "warn", `OS: ${osLabel}`);
56
+ // 3. Premiere Pro install detected on disk
57
+ const found = premiereInstallCandidates().find((p) => existsSync(p));
58
+ if (found) {
59
+ printCheck("pass", "Premiere Pro detected", found);
60
+ }
61
+ else {
62
+ printCheck("warn", "Premiere Pro not found in the usual install location", "Not fatal — the MCP server only needs Premiere Pro running when a tool actually calls it.");
63
+ }
64
+ // 4. License key present
65
+ const licenseKey = process.env.PREMIERE_PRO_MCP_LICENSE;
66
+ if (!licenseKey) {
67
+ hasFail = true;
68
+ printCheck("fail", "PREMIERE_PRO_MCP_LICENSE not set", "Add it to your MCP client config (claude_desktop_config.json or equivalent).");
69
+ }
70
+ else {
71
+ printCheck("pass", `License key present (${licenseKey.slice(0, 8)}...)`);
72
+ // 5. Live validation against synthetic.com.ar (also exercises network reachability)
73
+ const result = await checkLicense();
74
+ if (result.valid) {
75
+ printCheck("pass", "License validates", result.expiresAt ? `Expires: ${result.expiresAt}` : "No expiration");
76
+ }
77
+ else {
78
+ hasFail = true;
79
+ printCheck("fail", "License validation failed", result.message ?? "Unknown reason");
80
+ }
81
+ }
82
+ // 6. Bridge temp directory writable
83
+ const tempDir = getTempDir();
84
+ try {
85
+ if (!existsSync(tempDir))
86
+ mkdirSync(tempDir, { recursive: true, mode: 0o700 });
87
+ const probe = path.join(tempDir, `.doctor-probe-${Date.now()}`);
88
+ writeFileSync(probe, "ok");
89
+ unlinkSync(probe);
90
+ printCheck("pass", "Bridge temp directory writable", tempDir);
91
+ }
92
+ catch (err) {
93
+ hasFail = true;
94
+ printCheck("fail", "Bridge temp directory not writable", `${tempDir} — ${err instanceof Error ? err.message : String(err)}`);
95
+ }
96
+ console.log(hasFail
97
+ ? `\n${RED}Some checks failed.${RESET} Fix the items above, or share this output with support at https://synthetic.com.ar/dashboard/support\n`
98
+ : `\n${GREEN}Everything looks good.${RESET}\n`);
99
+ return hasFail;
100
+ }
11
101
  // Handle CLI flags
12
102
  const args = process.argv.slice(2);
13
103
  if (args.includes("--help") || args.includes("-h")) {
@@ -16,6 +106,7 @@ premiere-pro-mcp — MCP server for Adobe Premiere Pro (437 tools)
16
106
 
17
107
  Usage:
18
108
  premiere-pro-mcp Start the MCP server (stdio transport)
109
+ premiere-pro-mcp --doctor Check your setup (Node, license, Premiere Pro, temp dir)
19
110
  premiere-pro-mcp --install-cep Install the CEP plugin into Premiere Pro
20
111
  premiere-pro-mcp --help Show this help message
21
112
  premiere-pro-mcp --version Show version
@@ -33,6 +124,12 @@ if (args.includes("--version") || args.includes("-v")) {
33
124
  console.log(pkg.default.version);
34
125
  process.exit(0);
35
126
  }
127
+ let ranAsFlag = false;
128
+ if (args.includes("--doctor")) {
129
+ const hasFail = await runDoctor();
130
+ process.exitCode = hasFail ? 1 : 0;
131
+ ranAsFlag = true;
132
+ }
36
133
  if (args.includes("--install-cep")) {
37
134
  const scriptPath = path.join(projectRoot, "scripts", "install-cep.sh");
38
135
  console.log("Installing CEP plugin...\n");
@@ -63,8 +160,10 @@ async function main() {
63
160
  await server.connect(transport);
64
161
  console.error(`[premiere-pro-mcp] Server connected and ready`);
65
162
  }
66
- main().catch((err) => {
67
- console.error("[premiere-pro-mcp] Fatal error:", err);
68
- process.exit(1);
69
- });
163
+ if (!ranAsFlag) {
164
+ main().catch((err) => {
165
+ console.error("[premiere-pro-mcp] Fatal error:", err);
166
+ process.exit(1);
167
+ });
168
+ }
70
169
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synthetic-ai/premiere-mcp",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "MCP server for controlling Adobe Premiere Pro via CEP/ExtendScript — 437 tools for AI-driven video editing",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",