@clipwright/mcp-server 0.29.0 → 0.31.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
@@ -18,6 +18,104 @@ listed under.
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [0.31.0] - 2026-10-19
22
+
23
+ ### Added
24
+
25
+ - *Server-side:* the remote MCP server at `https://mcp.clipwright.io/mcp` signs in with OAuth 2.1 and needs no API key.
26
+ A client registers itself, either with a metadata document or with dynamic registration. You approve it at
27
+ app.clipwright.io, and its token carries `mcp:read`, or `mcp:write` for tools that spend credits. Headless agents
28
+ sign in with a device code as the client `clipwright-agent`.
29
+ - *Dashboard:* the API keys page lists your connected apps and revokes them, effective on the app's next request.
30
+ Signing in and signing up return you to the page that sent you there.
31
+ - `@clipwright/mcp-server` exports `createServer(client, { fileAccess })`, so the same tools can be served over HTTP;
32
+ with `fileAccess: "refuse"`, `upload_image` refuses a local `path`. `ClipwrightClient` in the SDK takes an explicit
33
+ `clientId` (it then ignores `CLIPWRIGHT_CLIENT_ID` and `~/.clipwright`) and an `apiKey` function called per
34
+ request. *Server-side:* a new error code, `insufficient_scope` (403).
35
+ - *Server-side (activation pending):* new jobs admitted with required output marking verify signed provenance and a separate
36
+ hidden watermark before delivering generated MP4/PNG/JPEG files; unverifiable required output is withheld with zero charge
37
+ for the failed delivery. Optional `visible_ai_label` defaults to true for newly marked presenter videos, including long form;
38
+ false hides only the visible label. Required machine marking stays enabled, and original uploads and historical files remain
39
+ unchanged. Public contract version: `2026-10-18`. Marking is closed and the P2 video profile remains inactive pending native
40
+ qualification; this entry does not announce deployment or activation.
41
+ - *Server-side (activation pending):* single paid generations. `generate_image` makes one image and `generate_video`
42
+ makes one silent clip from a prompt, with optional reference images or a first frame. MCP tools: `list_generation_models`,
43
+ `quote_image`, `generate_image`, `quote_video` and `generate_video`. SDK methods: `listGenerationModels`, `quoteImage`,
44
+ `generateImage`, `quoteVideo` and `generateVideo`. An image costs one unit; a clip is priced per requested second. A
45
+ failed generation costs nothing. The routes answer `generations_disabled` until the feature is switched on; this entry
46
+ does not announce activation.
47
+
48
+ - *Server-side:* upload responses and the upload list include `content_digest`, the SHA-256 of the original bytes, alongside
49
+ `upload_id`. CLI `upload --json` prints both for direct workflow asset binding; the default still prints the URL.
50
+ SDK and MCP preserve the metadata, and the workflow docs show how to copy it without a digest lookup.
51
+ Hand-built TypeScript `UploadResponse` values, including mocks, must supply the new required digest.
52
+ - Edit rules for long videos in `@clipwright/core`. The rules gain `cover_min_frames`, the shortest picture over a
53
+ presenter take and the shortest presenter gap between two such pictures; it is `null` where it does not apply, and
54
+ read as `null` when absent. `upload_aspect` may be `{ mode: "exact", epsilon }`, and `max_generated_per_revision`
55
+ may be 0. *Server-side:* `GET /v1/runs/{id}/shots` of a long video carries these rules; the video stays view-only.
56
+ - **Breaking:** `SKILLS` gains `revise_long_form`, the revision of a long video that a later release opens. Code with
57
+ an exhaustive `Record<Skill, …>` or `switch` over skills must add it. No run of this skill exists yet.
58
+ - *Server-side:* four workflow methods now render: `ugc-product-intro`, `ugc-faq-answer`, `faceless-explainer` and
59
+ `product-image-story`. `plan-run` in the CLI, `run_workflow_plan` in MCP and `runWorkflowPlan` in the SDK buy the
60
+ quoted plan, charged like the video type the method makes. `website-proof-demo` and `kinetic-launch` still only
61
+ plan.
62
+ - *Dashboard:* the quickstart names the four workflow methods, and the Workflows section of the docs shows the CLI
63
+ steps from a method's example to a finished run, and how to add your own product photos.
64
+ - *Dashboard:* a link to clipwright.io shared in a chat, a social post or a directory shows a preview picture: the
65
+ Clipwright mark and name.
66
+
67
+ ### Changed
68
+
69
+ - *Dashboard:* a long video's button says **View** instead of **Edit**, because the editor only shows long videos for
70
+ now. The button appears only while the API shows long videos.
71
+
72
+ ### Fixed
73
+
74
+ - The SDK reads server responses tolerantly: a field that a newer server adds to a quote, the generation models list,
75
+ a run or a workflow answer no longer makes `ClipwrightResponseError` throw in an installed client. A response
76
+ missing a required field still fails.
77
+ - *Server-side:* UGC output evidence accepts the measured AAC-LC tail beyond the last video frame, up to two
78
+ AAC frames at the measured sample rate. It retains the container duration and existing billing behavior.
79
+ - *Server-side:* a short UGC video is charged for its picture, not for the audio that runs past the last frame.
80
+ An 8.96-second video whose AAC track ends 0.04 s later was charged for 10 seconds; it is now charged for 9.
81
+ `duration_seconds` still reports the file's full length.
82
+ - *Server-side:* UGC workflow quotes explicitly warn that duration and credits are estimates, so the final charge
83
+ may differ. Short UGC keeps measured-duration rounding; long-form keeps its separate frozen face-time tariff.
84
+ SDK, CLI and MCP retain the advice in the native quote warnings. Billing calculations are unchanged.
85
+ - UGC workflow outcomes expose the measured final-file format, duration and
86
+ digest after verified delivery. Missing or damaged evidence stays explicit;
87
+ the native video result and settlement remain available.
88
+ - *Server-side:* generated scenes in `product-image-story` use up to two distinct original product photos as
89
+ references, including the opener image. The first anchors shape; extra originals keep their image placements.
90
+ Plan readiness and the quote disclose the selection and possible visual differences. Older paid checkpoints
91
+ reuse their existing scenes with a warning when product-photo conditioning cannot be verified. Revisions and
92
+ candidates retain that known limitation through later edits.
93
+ - The examples of `ugc-product-intro` and `ugc-faq-answer` named the actor `actor_male`, which does not exist, so a
94
+ plan built from either example was refused at the quote with `actor_unavailable`. They name `actor_marcus` now. Both
95
+ cards get a new `content_digest`; a plan pinned to the old one needs a new revision.
96
+
97
+ ## [0.30.0] - 2026-10-17
98
+
99
+ ### Added
100
+
101
+ - Upload list: `listUploads` in the SDK and `uploads` in the CLI read the account's uploads that a revision still
102
+ takes, newest first and one per picture. Each comes with a freshly signed url and `usable_until`, its creation plus
103
+ 30 days of storage less a two-hour margin. Free. *Server-side:* `GET /v1/uploads`.
104
+ - *Dashboard:* the editor's **Edit shot** dialog makes a new picture or clip for one shot and shows it beside the one in
105
+ the video; you keep it or discard it. A result costs its price once it is made, kept or discarded; nothing if it fails.
106
+ **Replace with a file** and the **Uploads** tab place your own picture in a shot at no cost, and **Generated assets**
107
+ lists what you made for the video.
108
+ - *Dashboard:* long videos open in the editor to view. Each presenter take and each inserted picture or clip is a shot
109
+ you can select and play, with the words said over it; a take also shows how many seconds of the video have the face
110
+ on screen. Editing long videos comes later. *Server-side:* `GET /v1/runs/{id}/shots` answers a delivered long-form
111
+ run with `planned: true` and the new `editable.state` `view_only`; a draft save of such a run gets 409
112
+ `run_not_editable`.
113
+
114
+ ### Fixed
115
+
116
+ - *Server-side:* uploads made before 2026-10-05T19:49Z are no longer listed or taken by a revision. The storage rule of
117
+ that time deleted their files after 7 days, so a revision that named one failed at no charge.
118
+
21
119
  ## [0.29.0] - 2026-10-16
