@clipwright/mcp-server 0.27.0 → 0.29.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 +68 -0
- package/README.md +24 -0
- package/SKILL.md +69 -4
- package/dist/format.js +5 -1
- package/dist/format.js.map +1 -1
- package/dist/server.js +74 -2
- package/dist/server.js.map +1 -1
- package/dist/workflow-tools.js +22 -0
- package/dist/workflow-tools.js.map +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,74 @@ a customer reading it should not miss what appeared in the product. Like *Server
|
|
|
16
16
|
they are live from the day the web app was deployed, not from the package release they are
|
|
17
17
|
listed under.
|
|
18
18
|
|
|
19
|
+
## [Unreleased]
|
|
20
|
+
|
|
21
|
+
## [0.29.0] - 2026-10-16
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Workflow plans: a method from the public workflow catalog becomes a plan that you prepare, save, approve and
|
|
26
|
+
quote for free, and then start as one paid UGC or faceless run with an explicit idempotency key. `listWorkflows`,
|
|
27
|
+
`getWorkflow`, `createWorkflowPlan`, `getWorkflowPlan`, `saveWorkflowPlan`, `approveWorkflowPlan`,
|
|
28
|
+
`quoteWorkflowPlan` and `runWorkflowPlan` in the SDK; `workflows`, `workflow-show`, `plan-create`, `plan-show`,
|
|
29
|
+
`plan-save`, `plan-approve`, `plan-quote` and `plan-run` in the CLI; the MCP tools `list_workflows`, `get_workflow`,
|
|
30
|
+
`prepare_workflow_plan`, `get_workflow_plan`, `approve_workflow_plan`, `quote_workflow_plan` and
|
|
31
|
+
`run_workflow_plan`. Approval and the paid start are separate explicit calls; nothing quotes, approves or starts on
|
|
32
|
+
its own. A method starts only once it is enabled on the server; until then its availability says why. `getRun` of a
|
|
33
|
+
workflow run carries the purchased plan revision and its receipt. *Dashboard:* the videos list labels a workflow
|
|
34
|
+
run with its plan, method and revision. (clipwright#631)
|
|
35
|
+
- *Dashboard:* the editor of a faceless video edits its draft: move a cut by dragging it or with the keys, set a shot's
|
|
36
|
+
start, end or length, start or end it on a word, remove a picture, and regenerate a picture or describe a new one.
|
|
37
|
+
The draft saves itself. "Copy as API call" copies the revision as `curl` and as the MCP `revise_run` call, and
|
|
38
|
+
"Render new version" shows the quote and starts the revision, which the header then follows to "Version ready".
|
|
39
|
+
An answer that does not come is held in the browser, so a retry starts no second revision. (clipwright#604)
|
|
40
|
+
- A shot of a faceless video can get a candidate: one picture or clip made for that shot, to keep or discard in a
|
|
41
|
+
revision. `quoteCandidate`, `createCandidate` and `listCandidates` in the SDK, `candidate-quote`, `candidate` and
|
|
42
|
+
`candidates` in the CLI, and the MCP tools `quote_candidate` and `create_candidate`. The quote charges nothing. A
|
|
43
|
+
delivered candidate is charged its one unit whether it is kept or discarded; one that fails is charged nothing,
|
|
44
|
+
even when its paid work was already done. An identical request returns the same run; `take` (`--take` in the CLI)
|
|
45
|
+
makes another candidate on purpose. `candidate` prints the quote and starts nothing without `--yes`. While shot
|
|
46
|
+
candidates are closed on the server, every call answers `editing_disabled`. (clipwright#604)
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- **Breaking:** `ApiFailure` gains the kinds `workflow_invalid`, `workflow_conflict` and `workflow_not_ready`, for
|
|
51
|
+
TypeScript callers that switch on the kind. Each keeps every issue and warning of the refusal. (clipwright#631)
|
|
52
|
+
- The agent report of `edit_ceiling_reached` and `edit_invalid` names a paid edit and the request, not a revision and
|
|
53
|
+
a document, since shot candidates are refused with the same codes. *Dashboard:* the docs page lists the prices of a
|
|
54
|
+
shot candidate. (clipwright#604)
|
|
55
|
+
|
|
56
|
+
## [0.28.0] - 2026-10-15
|
|
57
|
+
|
|
58
|
+
The revision of a faceless video is paid and open: `quoteRevision` and `startRevision` in the SDK, `revise-quote` and
|
|
59
|
+
`revise` in the CLI, and the MCP tools `quote_revision` and `revise_run`, which make the server list 17 tools. Three
|
|
60
|
+
failure kinds are new: `editing_closed`, `edit_ceiling_reached` and `edit_invalid`.
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- A finished faceless video can be revised: `quoteRevision` and `startRevision` in the SDK, `revise-quote` and
|
|
65
|
+
`revise` in the CLI, and the MCP tools `quote_revision` and `revise_run`. A revision is a new run made from the
|
|
66
|
+
edited document, or from shots named to be generated anew. The quote charges nothing. An identical request returns
|
|
67
|
+
the same run; `attempt` (`--retry` in the CLI) starts a second revision on purpose. A revision that delivers is
|
|
68
|
+
charged its quoted total; one that fails is charged nothing, even when its paid work was already done. While paid
|
|
69
|
+
edits are closed on the server, both calls answer `editing_disabled`. (clipwright#604)
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
|
|
73
|
+
- **Breaking:** `@clipwright/core`, for TypeScript callers: the union `ApiFailure` has three more members,
|
|
74
|
+
`editing_closed`, `edit_ceiling_reached` and `edit_invalid`. A `switch` over `failure.kind` that is checked for
|
|
75
|
+
exhaustiveness does not compile until it handles them. Code that does not switch on the kind is not affected.
|
|
76
|
+
(clipwright#604)
|
|
77
|
+
- The refusals of the revision routes have failure kinds of their own: `editing_closed` for the 503s
|
|
78
|
+
`editing_disabled`, `editing_not_priced` and `editing_window_not_set`, which are no longer retried as server errors;
|
|
79
|
+
`edit_ceiling_reached` with the limit, the count and the runs counted; `edit_invalid` with the issues of the
|
|
80
|
+
document. They were `server_error` and a `client_error` without their fields. (clipwright#604)
|
|
81
|
+
- *Dashboard:* `/videos` lists faceless videos as well as UGC videos. A faceless video has no still frame, so its
|
|
82
|
+
tile says that no preview was recorded, and a click plays it like any other tile. "Get video link" on the Balance
|
|
83
|
+
page now gives the link of a faceless video, where it used to answer "No video for this run.". (clipwright#604)
|
|
84
|
+
- *Dashboard:* a revision is labelled with the run it revises on the Balance page and on `/videos`, and the docs page
|
|
85
|
+
lists the prices of a revision. (clipwright#604)
|
|
86
|
+
|
|
19
87
|
## [0.27.0] - 2026-10-13
|
|
20
88
|
|
|
21
89
|
The shots of a finished video can be read, and the draft of an edit can be kept: `getRunShots`, `getRunEdit` and
|
package/README.md
CHANGED
|
@@ -35,6 +35,13 @@ Any MCP host works — the server speaks JSON-RPC over stdio.
|
|
|
35
35
|
|
|
36
36
|
## Tools
|
|
37
37
|
|
|
38
|
+
- `list_workflows` — read workflow methods and current availability. Free.
|
|
39
|
+
- `get_workflow` — read one method's required inputs, script rules, evidence and limitations. Free.
|
|
40
|
+
- `prepare_workflow_plan` — create with a complete document, or save with both `plan_id` and `base_version`. Free; starts no run.
|
|
41
|
+
- `get_workflow_plan` — read the current owned plan, revision and readiness. Free.
|
|
42
|
+
- `approve_workflow_plan` — explicitly approve a chosen revision and content digest. Free; starts no run.
|
|
43
|
+
- `quote_workflow_plan` — quote the approved revision without spending credits.
|
|
44
|
+
- `run_workflow_plan` — start a paid workflow using its exact quote fields and an explicit idempotency key. Returns its receipt and run id immediately; poll `get_run`. Recover an uncertain purchase with the original request and key.
|
|
38
45
|
- `list_voices` — voices for `voice`: the presets, the thirty voices of the
|
|
39
46
|
speech model `gemini-3.8-flash-tts` and the catalog for `make_ugc`, with
|
|
40
47
|
filters by language, gender, age, use case and model, and a short audio
|
|
@@ -51,6 +58,23 @@ Any MCP host works — the server speaks JSON-RPC over stdio.
|
|
|
51
58
|
- `get_run_shots` — the shots of a finished video: the span, kind, description
|
|
52
59
|
and preview link of each, with the narration words and their timing. Free and
|
|
53
60
|
read-only. A run with no shots to show answers with the reason instead.
|
|
61
|
+
- `quote_revision` — price of a revision of a faceless video: what it would
|
|
62
|
+
change and what it costs. Free.
|
|
63
|
+
- `revise_run` — **starts a revision: a new run that renders the video again
|
|
64
|
+
with the shots you change; this costs money.** Pass `changes` (a shot and what
|
|
65
|
+
to generate for it) or the whole edited `document`. A revision that delivers
|
|
66
|
+
is charged its quoted total; one that fails is charged nothing, even when its
|
|
67
|
+
paid work was already done. An identical request returns the same run;
|
|
68
|
+
`attempt` starts a second one on purpose. Returns a `run_id` immediately; poll
|
|
69
|
+
`get_run` until `succeeded`.
|
|
70
|
+
- `quote_candidate` — price of a shot candidate of a faceless video: one picture
|
|
71
|
+
or clip made for one shot, to keep or discard in a revision. Free.
|
|
72
|
+
- `create_candidate` — **makes a shot candidate; this costs money.** Pass the
|
|
73
|
+
shot and the operation to generate for it. A delivered candidate is charged
|
|
74
|
+
its one unit whether it is kept or discarded; one that fails is charged
|
|
75
|
+
nothing, even when its paid work was already done. An identical request
|
|
76
|
+
returns the same run; `take` makes another candidate on purpose. Returns a
|
|
77
|
+
`run_id` immediately; poll `get_run` until `succeeded`.
|
|
54
78
|
- `upload_image` — a local PNG/JPEG → signed https url to pass as `image`. Free;
|
|
55
79
|
20 per day, the url lives 24 hours. Set `aspect_ratio` explicitly afterwards.
|
|
56
80
|
- `quote_actor` — price of a personal actor before creating one. Free.
|
package/SKILL.md
CHANGED
|
@@ -164,9 +164,22 @@ Environment variables:
|
|
|
164
164
|
| `CLIPWRIGHT_CLIENT_ID` | YES (see section 2) | Unique identifier of this INSTALLATION. |
|
|
165
165
|
|
|
166
166
|
After connecting, restart or reopen the MCP host and confirm that `tools/list`
|
|
167
|
-
returns
|
|
168
|
-
`get_account`, `create_actor`, `quote_actor`, `delete_actor`, `get_actor_defaults`,
|
|
169
|
-
`quote_faceless`, `make_faceless
|
|
167
|
+
returns 26 tools: `make_ugc`, `get_run`, `get_run_shots`, `quote_revision`, `revise_run`, `quote_candidate`, `create_candidate`, `quote_ugc`, `list_actors`,
|
|
168
|
+
`list_voices`, `upload_image`, `get_account`, `create_actor`, `quote_actor`, `delete_actor`, `get_actor_defaults`,
|
|
169
|
+
`set_actor_defaults`, `quote_faceless`, `make_faceless`, `list_workflows`, `get_workflow`, `prepare_workflow_plan`,
|
|
170
|
+
`get_workflow_plan`, `approve_workflow_plan`, `quote_workflow_plan`, `run_workflow_plan`.
|
|
171
|
+
|
|
172
|
+
Workflow calls are explicit steps: list/read a method, prepare its complete
|
|
173
|
+
document, read all readiness issues and warnings, approve the chosen revision,
|
|
174
|
+
then quote and show its native price before a paid launch. Preparation, approval
|
|
175
|
+
and quoting start no run. To save, pass both `plan_id` and `base_version` with
|
|
176
|
+
the document; omit both to create. Unknown write fields are refused.
|
|
177
|
+
`run_workflow_plan` requires the quote's revision, content digest, semantic input
|
|
178
|
+
digest and quote id, plus an explicit idempotency key. It returns the captured
|
|
179
|
+
receipt and native run id at once. Poll `get_run`; its optional workflow field
|
|
180
|
+
keeps the purchased revision and available outcome evidence. Technical evidence
|
|
181
|
+
does not mean a person accepted the creative result. After an uncertain paid
|
|
182
|
+
answer, preserve the original request and key; a new key can pay twice.
|
|
170
183
|
|
|
171
184
|
## 2. `CLIPWRIGHT_CLIENT_ID` — required, and WHY
|
|
172
185
|
|
|
@@ -542,10 +555,62 @@ A field named in `withheld` is null on every shot, so a null `description` or
|
|
|
542
555
|
|
|
543
556
|
`editable.media_available_until` is how long the media of the run are stored.
|
|
544
557
|
`paid_edits.enabled` says whether a video can be made from an edit; while it is
|
|
545
|
-
`false`, none can
|
|
558
|
+
`false`, none can, and `revise_run` answers `editing_disabled`. Read `kind`, `line`,
|
|
546
559
|
`editable.state` and each shot's `operations` as open strings, because a later
|
|
547
560
|
API may name values this text does not list.
|
|
548
561
|
|
|
562
|
+
### `quote_revision` — free; `revise_run` — paid
|
|
563
|
+
|
|
564
|
+
Both take a `run_id` and exactly one of `changes` (shots to generate anew over
|
|
565
|
+
the run as it is: each a `shot_id` and its `operation`, such as
|
|
566
|
+
`{ "mode": "retake" }`) or `document` (the whole edited document; retimes,
|
|
567
|
+
deletions and uploads go this way). `quote_revision` answers what the revision
|
|
568
|
+
would change (`summary`) and cost (`billing.total_credits`) and spends nothing.
|
|
569
|
+
Show the user that price before `revise_run`.
|
|
570
|
+
|
|
571
|
+
`revise_run` starts a NEW run and returns it at once; poll it with `get_run`.
|
|
572
|
+
Once it succeeded it is editable under its own `run_id`. A revision that
|
|
573
|
+
delivers is charged its quoted total; one that fails is charged nothing, even
|
|
574
|
+
when its paid work was already done. An identical request returns the same run
|
|
575
|
+
it started before, so a call repeated after a lost answer starts nothing new;
|
|
576
|
+
pass `attempt: 2` to start a second revision with the same request on purpose.
|
|
577
|
+
|
|
578
|
+
The refusals are terminal; do not retry them unchanged:
|
|
579
|
+
|
|
580
|
+
- `editing_disabled`, `editing_not_priced`, `editing_window_not_set` (503) —
|
|
581
|
+
paid edits are not open. Nothing was charged and no run was created.
|
|
582
|
+
- `edit_ceiling_reached` (409) — `ceiling: "in_flight"` means a revision of the
|
|
583
|
+
original is still running: follow `run_ids` with `get_run` and start the next
|
|
584
|
+
one after it finishes; if it is held for review, contact support.
|
|
585
|
+
`"failed_or_unfinished"` means support has to raise the limit.
|
|
586
|
+
- `edit_invalid` (422) — the document breaks a rule of the run; `issues` lists
|
|
587
|
+
each, and the rules are in the run's shots.
|
|
588
|
+
- `run_not_editable` (409) with `state: "edit_window_closed"` — the paid window
|
|
589
|
+
of the original has closed.
|
|
590
|
+
|
|
591
|
+
### `quote_candidate` — free; `create_candidate` — paid
|
|
592
|
+
|
|
593
|
+
A shot candidate is one picture or clip made for one shot of a `make_faceless`
|
|
594
|
+
run, to keep or discard in a later revision. Both tools take a `run_id`, a
|
|
595
|
+
`shot_id` and an `operation` the shot lists in `get_run_shots` (such as
|
|
596
|
+
`{ "mode": "retake" }`), and an optional `take`, 1 by default.
|
|
597
|
+
`quote_candidate` answers the `unit`, its `credits` and `usable_until`, the last
|
|
598
|
+
moment the candidate can enter a revision, and spends nothing. Show the user
|
|
599
|
+
that price before `create_candidate`.
|
|
600
|
+
|
|
601
|
+
`create_candidate` starts a NEW run of skill `edit_shot` and returns it at once;
|
|
602
|
+
poll it with `get_run`. Once it succeeded, `candidate.preview_url` shows what was
|
|
603
|
+
made. A delivered candidate is charged its one unit whether it is kept or
|
|
604
|
+
discarded; one that fails is charged nothing, even when its paid work was
|
|
605
|
+
already done. An identical request returns the same run it started before, so a
|
|
606
|
+
call repeated after a lost answer starts nothing new; pass `take: 2` to make
|
|
607
|
+
another candidate with the same request on purpose, charged again.
|
|
608
|
+
|
|
609
|
+
The refusals are those of `revise_run` above. The candidate limits of an
|
|
610
|
+
original, running at once and failed or unfinished, are counted apart from its
|
|
611
|
+
revisions, and support raises only the revision limit. An operation the shot
|
|
612
|
+
does not offer is `edit_invalid` with the code `action_not_allowed`.
|
|
613
|
+
|
|
549
614
|
### `list_actors` — free, no input
|
|
550
615
|
|
|
551
616
|
Returns the permanent actor catalog from `/v1/actors`, including stable
|
package/dist/format.js
CHANGED
|
@@ -22,7 +22,8 @@ export async function withFailureReport(body) {
|
|
|
22
22
|
}
|
|
23
23
|
/** Pure `get_run` formatter. Terminal answers carry both `status` and `state`; */
|
|
24
24
|
/** an unknown terminal state falls into IN_PROGRESS by design. */
|
|
25
|
-
export function formatGetRun(run) {
|
|
25
|
+
export function formatGetRun(run, receipt) {
|
|
26
|
+
const workflow = { ...(run.workflow === undefined ? {} : { workflow: run.workflow }), ...(receipt ? { receipt } : {}) };
|
|
26
27
|
if (isTerminal(run.state)) {
|
|
27
28
|
// Outcome by core's named constant, not an array index that reordering
|
|
28
29
|
// could silently invert.
|
|
@@ -33,6 +34,7 @@ export function formatGetRun(run) {
|
|
|
33
34
|
type: "text",
|
|
34
35
|
text: JSON.stringify({
|
|
35
36
|
status: "FAILED",
|
|
37
|
+
...workflow,
|
|
36
38
|
run_id: run.run_id,
|
|
37
39
|
state: run.state,
|
|
38
40
|
...runMoney(run),
|
|
@@ -50,6 +52,7 @@ export function formatGetRun(run) {
|
|
|
50
52
|
type: "text",
|
|
51
53
|
text: JSON.stringify({
|
|
52
54
|
status: "SUCCEEDED",
|
|
55
|
+
...workflow,
|
|
53
56
|
run_id: run.run_id,
|
|
54
57
|
state: run.state,
|
|
55
58
|
...runMoney(run),
|
|
@@ -72,6 +75,7 @@ export function formatGetRun(run) {
|
|
|
72
75
|
type: "text",
|
|
73
76
|
text: JSON.stringify({
|
|
74
77
|
status: "IN_PROGRESS",
|
|
78
|
+
...workflow,
|
|
75
79
|
run_id: run.run_id,
|
|
76
80
|
state: run.state,
|
|
77
81
|
...runMoney(run),
|
package/dist/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AASrD,oFAAoF;AACpF,0EAA0E;AAC1E,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,CAAC,CAAC,KAAK,YAAY,kBAAkB,CAAC;QAAE,MAAM,KAAK,CAAC;IACxD,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;QACjE,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED,kFAAkF;AAClF,oCAAoC;AACpC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAoC;IAEpC,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,kFAAkF;AAClF,kEAAkE;AAClE,MAAM,UAAU,YAAY,CAAC,GAAoB,EAAE,OAAuC;IACxF,MAAM,QAAQ,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EA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,YAAY,CAAC,aAAa,EAAE,CAAC;wBAC3G,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,GAAG,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC;wBACvH,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,kBAAkB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,GAAG,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;wBAC1H,QAAQ,EAAE,GAAG,CAAC,QAAQ;qBACvB,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;IACD,oFAAoF;IACpF,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,MAAM,EAAE,aAAa;oBACrB,GAAG,QAAQ;oBACX,MAAM,EAAE,GAAG,CAAC,MAAM;oBAClB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,GAAG,QAAQ,CAAC,GAAG,CAAC;oBAChB,SAAS,EAAE,IAAI;oBACf,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,WAAW,EACT,+CAA+C;wBAC/C,GAAG,CAAC,MAAM;wBACV,mFAAmF;wBACnF,wDAAwD;iBAC3D,CAAC;aACH;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -4,14 +4,16 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// `offeredUgcInputShape`, not the full shape: fields the server rejects must not
|
|
6
6
|
// be offered to a caller who would get a 400 for using them.
|
|
7
|
-
import { offeredUgcInputShape, actorDefaultsInput, BROLL_POLICY_DESCRIPTION, CATALOG_LANGUAGES, CREATE_ACTOR_DESCRIPTION, createActorInputShape, DEFAULT_FACELESS_VOICE, FACELESS_VOICE_NAMES, MODEL_VOICE_MODEL, MODEL_VOICE_NAMES, SCRIPT_LENGTH_DESCRIPTION, voicesQueryShape, agentRetryShape, runId, MAKE_UGC_DESCRIPTION, MAKE_UGC_AGENT_PROTOCOL, MAKE_FACELESS_DESCRIPTION, MAKE_FACELESS_AGENT_PROTOCOL, makeFacelessInput, offeredFacelessInput, UPLOAD_IMAGE_DESCRIPTION, UPLOAD_MAX_BYTES, sniffUploadMediaType, } from "@clipwright/core";
|
|
7
|
+
import { offeredUgcInputShape, actorDefaultsInput, BROLL_POLICY_DESCRIPTION, CANDIDATE_CHARGE_TEXT, candidateRequest, CATALOG_LANGUAGES, CREATE_ACTOR_DESCRIPTION, createActorInputShape, DEFAULT_FACELESS_VOICE, FACELESS_VOICE_NAMES, MODEL_VOICE_MODEL, MODEL_VOICE_NAMES, SCRIPT_LENGTH_DESCRIPTION, voicesQueryShape, agentRetryShape, runId, MAKE_UGC_DESCRIPTION, MAKE_UGC_AGENT_PROTOCOL, MAKE_FACELESS_DESCRIPTION, MAKE_FACELESS_AGENT_PROTOCOL, makeFacelessInput, offeredFacelessInput, REVISION_CHARGE_TEXT, revisionRequest, UPLOAD_IMAGE_DESCRIPTION, UPLOAD_MAX_BYTES, sniffUploadMediaType, } from "@clipwright/core";
|
|
8
8
|
import { formatGetRun, withFailureReport } from "./format.js";
|
|
9
|
+
import { registerWorkflowTools } from './workflow-tools.js';
|
|
9
10
|
// Version from the manifest: a literal drifts, and a JSON import breaks `rootDir`.
|
|
10
11
|
const packageVersion = () => createRequire(import.meta.url)("../package.json").version;
|
|
11
12
|
/** Builds the MCP server with its tools registered but NO transport connected, */
|
|
12
13
|
/** so tool registration is testable without a stdio process. */
|
|
13
14
|
export function createServer(client) {
|
|
14
15
|
const server = new McpServer({ name: "clipwright", version: packageVersion() });
|
|
16
|
+
registerWorkflowTools(server, client);
|
|
15
17
|
// tools/list publishes the full schema; an empty schema leaves agents guessing.
|
|
16
18
|
server.registerTool("make_ugc", {
|
|
17
19
|
title: "Make a talking-actor video",
|
|
@@ -41,7 +43,7 @@ export function createServer(client) {
|
|
|
41
43
|
const run = await client.getRun(run_id);
|
|
42
44
|
return formatGetRun(run);
|
|
43
45
|
}));
|
|
44
|
-
// The
|
|
46
|
+
// The editor's read tool; the draft of an edit stays on REST, the SDK and the CLI.
|
|
45
47
|
server.registerTool("get_run_shots", {
|
|
46
48
|
title: "Get the shots of a run",
|
|
47
49
|
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
@@ -58,6 +60,76 @@ export function createServer(client) {
|
|
|
58
60
|
}, async ({ run_id }) => withFailureReport(async () => ({
|
|
59
61
|
content: [{ type: "text", text: JSON.stringify(await client.getRunShots(run_id)) }],
|
|
60
62
|
})));
|
|
63
|
+
// The revision pair: a flat object for tools/list, and the union parse refuses none or both of `changes` and `document`.
|
|
64
|
+
const [byDocument, byChanges] = revisionRequest.options;
|
|
65
|
+
const revisionShape = {
|
|
66
|
+
run_id: runId.describe("The run to revise: a succeeded make_faceless run, an original or a revision."),
|
|
67
|
+
changes: byChanges.shape.changes.optional()
|
|
68
|
+
.describe("Shots to generate anew over the run as it is: each a shot_id and the operation to generate for it."),
|
|
69
|
+
document: byDocument.shape.document.optional()
|
|
70
|
+
.describe("The whole edited document, as the run's draft holds it; retimes, deletions and uploads go this way."),
|
|
71
|
+
};
|
|
72
|
+
const revisionOf = ({ changes, document }) => revisionRequest.parse({ ...(changes === undefined ? {} : { changes }), ...(document === undefined ? {} : { document }) });
|
|
73
|
+
server.registerTool("quote_revision", {
|
|
74
|
+
title: "Quote a revision of a run",
|
|
75
|
+
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
76
|
+
description: "Price a revision of a run WITHOUT spending credits: what it would change (summary) and what it costs " +
|
|
77
|
+
"(billing.total_credits). Pass run_id and exactly one of changes or document, the same as revise_run. Always " +
|
|
78
|
+
`call this first and show the user the price before revise_run. ${REVISION_CHARGE_TEXT} While paid edits are ` +
|
|
79
|
+
"closed it answers editing_disabled and charges nothing.",
|
|
80
|
+
inputSchema: revisionShape,
|
|
81
|
+
}, async ({ run_id, ...request }) => withFailureReport(async () => ({
|
|
82
|
+
content: [{ type: "text", text: JSON.stringify(await client.quoteRevision(run_id, revisionOf(request))) }],
|
|
83
|
+
})));
|
|
84
|
+
server.registerTool("revise_run", {
|
|
85
|
+
title: "Revise a run",
|
|
86
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
87
|
+
description: "Start a revision of a run made by make_faceless (paid): a NEW run that renders the video again with the " +
|
|
88
|
+
"shots you change, by changes (a shot and what to generate for it) or by document (the whole edited " +
|
|
89
|
+
"document); pass exactly one. Call quote_revision first and show the user the price. An identical request " +
|
|
90
|
+
"returns the same run it started before, so a call repeated after a lost answer starts nothing new; to " +
|
|
91
|
+
`start a second revision with the same request on purpose, pass attempt 2. ${REVISION_CHARGE_TEXT} An ` +
|
|
92
|
+
"original has a limit on revisions running at once and on revisions failed or unfinished, and paid edits " +
|
|
93
|
+
"of it close some days after it finished; a refusal names which. While paid edits are closed it answers " +
|
|
94
|
+
"editing_disabled and charges nothing. The result is a new run: poll it with get_run; once it succeeded " +
|
|
95
|
+
"it is editable under its own run_id.",
|
|
96
|
+
inputSchema: { ...revisionShape, ...agentRetryShape },
|
|
97
|
+
}, async ({ run_id, attempt, ...request }) => withFailureReport(async () => formatGetRun(await client.startRevision(run_id, revisionOf(request), { attempt }))));
|
|
98
|
+
// The candidate pair; the list stays on REST, the SDK and the CLI, since an agent polls its own candidate with get_run.
|
|
99
|
+
const candidateShape = {
|
|
100
|
+
run_id: runId.describe("The faceless run whose shot the candidate is for: a succeeded original or revision."),
|
|
101
|
+
shot_id: candidateRequest.shape.shot_id.describe("The shot to make a candidate for, as get_run_shots names it."),
|
|
102
|
+
operation: candidateRequest.shape.operation.describe("What to generate: one of the operations get_run_shots lists for the shot."),
|
|
103
|
+
take: candidateRequest.shape.take.optional()
|
|
104
|
+
.describe("Take number, 1 by default: the same request and take return the same run; take 2 makes another candidate."),
|
|
105
|
+
};
|
|
106
|
+
// The tool schema has already parsed every field; only the take's default is added here.
|
|
107
|
+
const candidateOf = ({ take, ...request }) => ({ ...request, take: take ?? 1 });
|
|
108
|
+
server.registerTool("quote_candidate", {
|
|
109
|
+
title: "Quote a shot candidate",
|
|
110
|
+
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
111
|
+
description: "Price one shot candidate of a run WITHOUT spending credits: one picture or clip made for one shot, to keep " +
|
|
112
|
+
"or discard in a revision. Pass run_id, shot_id and operation, the same as create_candidate; the answer names " +
|
|
113
|
+
"the unit, its credits and usable_until, the last moment the candidate can enter a revision. Always call this " +
|
|
114
|
+
`first and show the user the price before create_candidate. ${CANDIDATE_CHARGE_TEXT} While shot candidates are ` +
|
|
115
|
+
"closed it answers editing_disabled and charges nothing.",
|
|
116
|
+
inputSchema: candidateShape,
|
|
117
|
+
}, async ({ run_id, ...request }) => withFailureReport(async () => ({
|
|
118
|
+
content: [{ type: "text", text: JSON.stringify(await client.quoteCandidate(run_id, candidateOf(request))) }],
|
|
119
|
+
})));
|
|
120
|
+
server.registerTool("create_candidate", {
|
|
121
|
+
title: "Make a shot candidate",
|
|
122
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
123
|
+
description: "Make a shot candidate of a run made by make_faceless (paid): a NEW run of skill edit_shot that generates one " +
|
|
124
|
+
"picture or clip for one shot, to keep or discard in a later revision. Call quote_candidate first and show the " +
|
|
125
|
+
`user the price. ${CANDIDATE_CHARGE_TEXT} An identical request returns the same run it started before, so a ` +
|
|
126
|
+
"call repeated after a lost answer starts nothing new; to make another candidate with the same request on " +
|
|
127
|
+
"purpose, pass take 2. An original has a limit on candidates running at once and on candidates failed or " +
|
|
128
|
+
"unfinished, apart from its revisions; a refusal names which. While shot candidates are closed it answers " +
|
|
129
|
+
"editing_disabled and charges nothing. The result is a new run: poll it with get_run; once it succeeded, its " +
|
|
130
|
+
"candidate.preview_url shows what was made.",
|
|
131
|
+
inputSchema: candidateShape,
|
|
132
|
+
}, async ({ run_id, ...request }) => withFailureReport(async () => formatGetRun(await client.createCandidate(run_id, candidateOf(request)))));
|
|
61
133
|
server.registerTool("quote_ugc", {
|
|
62
134
|
title: "Quote a video",
|
|
63
135
|
annotations: { readOnlyHint: true, destructiveHint: false },
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AACjF,6DAA6D;AAC7D,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9D,mFAAmF;AACnF,MAAM,cAAc,GAAG,GAAW,EAAE,CACjC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAyB,CAAC,OAAO,CAAC;AAErF,kFAAkF;AAClF,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,MAAwB;IACnD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI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E,EAAE,EAAE,CACrB,iBAAiB,CAAC,KAAK,IAAI,EAAE;QAC3B,MAAM,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACnC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACtF,CAAC,CAAC,CACL,CAAC;IAEF,6EAA6E;IAC7E,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE;QACjC,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE;QAC3D,WAAW,EACT,4FAA4F;YAC5F,yFAAyF;YACzF,4FAA4F;YAC5F,4FAA4F;YAC5F,gGAAgG;QAClG,WAAW,EAAE,EAAE;KAChB,EAAE,KAAK,IAAI,EAAE,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC5C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;KAC7E,CAAC,CAAC,CAAC,CAAC;IAEL,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { workflowToolInputs, WORKFLOW_TOOL_DESCRIPTIONS } from '@clipwright/core/workflows';
|
|
2
|
+
import { formatGetRun, withFailureReport } from './format.js';
|
|
3
|
+
const json = (value) => ({ content: [{ type: 'text', text: JSON.stringify(value) }] });
|
|
4
|
+
const config = (name, title, readOnlyHint) => ({
|
|
5
|
+
title, description: WORKFLOW_TOOL_DESCRIPTIONS[name], inputSchema: workflowToolInputs[name],
|
|
6
|
+
annotations: { readOnlyHint, destructiveHint: false },
|
|
7
|
+
});
|
|
8
|
+
export function registerWorkflowTools(server, client) {
|
|
9
|
+
server.registerTool('list_workflows', config('list_workflows', 'List workflow methods', true), async () => withFailureReport(async () => json(await client.listWorkflows())));
|
|
10
|
+
server.registerTool('get_workflow', config('get_workflow', 'Read a workflow method', true), async ({ method_id }) => withFailureReport(async () => json(await client.getWorkflow(method_id))));
|
|
11
|
+
server.registerTool('prepare_workflow_plan', config('prepare_workflow_plan', 'Create or save a workflow plan', false), async ({ document, plan_id, base_version }) => withFailureReport(async () => json(plan_id === undefined
|
|
12
|
+
? await client.createWorkflowPlan({ document })
|
|
13
|
+
: await client.saveWorkflowPlan(plan_id, { document, base_version: base_version }))));
|
|
14
|
+
server.registerTool('get_workflow_plan', config('get_workflow_plan', 'Read a workflow plan', true), async ({ plan_id }) => withFailureReport(async () => json(await client.getWorkflowPlan(plan_id))));
|
|
15
|
+
server.registerTool('approve_workflow_plan', config('approve_workflow_plan', 'Approve a workflow revision', false), async ({ plan_id, ...approval }) => withFailureReport(async () => json(await client.approveWorkflowPlan(plan_id, approval))));
|
|
16
|
+
server.registerTool('quote_workflow_plan', config('quote_workflow_plan', 'Quote a workflow run', true), async ({ plan_id }) => withFailureReport(async () => json(await client.quoteWorkflowPlan(plan_id))));
|
|
17
|
+
server.registerTool('run_workflow_plan', config('run_workflow_plan', 'Start a paid workflow run', false), async ({ plan_id, ...request }) => withFailureReport(async () => {
|
|
18
|
+
const launched = await client.runWorkflowPlan(plan_id, request);
|
|
19
|
+
return formatGetRun(launched.run, launched.receipt);
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=workflow-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-tools.js","sourceRoot":"","sources":["../src/workflow-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAwB,MAAM,aAAa,CAAC;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E,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,IAAI,EAAE;QAC5D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChE,OAAO,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipwright/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "MCP server for Clipwright: generate UGC videos from your coding agent",
|
|
5
5
|
"mcpName": "io.clipwright/mcp",
|
|
6
6
|
"keywords": [
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
36
36
|
"zod": "^4.4.3",
|
|
37
|
-
"@clipwright/core": "0.
|
|
38
|
-
"@clipwright/sdk": "0.
|
|
37
|
+
"@clipwright/core": "0.29.0",
|
|
38
|
+
"@clipwright/sdk": "0.29.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^26.1.1"
|