22
120
 
23
121
  ### Added
package/README.md CHANGED
@@ -15,6 +15,80 @@ by signing up starts with 420 trial credits, enough for one 90-second faceless v
15
15
 
16
16
  ## Install
17
17
 
18
+ There are two ways to connect: the hosted server at
19
+ `https://mcp.clipwright.io/mcp`, or this package run locally over stdio. Both
20
+ serve the same tools.
21
+
22
+ ### Hosted server, no key
23
+
24
+ Add the URL to your client. On first use the client opens a browser, you sign
25
+ in to Clipwright and approve the app. **Claude Code and the device-code flow
26
+ below were verified live on 2026-10-18;** the other commands come from each
27
+ client's own documentation and have not been tried with Clipwright yet.
28
+
29
+ - **Claude Code** (verified live): `claude mcp add --transport http clipwright https://mcp.clipwright.io/mcp`,
30
+ then run `/mcp` in a session and sign in.
31
+ - **Claude.ai and Claude Desktop:** Customize → Connectors → Add custom
32
+ connector, then paste the URL.
33
+ - **ChatGPT:** add the URL as the remote MCP server of a plugin, as OpenAI's
34
+ guide "Connect and test your plugin" describes; ChatGPT signs in with OAuth.
35
+ - **Cursor:** in `~/.cursor/mcp.json`,
36
+ `{"mcpServers": {"clipwright": {"url": "https://mcp.clipwright.io/mcp"}}}`.
37
+ - **VS Code:** in `.mcp.json` at the workspace root,
38
+ `{"mcpServers": {"clipwright": {"type": "http", "url": "https://mcp.clipwright.io/mcp"}}}`.
39
+ - **Gemini CLI:** `gemini mcp add --transport http clipwright https://mcp.clipwright.io/mcp`,
40
+ then `/mcp auth clipwright`.
41
+ - **Codex:** `codex mcp add clipwright --url https://mcp.clipwright.io/mcp`,
42
+ then `codex mcp login clipwright`.
43
+
44
+ The approval page lists the permissions the app asks for. There are two:
45
+
46
+ - `mcp:read` — the tools marked read-only: account, runs, shots, voices,
47
+ actors, workflows and quotes.
48
+ - `mcp:write` — every other tool. Some start paid runs and **spend credits**;
49
+ the rest change the account (actors, uploads, workflow plans).
50
+
51
+ A connection without `mcp:write` gets `403 insufficient_scope` from those
52
+ tools, and nothing is charged. Only an admitted account can approve.
53
+
54
+ To disconnect an app, open [app.clipwright.io/api-keys](https://app.clipwright.io/api-keys),
55
+ find it under **Connected apps** and revoke it. Its next request gets `401`. A
56
+ connection lasts 90 days from approval; after that the app asks you to sign in
57
+ again.
58
+
59
+ On the hosted server `upload_image` cannot read a file on your machine. Pass a
60
+ public https URL of the PNG or JPEG as `image` instead (#709 tracks upload by
61
+ URL).
62
+
63
+ **An agent with no browser** signs in with a device code and the first-party
64
+ client `clipwright-agent` (verified live 2026-10-18):
65
+
66
+ ```bash
67
+ curl -s https://mcp.clipwright.io/device/auth -d client_id=clipwright-agent \
68
+ --data-urlencode "scope=mcp:read mcp:write offline_access" \
69
+ --data-urlencode "resource=https://mcp.clipwright.io/mcp"
70
+ ```
71
+
72
+ Open `verification_uri` (`https://mcp.clipwright.io/device`) on any device,
73
+ enter `user_code`, sign in and approve; the approval page repeats the code.
74
+ Meanwhile poll `POST https://mcp.clipwright.io/token` with
75
+ `grant_type=urn:ietf:params:oauth:grant-type:device_code`, the `device_code`
76
+ and `client_id=clipwright-agent`, no more often than every 5 seconds: a faster
77
+ poll gets `slow_down`. Send the `access_token` as `Authorization: Bearer` to
78
+ `/mcp`; it lasts an hour. Renew it with `grant_type=refresh_token` and keep the
79
+ newest refresh token each time. The device flow is open to this client only.
80
+
81
+ ### Hosted server with a `cw_*` key
82
+
83
+ For CI and scripts, send a key instead of signing in. A key holds both
84
+ permissions.
85
+
86
+ ```bash
87
+ claude mcp add --transport http clipwright https://mcp.clipwright.io/mcp --header "Authorization: Bearer cw_..."
88
+ ```
89
+
90
+ ### Local server over stdio
91
+
18
92
  ```bash
19
93
  claude mcp add clipwright -e CLIPWRIGHT_API_KEY=cw_... -- npx -y -p @clipwright/mcp-server clipwright-mcp
20
94
  ```
@@ -23,10 +97,13 @@ Put your own key in place of `cw_...`. The command is one line and gives the
23
97
  shell nothing to expand, so bash, zsh and PowerShell run it alike. It needs
24
98
  Node.js 20 or newer.
25
99
 
26
- Any MCP host works — the server speaks JSON-RPC over stdio.
100
+ Any MCP host works — the local server speaks JSON-RPC over stdio. Issue keys at
101
+ [app.clipwright.io/api-keys](https://app.clipwright.io/api-keys).
27
102
 
28
103
  ## Environment
29
104
 
105
+ These variables configure the local server.
106
+
30
107
  | Variable | Required | Meaning |
31
108
  |---|---|---|
32
109
  | `CLIPWRIGHT_API_KEY` | yes | Your `cw_*` token. The process exits immediately without it. |
@@ -75,6 +152,13 @@ Any MCP host works — the server speaks JSON-RPC over stdio.
75
152
  nothing, even when its paid work was already done. An identical request
76
153
  returns the same run; `take` makes another candidate on purpose. Returns a
77
154
  `run_id` immediately; poll `get_run` until `succeeded`.
155
+ - `list_generation_models` — the models of single generations with their
156
+ measured shapes and credits per image or per second. Free.
157
+ - `quote_image`, `quote_video` — price of one image or one clip. Free.
158
+ - `generate_image`, `generate_video` — **make one image or one silent clip;
159
+ this costs money.** One that fails is charged nothing, even when the vendor
160
+ was already paid. An identical request returns the same run; `attempt` starts
161
+ another on purpose. Poll `get_run`; `generation.url` is the file.
78
162
  - `upload_image` — a local PNG/JPEG → signed https url to pass as `image`. Free;
79
163
  20 per day, the url lives 24 hours. Set `aspect_ratio` explicitly afterwards.
80
164
  - `quote_actor` — price of a personal actor before creating one. Free.
package/SKILL.md CHANGED
@@ -20,6 +20,13 @@ an oversight: see `LICENSE` in the repository root.
20
20
 
21
21
  ## 1. Installation
22
22
 
23
+ There are two ways to connect, and both serve the same tools:
24
+
25
+ - **the hosted server** at `https://mcp.clipwright.io/mcp` (Streamable HTTP),
26
+ signed in with OAuth or with a `cw_*` key — section 1.4. Nothing to install;
27
+ - **this package run locally** over stdio with `CLIPWRIGHT_API_KEY` — sections
28
+ 1.1 to 1.3, and section 2.
29
+
23
30
  ### 1.1 From npm — the normal path
24
31
 
25
32
  ```bash
@@ -164,7 +171,8 @@ Environment variables:
164
171
  | `CLIPWRIGHT_CLIENT_ID` | YES (see section 2) | Unique identifier of this INSTALLATION. |
165
172
 
166
173
  After connecting, restart or reopen the MCP host and confirm that `tools/list`
167
- returns 26 tools: `make_ugc`, `get_run`, `get_run_shots`, `quote_revision`, `revise_run`, `quote_candidate`, `create_candidate`, `quote_ugc`, `list_actors`,
174
+ returns 31 tools: `make_ugc`, `get_run`, `get_run_shots`, `quote_revision`, `revise_run`, `quote_candidate`, `create_candidate`,
175
+ `list_generation_models`, `quote_image`, `generate_image`, `quote_video`, `generate_video`, `quote_ugc`, `list_actors`,
168
176
  `list_voices`, `upload_image`, `get_account`, `create_actor`, `quote_actor`, `delete_actor`, `get_actor_defaults`,
169
177
  `set_actor_defaults`, `quote_faceless`, `make_faceless`, `list_workflows`, `get_workflow`, `prepare_workflow_plan`,
170
178
  `get_workflow_plan`, `approve_workflow_plan`, `quote_workflow_plan`, `run_workflow_plan`.
@@ -181,8 +189,100 @@ keeps the purchased revision and available outcome evidence. Technical evidence
181
189
  does not mean a person accepted the creative result. After an uncertain paid
182
190
  answer, preserve the original request and key; a new key can pay twice.
183
191
 
192
+ ### 1.4 The hosted server — OAuth or a `cw_*` key
193
+
194
+ The hosted server runs the same tools at `https://mcp.clipwright.io/mcp`. It
195
+ keeps no session: every message is its own `POST`. Add the URL to the client;
196
+ on first use the client opens a browser, the account holder signs in to
197
+ Clipwright and approves the app.
198
+
199
+ **Status: Claude Code and the device-code flow were verified live on
200
+ 2026-10-18;** the other commands come from each client's own documentation:
201
+
202
+ | Client | How to add | Verified |
203
+ |---|---|---|
204
+ | Claude Code | `claude mcp add --transport http clipwright https://mcp.clipwright.io/mcp`, then `/mcp` in a session to sign in | verified live 2026-10-18 |
205
+ | Claude.ai, Claude Desktop | Customize → Connectors → Add custom connector, paste the URL | not yet verified live |
206
+ | ChatGPT | the URL as the remote MCP server of a plugin (OpenAI's guide "Connect and test your plugin") | not yet verified live |
207
+ | Cursor | `~/.cursor/mcp.json`: `{"mcpServers": {"clipwright": {"url": "https://mcp.clipwright.io/mcp"}}}` | not yet verified live |
208
+ | VS Code | `.mcp.json` at the workspace root: `{"mcpServers": {"clipwright": {"type": "http", "url": "https://mcp.clipwright.io/mcp"}}}` | not yet verified live |
209
+ | Gemini CLI | `gemini mcp add --transport http clipwright https://mcp.clipwright.io/mcp`, then `/mcp auth clipwright` | not yet verified live |
210
+ | Codex | `codex mcp add clipwright --url https://mcp.clipwright.io/mcp`, then `codex mcp login clipwright` | not yet verified live |
211
+
212
+ **Permissions.** The approval page lists what the app asks for:
213
+
214
+ - `mcp:read` — the tools with `readOnlyHint: true`: account, runs, shots,
215
+ voices, actors, workflows and every quote. Free.
216
+ - `mcp:write` — every other tool: `make_ugc`, `make_faceless`, `revise_run`,
217
+ `create_candidate`, `generate_image`, `generate_video`, `create_actor` and
218
+ `run_workflow_plan` **spend credits**;
219
+ `upload_image`, `delete_actor`, `set_actor_defaults`, `prepare_workflow_plan`
220
+ and `approve_workflow_plan` change the account.
221
+
222
+ The account holder approves or declines the whole request; only an admitted
223
+ account can approve. A connection without `mcp:write` that calls one of those
224
+ tools gets HTTP `403` with `error: "insufficient_scope"` and
225
+ `WWW-Authenticate: Bearer error="insufficient_scope", scope="mcp:write", resource_metadata="…"`.
226
+ Nothing is charged and no run is created. Reconnect the app and approve
227
+ spending to fix it.
228
+
229
+ **Revoking.** The account holder revokes an app at
230
+ `https://app.clipwright.io/api-keys`, under **Connected apps**. Its next request
231
+ gets `401`. A connection lasts 90 days from approval and is not extended by
232
+ use: after that the app must sign in again. An access token lasts one hour;
233
+ clients renew it themselves.
234
+
235
+ **Files.** The hosted server cannot read files on the agent's machine, so
236
+ `upload_image` refuses a `path` there. Pass a public https URL of the PNG or
237
+ JPEG as `image` to `quote_ugc` and `make_ugc` instead (#709 tracks upload by
238
+ URL).
239
+
240
+ **Idempotency.** Section 2 does not apply here. Each connected app (one
241
+ grant) is its own client identity, and so is each `cw_*` key, so two
242
+ connections of one account never collapse into one run. A repeated request
243
+ within one connection returns the same run, as on stdio.
244
+
245
+ **An agent with no browser** signs in with a device code (verified live
246
+ 2026-10-18). Only the first-party client `clipwright-agent` may use this flow:
247
+
248
+ ```bash
249
+ curl -s https://mcp.clipwright.io/device/auth -d client_id=clipwright-agent \
250
+ --data-urlencode "scope=mcp:read mcp:write offline_access" \
251
+ --data-urlencode "resource=https://mcp.clipwright.io/mcp"
252
+ ```
253
+
254
+ 1. Show the person `user_code` and `verification_uri`
255
+ (`https://mcp.clipwright.io/device`). They open the page on any device,
256
+ enter the code, sign in and approve. The approval page repeats the code:
257
+ they approve only if it matches.
258
+ 2. Meanwhile poll `POST https://mcp.clipwright.io/token` with
259
+ `grant_type=urn:ietf:params:oauth:grant-type:device_code`, `device_code` and
260
+ `client_id=clipwright-agent`, no more often than every 5 seconds. Until
261
+ approval the answer is `authorization_pending`; a faster poll gets
262
+ `slow_down`.
263
+ 3. Send `access_token` as `Authorization: Bearer` to `/mcp`. Renew it with
264
+ `grant_type=refresh_token`, the refresh token and the same `client_id`. Each
265
+ renewal returns a new refresh token: keep the newest one.
266
+
267
+ **With a `cw_*` key instead of OAuth** — for CI and scripts. A key holds both
268
+ permissions:
269
+
270
+ ```bash
271
+ claude mcp add --transport http clipwright https://mcp.clipwright.io/mcp --header "Authorization: Bearer cw_..."
272
+ ```
273
+
274
+ **Errors of the endpoint itself:** no token, or a revoked or unknown key —
275
+ `401` with
276
+ `WWW-Authenticate: Bearer resource_metadata="https://mcp.clipwright.io/.well-known/oauth-protected-resource/mcp", scope="mcp:read mcp:write"`,
277
+ which a client follows to sign in; an expired or revoked OAuth token — the same
278
+ `401` with `error="invalid_token"` added; `GET /mcp` with a valid token — `405`;
279
+ a body over 1 MB — `413`.
280
+
184
281
  ## 2. `CLIPWRIGHT_CLIENT_ID` — required, and WHY
185
282
 
283
+ This section is about the local server. The hosted server takes the client
284
+ identity from the connection itself (section 1.4).
285
+
186
286
  **Rule: EVERY installation must get its OWN unique `CLIPWRIGHT_CLIENT_ID` BEFORE
187
287
  the first `make_ugc` call.** Do not copy the value from another machine, and do
188
288
  not leave it empty hoping the default will "work out somehow".
@@ -611,6 +711,26 @@ original, running at once and failed or unfinished, are counted apart from its
611
711
  revisions, and support raises only the revision limit. An operation the shot
612
712
  does not offer is `edit_invalid` with the code `action_not_allowed`.
613
713
 
714
+ ### `quote_image`, `quote_video` — free; `generate_image`, `generate_video` — paid
715
+
716
+ One image or one silent clip from a prompt, each a run of its own.
717
+ `list_generation_models` lists the models, modes, aspect ratios, resolutions,
718
+ durations and `unit_credits`: credits per image, or per second of a clip. Any
719
+ other combination is `unsupported_combination` before any charge. The quotes
720
+ answer the credits, the width and height, and warnings; show the price first.
721
+
722
+ A reference is `{ "upload_id": ..., "rights_confirmed": true }` for a picture
723
+ from `upload_image`, or `{ "run_id": ... }` of a succeeded `generate_image` run
724
+ of this account until its `reusable_until`. In `first_frame` mode the frame must
725
+ match the requested aspect ratio within 2% (`source_aspect_mismatch`).
726
+
727
+ The run tools return the run at once; poll it with `get_run`, and once it
728
+ succeeded `generation.url` is the file. A delivered generation is charged its
729
+ quoted credits; one that fails is charged nothing, even when the vendor was
730
+ already paid. An identical request returns the same run; pass `attempt: 2` for
731
+ another. While generations are closed the tools answer `generations_disabled`
732
+ or `generations_marking_pending` and charge nothing.
733
+
614
734
  ### `list_actors` — free, no input
615
735
 
616
736
  Returns the permanent actor catalog from `/v1/actors`, including stable
@@ -0,0 +1,19 @@
1
+ import type { WorkflowRunRead, WorkflowLaunchRead } from '@clipwright/core/workflows';
2
+ /** MCP tool response: content blocks. The index signature matches the SDK's */
3
+ /** `CallToolResult`; without it the handler does not type-check. */
4
+ export interface McpToolResponse {
5
+ [x: string]: unknown;
6
+ content: {
7
+ type: "text";
8
+ text: string;
9
+ }[];
10
+ }
11
+ /** An API refusal expanded for the agent: `retryable`, `next_action` and numbers */
12
+ /** as fields. Local errors rethrow, since they carry no server answer. */
13
+ export declare function formatFailure(error: unknown): McpToolResponse;
14
+ /** Tool body with API refusals expanded for the agent; shared by every tool so */
15
+ /** no tool can forget the `try`. */
16
+ export declare function withFailureReport(body: () => Promise<McpToolResponse>): Promise<McpToolResponse>;
17
+ /** Pure `get_run` formatter. Terminal answers carry both `status` and `state`; */
18
+ /** an unknown terminal state falls into IN_PROGRESS by design. */
19
+ export declare function formatGetRun(run: WorkflowRunRead, receipt?: WorkflowLaunchRead['receipt']): McpToolResponse;
package/dist/format.js CHANGED
@@ -56,12 +56,16 @@ export function formatGetRun(run, receipt) {
56
56
  run_id: run.run_id,
57
57
  state: run.state,
58
58
  ...runMoney(run),
59
- video_url: run.final_output?.video_url ?? null,
60
- video_url_check: VIDEO_URL_CHECK,
61
- duration_seconds: run.final_output?.duration_seconds ?? null,
59
+ // A generation run delivers through `generation.url`; the video fields would only mislead.
60
+ ...(run.generation === undefined ? {
61
+ video_url: run.final_output?.video_url ?? null,
62
+ video_url_check: VIDEO_URL_CHECK,
63
+ duration_seconds: run.final_output?.duration_seconds ?? null,
64
+ } : { url_check: VIDEO_URL_CHECK }),
62
65
  ...(run.final_output?.ai_disclosure === undefined ? {} : { ai_disclosure: run.final_output.ai_disclosure }),
63
66
  ...(run.final_output?.long_form_billing === undefined ? {} : { long_form_billing: run.final_output.long_form_billing }),
64
67
  ...(run.final_output?.speech_timing_gaps === undefined ? {} : { speech_timing_gaps: run.final_output.speech_timing_gaps }),
68
+ ...(run.generation === undefined ? {} : { generation: run.generation }),
65
69
  warnings: run.warnings,
66
70
  }),
67
71
  },
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":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I,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"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Tool } from "@modelcontextprotocol/sdk/types.js";
2
+ import { ClipwrightClient } from "@clipwright/sdk";
3
+ import { type CreateServerOptions } from "./server.js";
4
+ /** The tools exactly as a client lists them, from a server that never reaches the API. */
5
+ export declare function listTools(options: CreateServerOptions): Promise<Tool[]>;
6
+ /** Answers one POST of Streamable HTTP without a session, in JSON, with a server that reads no files; `parsedBody` skips a second parse. */
7
+ export declare function handleRemoteRequest(client: ClipwrightClient, request: Request, parsedBody?: unknown): Promise<Response>;
package/dist/remote.js ADDED
@@ -0,0 +1,35 @@
1
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
+ import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
3
+ import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
4
+ import { ClipwrightClient } from "@clipwright/sdk";
5
+ import { createServer } from "./server.js";
6
+ // The two pieces a remote host needs from this package, so the MCP SDK has one copy: the tool list and one stateless POST.
7
+ /** The tools exactly as a client lists them, from a server that never reaches the API. */
8
+ export async function listTools(options) {
9
+ const sdk = new ClipwrightClient({ apiKey: "cw_unused", baseUrl: "http://unused.invalid", clientId: "tool-list" });
10
+ const server = createServer(sdk, options);
11
+ const [clientSide, serverSide] = InMemoryTransport.createLinkedPair();
12
+ const client = new Client({ name: "clipwright-tool-list", version: "0.0.0" });
13
+ await Promise.all([server.connect(serverSide), client.connect(clientSide)]);
14
+ try {
15
+ return (await client.listTools()).tools;
16
+ }
17
+ finally {
18
+ await client.close();
19
+ await server.close();
20
+ }
21
+ }
22
+ /** Answers one POST of Streamable HTTP without a session, in JSON, with a server that reads no files; `parsedBody` skips a second parse. */
23
+ export async function handleRemoteRequest(client, request, parsedBody) {
24
+ const server = createServer(client, { fileAccess: "refuse" });
25
+ // No `sessionIdGenerator`: the SDK's stateless mode, which issues no session id and checks none.
26
+ const transport = new WebStandardStreamableHTTPServerTransport({ enableJsonResponse: true });
27
+ await server.connect(transport);
28
+ try {
29
+ return await transport.handleRequest(request, parsedBody === undefined ? {} : { parsedBody });
30
+ }
31
+ finally {
32
+ await server.close();
33
+ }
34
+ }
35
+ //# sourceMappingURL=remote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,wCAAwC,EAAE,MAAM,+DAA+D,CAAC;AAEzH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAA4B,MAAM,aAAa,CAAC;AAErE,2HAA2H;AAE3H,0FAA0F;AAC1F,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAA4B;IAC1D,MAAM,GAAG,GAAG,IAAI,gBAAgB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IACnH,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,CAAC,UAAU,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face CreateServerOptions {
4
+ /** `local` reads the caller's files (stdio); `refuse` is a remote server, where a path names a file on another machine. */
5
+ fileAccess: "local" | "refuse";
6
+ }
7
+ /** What `upload_image` answers a path on a server that reads no files; the tool list stays the same on both transports. */
8
+ export declare const REMOTE_UPLOAD_REFUSAL: string;
9
+ /** Builds the MCP server with its tools registered but NO transport connected, */
10
+ /** so tool registration is testable without a stdio process. */
11
+ export declare function createServer(client: ClipwrightClient, options?: CreateServerOptions): McpServer;
package/dist/server.js CHANGED
@@ -4,14 +4,17 @@ 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, 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";
7
+ import { offeredUgcInputShape, actorDefaultsInput, BROLL_POLICY_DESCRIPTION, CANDIDATE_CHARGE_TEXT, candidateRequest, CATALOG_LANGUAGES, CREATE_ACTOR_DESCRIPTION, createActorInputShape, DEFAULT_FACELESS_VOICE, FACELESS_VOICE_NAMES, generateImageRequest, generateVideoRequest, 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
9
  import { registerWorkflowTools } from './workflow-tools.js';
10
10
  // Version from the manifest: a literal drifts, and a JSON import breaks `rootDir`.
11
11
  const packageVersion = () => createRequire(import.meta.url)("../package.json").version;
12
+ /** What `upload_image` answers a path on a server that reads no files; the tool list stays the same on both transports. */
13
+ export const REMOTE_UPLOAD_REFUSAL = "This Clipwright server is remote and cannot read files on your machine, so upload_image takes no path here. " +
14
+ "Pass a public https URL of the PNG or JPEG as `image` to quote_ugc and make_ugc instead.";
12
15
  /** Builds the MCP server with its tools registered but NO transport connected, */
13
16
  /** so tool registration is testable without a stdio process. */
14
- export function createServer(client) {
17
+ export function createServer(client, options = { fileAccess: "local" }) {
15
18
  const server = new McpServer({ name: "clipwright", version: packageVersion() });
16
19
  registerWorkflowTools(server, client);
17
20
  // tools/list publishes the full schema; an empty schema leaves agents guessing.
@@ -34,9 +37,11 @@ export function createServer(client) {
34
37
  server.registerTool("get_run", {
35
38
  title: "Get run status",
36
39
  annotations: { readOnlyHint: true, destructiveHint: false },
37
- description: "Check the status of a video generation started by make_ugc or make_faceless. Pass the run_id. While the run " +
40
+ description: "Check the status of a video generation started by make_ugc or make_faceless, or of a generate_image or " +
41
+ "generate_video run. Pass the run_id. While the run " +
38
42
  "is still working it returns status IN_PROGRESS with a next_action telling you to poll again; " +
39
- "repeat every ~5 seconds until it reaches a terminal state — SUCCEEDED (with video_url) or FAILED.",
43
+ "repeat every ~5 seconds until it reaches a terminal state — SUCCEEDED (with video_url, or generation.url for " +
44
+ "generate_image and generate_video) or FAILED.",
40
45
  inputSchema: { run_id: runId },
41
46
  }, async ({ run_id }) => withFailureReport(async () => {
42
47
  // Terminal shape lives in the pure `formatGetRun`: both `status` and `state`.
@@ -130,6 +135,63 @@ export function createServer(client) {
130
135
  "candidate.preview_url shows what was made.",
131
136
  inputSchema: candidateShape,
132
137
  }, async ({ run_id, ...request }) => withFailureReport(async () => formatGetRun(await client.createCandidate(run_id, candidateOf(request)))));
138
+ // Single generations (clipwright#724): the tools are listed while the feature is closed and relay the API's refusal.
139
+ const generationTerms = "A reference is {upload_id, rights_confirmed: true} for a picture from upload_image (rights_confirmed states you may use " +
140
+ "the people and works in it) or {run_id} of a succeeded generate_image run of this account until its reusable_until. " +
141
+ "A generation that fails is charged nothing, even when the vendor was already paid. An identical request returns the " +
142
+ "same run it started before, so a call repeated after a lost answer starts nothing new; to make another one with the " +
143
+ "same request on purpose, pass attempt 2. While generations are closed it answers generations_disabled or " +
144
+ "generations_marking_pending and charges nothing.";
145
+ // Strict objects: an unknown key is refused at the tool, not stripped. The clip's mode rules run in the handler.
146
+ const imageTool = generateImageRequest, imageRunTool = generateImageRequest.extend(agentRetryShape);
147
+ const videoTool = z.strictObject(generateVideoRequest.shape), videoRunTool = videoTool.extend(agentRetryShape);
148
+ server.registerTool("list_generation_models", {
149
+ title: "List generation models",
150
+ annotations: { readOnlyHint: true, destructiveHint: false },
151
+ description: "List the models generate_image and generate_video take, each with its modes, aspect ratios, resolutions, " +
152
+ "durations, output width and height, and unit_credits: credits per image, or per second of a clip. Only measured " +
153
+ "combinations are listed; any other is refused with unsupported_combination before any charge. Free.",
154
+ inputSchema: {},
155
+ }, async () => withFailureReport(async () => ({
156
+ content: [{ type: "text", text: JSON.stringify(await client.listGenerationModels()) }],
157
+ })));
158
+ server.registerTool("quote_image", {
159
+ title: "Quote an image",
160
+ annotations: { readOnlyHint: true, destructiveHint: false },
161
+ description: "Price one generate_image call WITHOUT spending credits: its credits (one image at its model's unit_credits), " +
162
+ "its width and height, and warnings. Always call this first and show the user the price before generate_image. " +
163
+ generationTerms,
164
+ inputSchema: imageTool,
165
+ }, async (args) => withFailureReport(async () => ({
166
+ content: [{ type: "text", text: JSON.stringify(await client.quoteImage(args)) }],
167
+ })));
168
+ server.registerTool("generate_image", {
169
+ title: "Generate an image",
170
+ annotations: { readOnlyHint: false, destructiveHint: false },
171
+ description: "Generate one image from a prompt (paid): a NEW run of skill generate_image, charged the quoted credits per image " +
172
+ "once it is delivered. Call quote_image first and show the user the price. Poll the run with get_run; once it " +
173
+ "succeeded, generation.url is the image and its run_id can be a reference of a later generation. " + generationTerms,
174
+ inputSchema: imageRunTool,
175
+ }, async ({ attempt, ...request }) => withFailureReport(async () => formatGetRun(await client.generateImage(request, { attempt }))));
176
+ server.registerTool("quote_video", {
177
+ title: "Quote a clip",
178
+ annotations: { readOnlyHint: true, destructiveHint: false },
179
+ description: "Price one generate_video call WITHOUT spending credits: its credits (unit_credits per second of duration_s), " +
180
+ "its width and height, and warnings. Always call this first and show the user the price before generate_video. " +
181
+ generationTerms,
182
+ inputSchema: videoTool,
183
+ }, async (args) => withFailureReport(async () => ({
184
+ content: [{ type: "text", text: JSON.stringify(await client.quoteVideo(generateVideoRequest.parse(args))) }],
185
+ })));
186
+ server.registerTool("generate_video", {
187
+ title: "Generate a clip",
188
+ annotations: { readOnlyHint: false, destructiveHint: false },
189
+ description: "Generate one silent clip (paid): a NEW run of skill generate_video, charged unit_credits per second of duration_s " +
190
+ "once it is delivered. Modes: text; first_frame (first_frame, optional last_frame, of the requested aspect ratio " +
191
+ "within 2%); reference (1 to 4 references). Call quote_video first and show the user the price. Poll the run with " +
192
+ "get_run; once it succeeded, generation.url is the clip. " + generationTerms,
193
+ inputSchema: videoRunTool,
194
+ }, async ({ attempt, ...request }) => withFailureReport(async () => formatGetRun(await client.generateVideo(generateVideoRequest.parse(request), { attempt }))));
133
195
  server.registerTool("quote_ugc", {
134
196
  title: "Quote a video",
135
197
  annotations: { readOnlyHint: true, destructiveHint: false },
@@ -150,6 +212,8 @@ export function createServer(client) {
150
212
  path: z.string().min(1).describe("Absolute or cwd-relative path to a PNG or JPEG file"),
151
213
  },
152
214
  }, async ({ path }) => withFailureReport(async () => {
215
+ if (options.fileAccess !== "local")
216
+ throw new Error(REMOTE_UPLOAD_REFUSAL);
153
217
  const bytes = new Uint8Array(await readFile(path));
154
218
  const mediaType = sniffUploadMediaType(bytes);
155
219
  if (mediaType === null || bytes.byteLength > UPLOAD_MAX_BYTES) {
@@ -166,7 +230,8 @@ export function createServer(client) {
166
230
  ...upload,
167
231
  next_action: "Pass `url` as `image` to quote_ugc, then make_ugc. Set `aspect_ratio` explicitly " +
168
232
  `to the picture's shape (${upload.width}x${upload.height}); the url expires at ` +
169
- `${upload.expires_at} — upload again after that.`,
233
+ `${upload.expires_at} — upload again after that. For workflow assets, use upload_id as asset_id ` +
234
+ "and content_digest directly; it identifies the original uploaded bytes.",
170
235
  }),
171
236
  },
172
237
  ],
@@ -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,qBAAqB,EACrB,gBAAgB,EAEhB,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,oBAAoB,EACpB,eAAe,EAEf,wBAAwB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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,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { ClipwrightClient } from '@clipwright/sdk';
3
+ export declare function registerWorkflowTools(server: McpServer, client: ClipwrightClient): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipwright/mcp-server",
3
- "version": "0.29.0",
3
+ "version": "0.31.0",
4
4
  "description": "MCP server for Clipwright: generate UGC videos from your coding agent",
5
5
  "mcpName": "io.clipwright/mcp",
6
6
  "keywords": [
@@ -31,11 +31,25 @@
31
31
  "bin": {
32
32
  "clipwright-mcp": "dist/index.js"
33
33
  },
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/index.d.ts",
37
+ "default": "./dist/index.js"
38
+ },
39
+ "./server": {
40
+ "types": "./dist/server.d.ts",
41
+ "default": "./dist/server.js"
42
+ },
43
+ "./remote": {
44
+ "types": "./dist/remote.d.ts",
45
+ "default": "./dist/remote.js"
46
+ }
47
+ },
34
48
  "dependencies": {
35
49
  "@modelcontextprotocol/sdk": "^1.31.0",
36
50
  "zod": "^4.4.3",
37
- "@clipwright/core": "0.29.0",
38
- "@clipwright/sdk": "0.29.0"
51
+ "@clipwright/core": "0.31.0",
52
+ "@clipwright/sdk": "0.31.0"
39
53
  },
40
54
  "devDependencies": {
41
55
  "@types/node": "^26.1.1"