@clipwright/mcp-server 0.30.0 → 0.32.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,105 @@ listed under.
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [0.32.0] - 2026-10-20
22
+
23
+ ### Added
24
+
25
+ - The public repository ships an n8n workflow, `n8n/clipwright-ugc.json`, built on n8n's own MCP Client node with
26
+ an API key; no community node is needed. It quotes a script, stops when the quote is above `max_credits`, starts the
27
+ render and polls `get_run` every 15 seconds until the run ends. The quote and polling steps ran in n8n 2.43.8; the
28
+ render step and n8n's OAuth credential have not been tried. Setup is in the `@clipwright/mcp-server` README.
29
+ - The public repository is a Claude Code and Cursor plugin marketplace: `claude plugin marketplace add
30
+ seocombat/clipwright-mcp`, then `claude plugin install clipwright@clipwright`. The plugin connects the hosted server
31
+ at `https://mcp.clipwright.io/mcp`, which signs in with OAuth, and adds a skill that quotes before it spends credits.
32
+ - `SKILL.md` in `@clipwright/mcp-server` carries OpenClaw frontmatter: it needs `node` and `npx` and reads
33
+ `CLIPWRIGHT_API_KEY`. The skill is on ClawHub as `seocombat/clipwright`.
34
+ - The four packages name their source repository, `seocombat/clipwright-mcp`, in `package.json`.
35
+ - `@clipwright/core` exports `facelessMaxGeneratedImages` and `FACELESS_PUBLIC_MAX_GENERATED_IMAGES` (31): how many
36
+ pictures a faceless video may generate, one per two selected seconds plus four.
37
+ - *Server-side:* single generations are on since 2026-10-19: `quote_image`, `generate_image`, `quote_video` and
38
+ `generate_video` no longer answer `generations_disabled`. The 0.31.0 entry announced them as pending.
39
+ - *Dashboard:* credits come in three one-time packs: 1,000 for $10, 2,750 for $25 and 6,000 for $50. The dashboard
40
+ has one buy button per pack, and a payment buys one pack.
41
+ - *Dashboard:* the landing page is rebuilt. It starts with installing Clipwright in your agent, then shows the kinds
42
+ of video an agent can make with their prices, a quickstart, a real run, actors and voices, and the three packs.
43
+
44
+ ## [0.31.0] - 2026-10-19
45
+
46
+ ### Added
47
+
48
+ - *Server-side:* the remote MCP server at `https://mcp.clipwright.io/mcp` signs in with OAuth 2.1 and needs no API key.
49
+ A client registers itself, either with a metadata document or with dynamic registration. You approve it at
50
+ app.clipwright.io, and its token carries `mcp:read`, or `mcp:write` for tools that spend credits. Headless agents
51
+ sign in with a device code as the client `clipwright-agent`.
52
+ - *Dashboard:* the API keys page lists your connected apps and revokes them, effective on the app's next request.
53
+ Signing in and signing up return you to the page that sent you there.
54
+ - `@clipwright/mcp-server` exports `createServer(client, { fileAccess })`, so the same tools can be served over HTTP;
55
+ with `fileAccess: "refuse"`, `upload_image` refuses a local `path`. `ClipwrightClient` in the SDK takes an explicit
56
+ `clientId` (it then ignores `CLIPWRIGHT_CLIENT_ID` and `~/.clipwright`) and an `apiKey` function called per
57
+ request. *Server-side:* a new error code, `insufficient_scope` (403).
58
+ - *Server-side (activation pending):* new jobs admitted with required output marking verify signed provenance and a separate
59
+ hidden watermark before delivering generated MP4/PNG/JPEG files; unverifiable required output is withheld with zero charge
60
+ for the failed delivery. Optional `visible_ai_label` defaults to true for newly marked presenter videos, including long form;
61
+ false hides only the visible label. Required machine marking stays enabled, and original uploads and historical files remain
62
+ unchanged. Public contract version: `2026-10-18`. Marking is closed and the P2 video profile remains inactive pending native
63
+ qualification; this entry does not announce deployment or activation.
64
+ - *Server-side (activation pending):* single paid generations. `generate_image` makes one image and `generate_video`
65
+ makes one silent clip from a prompt, with optional reference images or a first frame. MCP tools: `list_generation_models`,
66
+ `quote_image`, `generate_image`, `quote_video` and `generate_video`. SDK methods: `listGenerationModels`, `quoteImage`,
67
+ `generateImage`, `quoteVideo` and `generateVideo`. An image costs one unit; a clip is priced per requested second. A
68
+ failed generation costs nothing. The routes answer `generations_disabled` until the feature is switched on; this entry
69
+ does not announce activation.
70
+
71
+ - *Server-side:* upload responses and the upload list include `content_digest`, the SHA-256 of the original bytes, alongside
72
+ `upload_id`. CLI `upload --json` prints both for direct workflow asset binding; the default still prints the URL.
73
+ SDK and MCP preserve the metadata, and the workflow docs show how to copy it without a digest lookup.
74
+ Hand-built TypeScript `UploadResponse` values, including mocks, must supply the new required digest.
75
+ - Edit rules for long videos in `@clipwright/core`. The rules gain `cover_min_frames`, the shortest picture over a
76
+ presenter take and the shortest presenter gap between two such pictures; it is `null` where it does not apply, and
77
+ read as `null` when absent. `upload_aspect` may be `{ mode: "exact", epsilon }`, and `max_generated_per_revision`
78
+ may be 0. *Server-side:* `GET /v1/runs/{id}/shots` of a long video carries these rules; the video stays view-only.
79
+ - **Breaking:** `SKILLS` gains `revise_long_form`, the revision of a long video that a later release opens. Code with
80
+ an exhaustive `Record<Skill, …>` or `switch` over skills must add it. No run of this skill exists yet.
81
+ - *Server-side:* four workflow methods now render: `ugc-product-intro`, `ugc-faq-answer`, `faceless-explainer` and
82
+ `product-image-story`. `plan-run` in the CLI, `run_workflow_plan` in MCP and `runWorkflowPlan` in the SDK buy the
83
+ quoted plan, charged like the video type the method makes. `website-proof-demo` and `kinetic-launch` still only
84
+ plan.
85
+ - *Dashboard:* the quickstart names the four workflow methods, and the Workflows section of the docs shows the CLI
86
+ steps from a method's example to a finished run, and how to add your own product photos.
87
+ - *Dashboard:* a link to clipwright.io shared in a chat, a social post or a directory shows a preview picture: the
88
+ Clipwright mark and name.
89
+
90
+ ### Changed
91
+
92
+ - *Dashboard:* a long video's button says **View** instead of **Edit**, because the editor only shows long videos for
93
+ now. The button appears only while the API shows long videos.
94
+
95
+ ### Fixed
96
+
97
+ - The SDK reads server responses tolerantly: a field that a newer server adds to a quote, the generation models list,
98
+ a run or a workflow answer no longer makes `ClipwrightResponseError` throw in an installed client. A response
99
+ missing a required field still fails.
100
+ - *Server-side:* UGC output evidence accepts the measured AAC-LC tail beyond the last video frame, up to two
101
+ AAC frames at the measured sample rate. It retains the container duration and existing billing behavior.
102
+ - *Server-side:* a short UGC video is charged for its picture, not for the audio that runs past the last frame.
103
+ An 8.96-second video whose AAC track ends 0.04 s later was charged for 10 seconds; it is now charged for 9.
104
+ `duration_seconds` still reports the file's full length.
105
+ - *Server-side:* UGC workflow quotes explicitly warn that duration and credits are estimates, so the final charge
106
+ may differ. Short UGC keeps measured-duration rounding; long-form keeps its separate frozen face-time tariff.
107
+ SDK, CLI and MCP retain the advice in the native quote warnings. Billing calculations are unchanged.
108
+ - UGC workflow outcomes expose the measured final-file format, duration and
109
+ digest after verified delivery. Missing or damaged evidence stays explicit;
110
+ the native video result and settlement remain available.
111
+ - *Server-side:* generated scenes in `product-image-story` use up to two distinct original product photos as
112
+ references, including the opener image. The first anchors shape; extra originals keep their image placements.
113
+ Plan readiness and the quote disclose the selection and possible visual differences. Older paid checkpoints
114
+ reuse their existing scenes with a warning when product-photo conditioning cannot be verified. Revisions and
115
+ candidates retain that known limitation through later edits.
116
+ - The examples of `ugc-product-intro` and `ugc-faq-answer` named the actor `actor_male`, which does not exist, so a
117
+ plan built from either example was refused at the quote with `actor_unavailable`. They name `actor_marcus` now. Both
118
+ cards get a new `content_digest`; a plan pinned to the old one needs a new revision.
119
+
21
120
  ## [0.30.0] - 2026-10-17
22
121
 
23
122
  ### Added
package/README.md CHANGED
@@ -15,6 +15,95 @@ 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
+ ### n8n
91
+
92
+ n8n's built-in **MCP Client** node calls one tool per node:
93
+
94
+ - **Server Transport:** HTTP Streamable; **MCP Endpoint URL:** `https://mcp.clipwright.io/mcp`.
95
+ - **Authentication:** Bearer Auth, with a credential whose token is your `cw_...` key.
96
+ - **Tool:** pick from the list, for example `quote_ugc`; **Input Mode:** JSON.
97
+
98
+ Verified live on 2026-10-20 with self-hosted n8n 2.43.8: `get_account`,
99
+ `quote_ugc` and `get_run` returned through the node. A workflow to import,
100
+ `n8n/clipwright-ugc.json` in [seocombat/clipwright-mcp](https://github.com/seocombat/clipwright-mcp),
101
+ quotes a script, stops when the quote is above `max_credits`, starts `make_ugc`
102
+ and polls `get_run` every 15 seconds. Its `make_ugc` step and n8n's OAuth
103
+ credential have not been run against Clipwright yet.
104
+
105
+ ### Local server over stdio
106
+
18
107
  ```bash
19
108
  claude mcp add clipwright -e CLIPWRIGHT_API_KEY=cw_... -- npx -y -p @clipwright/mcp-server clipwright-mcp
20
109
  ```
@@ -23,10 +112,13 @@ Put your own key in place of `cw_...`. The command is one line and gives the
23
112
  shell nothing to expand, so bash, zsh and PowerShell run it alike. It needs
24
113
  Node.js 20 or newer.
25
114
 
26
- Any MCP host works — the server speaks JSON-RPC over stdio.
115
+ Any MCP host works — the local server speaks JSON-RPC over stdio. Issue keys at
116
+ [app.clipwright.io/api-keys](https://app.clipwright.io/api-keys).
27
117
 
28
118
  ## Environment
29
119
 
120
+ These variables configure the local server.
121
+
30
122
  | Variable | Required | Meaning |
31
123
  |---|---|---|
32
124
  | `CLIPWRIGHT_API_KEY` | yes | Your `cw_*` token. The process exits immediately without it. |
@@ -75,6 +167,13 @@ Any MCP host works — the server speaks JSON-RPC over stdio.
75
167
  nothing, even when its paid work was already done. An identical request
76
168
  returns the same run; `take` makes another candidate on purpose. Returns a
77
169
  `run_id` immediately; poll `get_run` until `succeeded`.
170
+ - `list_generation_models` — the models of single generations with their
171
+ measured shapes and credits per image or per second. Free.
172
+ - `quote_image`, `quote_video` — price of one image or one clip. Free.
173
+ - `generate_image`, `generate_video` — **make one image or one silent clip;
174
+ this costs money.** One that fails is charged nothing, even when the vendor
175
+ was already paid. An identical request returns the same run; `attempt` starts
176
+ another on purpose. Poll `get_run`; `generation.url` is the file.
78
177
  - `upload_image` — a local PNG/JPEG → signed https url to pass as `image`. Free;
79
178
  20 per day, the url lives 24 hours. Set `aspect_ratio` explicitly afterwards.
80
179
  - `quote_actor` — price of a personal actor before creating one. Free.
package/SKILL.md CHANGED
@@ -1,3 +1,17 @@
1
+ ---
2
+ name: clipwright
3
+ description: "Make short videos through Clipwright's MCP server: an AI actor speaking your script, or a faceless video of up to 90 seconds with narration over generated scenes. Quote first for free, then start a run and collect the MP4. Clipwright returns the file and does not publish anywhere."
4
+ metadata:
5
+ openclaw:
6
+ emoji: "🎬"
7
+ os: [darwin, linux, win32]
8
+ requires:
9
+ bins: [node, npx]
10
+ env: [CLIPWRIGHT_API_KEY, CLIPWRIGHT_CLIENT_ID]
11
+ author: Clipwright
12
+ homepage: https://clipwright.io/?ref=clawhub
13
+ ---
14
+
1
15
  # SKILL.md — installing and operating `clipwright-mcp`
2
16
 
3
17
  A self-contained guide for an AGENT (or a human in Claude Code) that needs no
@@ -20,6 +34,13 @@ an oversight: see `LICENSE` in the repository root.
20
34
 
21
35
  ## 1. Installation
22
36
 
37
+ There are two ways to connect, and both serve the same tools:
38
+
39
+ - **the hosted server** at `https://mcp.clipwright.io/mcp` (Streamable HTTP),
40
+ signed in with OAuth or with a `cw_*` key — section 1.4. Nothing to install;
41
+ - **this package run locally** over stdio with `CLIPWRIGHT_API_KEY` — sections
42
+ 1.1 to 1.3, and section 2.
43
+
23
44
  ### 1.1 From npm — the normal path
24
45
 
25
46
  ```bash
@@ -164,7 +185,8 @@ Environment variables:
164
185
  | `CLIPWRIGHT_CLIENT_ID` | YES (see section 2) | Unique identifier of this INSTALLATION. |
165
186
 
166
187
  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`,
188
+ returns 31 tools: `make_ugc`, `get_run`, `get_run_shots`, `quote_revision`, `revise_run`, `quote_candidate`, `create_candidate`,
189
+ `list_generation_models`, `quote_image`, `generate_image`, `quote_video`, `generate_video`, `quote_ugc`, `list_actors`,
168
190
  `list_voices`, `upload_image`, `get_account`, `create_actor`, `quote_actor`, `delete_actor`, `get_actor_defaults`,
169
191
  `set_actor_defaults`, `quote_faceless`, `make_faceless`, `list_workflows`, `get_workflow`, `prepare_workflow_plan`,
170
192
  `get_workflow_plan`, `approve_workflow_plan`, `quote_workflow_plan`, `run_workflow_plan`.
@@ -181,8 +203,100 @@ keeps the purchased revision and available outcome evidence. Technical evidence
181
203
  does not mean a person accepted the creative result. After an uncertain paid
182
204
  answer, preserve the original request and key; a new key can pay twice.
183
205
 
206
+ ### 1.4 The hosted server — OAuth or a `cw_*` key
207
+
208
+ The hosted server runs the same tools at `https://mcp.clipwright.io/mcp`. It
209
+ keeps no session: every message is its own `POST`. Add the URL to the client;
210
+ on first use the client opens a browser, the account holder signs in to
211
+ Clipwright and approves the app.
212
+
213
+ **Status: Claude Code and the device-code flow were verified live on
214
+ 2026-10-18;** the other commands come from each client's own documentation:
215
+
216
+ | Client | How to add | Verified |
217
+ |---|---|---|
218
+ | 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 |
219
+ | Claude.ai, Claude Desktop | Customize → Connectors → Add custom connector, paste the URL | not yet verified live |
220
+ | ChatGPT | the URL as the remote MCP server of a plugin (OpenAI's guide "Connect and test your plugin") | not yet verified live |
221
+ | Cursor | `~/.cursor/mcp.json`: `{"mcpServers": {"clipwright": {"url": "https://mcp.clipwright.io/mcp"}}}` | not yet verified live |
222
+ | VS Code | `.mcp.json` at the workspace root: `{"mcpServers": {"clipwright": {"type": "http", "url": "https://mcp.clipwright.io/mcp"}}}` | not yet verified live |
223
+ | Gemini CLI | `gemini mcp add --transport http clipwright https://mcp.clipwright.io/mcp`, then `/mcp auth clipwright` | not yet verified live |
224
+ | Codex | `codex mcp add clipwright --url https://mcp.clipwright.io/mcp`, then `codex mcp login clipwright` | not yet verified live |
225
+
226
+ **Permissions.** The approval page lists what the app asks for:
227
+
228
+ - `mcp:read` — the tools with `readOnlyHint: true`: account, runs, shots,
229
+ voices, actors, workflows and every quote. Free.
230
+ - `mcp:write` — every other tool: `make_ugc`, `make_faceless`, `revise_run`,
231
+ `create_candidate`, `generate_image`, `generate_video`, `create_actor` and
232
+ `run_workflow_plan` **spend credits**;
233
+ `upload_image`, `delete_actor`, `set_actor_defaults`, `prepare_workflow_plan`
234
+ and `approve_workflow_plan` change the account.
235
+
236
+ The account holder approves or declines the whole request; only an admitted
237
+ account can approve. A connection without `mcp:write` that calls one of those
238
+ tools gets HTTP `403` with `error: "insufficient_scope"` and
239
+ `WWW-Authenticate: Bearer error="insufficient_scope", scope="mcp:write", resource_metadata="…"`.
240
+ Nothing is charged and no run is created. Reconnect the app and approve
241
+ spending to fix it.
242
+
243
+ **Revoking.** The account holder revokes an app at
244
+ `https://app.clipwright.io/api-keys`, under **Connected apps**. Its next request
245
+ gets `401`. A connection lasts 90 days from approval and is not extended by
246
+ use: after that the app must sign in again. An access token lasts one hour;
247
+ clients renew it themselves.
248
+
249
+ **Files.** The hosted server cannot read files on the agent's machine, so
250
+ `upload_image` refuses a `path` there. Pass a public https URL of the PNG or
251
+ JPEG as `image` to `quote_ugc` and `make_ugc` instead (#709 tracks upload by
252
+ URL).
253
+
254
+ **Idempotency.** Section 2 does not apply here. Each connected app (one
255
+ grant) is its own client identity, and so is each `cw_*` key, so two
256
+ connections of one account never collapse into one run. A repeated request
257
+ within one connection returns the same run, as on stdio.
258
+
259
+ **An agent with no browser** signs in with a device code (verified live
260
+ 2026-10-18). Only the first-party client `clipwright-agent` may use this flow:
261
+
262
+ ```bash
263
+ curl -s https://mcp.clipwright.io/device/auth -d client_id=clipwright-agent \
264
+ --data-urlencode "scope=mcp:read mcp:write offline_access" \
265
+ --data-urlencode "resource=https://mcp.clipwright.io/mcp"
266
+ ```
267
+
268
+ 1. Show the person `user_code` and `verification_uri`
269
+ (`https://mcp.clipwright.io/device`). They open the page on any device,
270
+ enter the code, sign in and approve. The approval page repeats the code:
271
+ they approve only if it matches.
272
+ 2. Meanwhile poll `POST https://mcp.clipwright.io/token` with
273
+ `grant_type=urn:ietf:params:oauth:grant-type:device_code`, `device_code` and
274
+ `client_id=clipwright-agent`, no more often than every 5 seconds. Until
275
+ approval the answer is `authorization_pending`; a faster poll gets
276
+ `slow_down`.
277
+ 3. Send `access_token` as `Authorization: Bearer` to `/mcp`. Renew it with
278
+ `grant_type=refresh_token`, the refresh token and the same `client_id`. Each
279
+ renewal returns a new refresh token: keep the newest one.
280
+
281
+ **With a `cw_*` key instead of OAuth** — for CI and scripts. A key holds both
282
+ permissions:
283
+
284
+ ```bash
285
+ claude mcp add --transport http clipwright https://mcp.clipwright.io/mcp --header "Authorization: Bearer cw_..."
286
+ ```
287
+
288
+ **Errors of the endpoint itself:** no token, or a revoked or unknown key —
289
+ `401` with
290
+ `WWW-Authenticate: Bearer resource_metadata="https://mcp.clipwright.io/.well-known/oauth-protected-resource/mcp", scope="mcp:read mcp:write"`,
291
+ which a client follows to sign in; an expired or revoked OAuth token — the same
292
+ `401` with `error="invalid_token"` added; `GET /mcp` with a valid token — `405`;
293
+ a body over 1 MB — `413`.
294
+
184
295
  ## 2. `CLIPWRIGHT_CLIENT_ID` — required, and WHY
185
296
 
297
+ This section is about the local server. The hosted server takes the client
298
+ identity from the connection itself (section 1.4).
299
+
186
300
  **Rule: EVERY installation must get its OWN unique `CLIPWRIGHT_CLIENT_ID` BEFORE
187
301
  the first `make_ugc` call.** Do not copy the value from another machine, and do
188
302
  not leave it empty hoping the default will "work out somehow".
@@ -611,6 +725,26 @@ original, running at once and failed or unfinished, are counted apart from its
611
725
  revisions, and support raises only the revision limit. An operation the shot
612
726
  does not offer is `edit_invalid` with the code `action_not_allowed`.
613
727
 
728
+ ### `quote_image`, `quote_video` — free; `generate_image`, `generate_video` — paid
729
+
730
+ One image or one silent clip from a prompt, each a run of its own.
731
+ `list_generation_models` lists the models, modes, aspect ratios, resolutions,
732
+ durations and `unit_credits`: credits per image, or per second of a clip. Any
733
+ other combination is `unsupported_combination` before any charge. The quotes
734
+ answer the credits, the width and height, and warnings; show the price first.
735
+
736
+ A reference is `{ "upload_id": ..., "rights_confirmed": true }` for a picture
737
+ from `upload_image`, or `{ "run_id": ... }` of a succeeded `generate_image` run
738
+ of this account until its `reusable_until`. In `first_frame` mode the frame must
739
+ match the requested aspect ratio within 2% (`source_aspect_mismatch`).
740
+
741
+ The run tools return the run at once; poll it with `get_run`, and once it
742
+ succeeded `generation.url` is the file. A delivered generation is charged its
743
+ quoted credits; one that fails is charged nothing, even when the vendor was
744
+ already paid. An identical request returns the same run; pass `attempt: 2` for
745
+ another. While generations are closed the tools answer `generations_disabled`
746
+ or `generations_marking_pending` and charge nothing.
747
+
614
748
  ### `list_actors` — free, no input
615
749
 
616
750
  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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,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"}
@@ -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,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ipwright/sdk";
3
+ export interface 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,e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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,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,8 +1,13 @@
1
1
  {
2
2
  "name": "@clipwright/mcp-server",
3
- "version": "0.30.0",
3
+ "version": "0.32.0",
4
4
  "description": "MCP server for Clipwright: generate UGC videos from your coding agent",
5
5
  "mcpName": "io.clipwright/mcp",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/seocombat/clipwright-mcp.git",
9
+ "directory": "packages/mcp-server"
10
+ },
6
11
  "keywords": [
7
12
  "mcp",
8
13
  "mcp-server",
@@ -31,11 +36,25 @@
31
36
  "bin": {
32
37
  "clipwright-mcp": "dist/index.js"
33
38
  },
39
+ "exports": {
40
+ ".": {
41
+ "types": "./dist/index.d.ts",
42
+ "default": "./dist/index.js"
43
+ },
44
+ "./server": {
45
+ "types": "./dist/server.d.ts",
46
+ "default": "./dist/server.js"
47
+ },
48
+ "./remote": {
49
+ "types": "./dist/remote.d.ts",
50
+ "default": "./dist/remote.js"
51
+ }
52
+ },
34
53
  "dependencies": {
35
54
  "@modelcontextprotocol/sdk": "^1.31.0",
36
55
  "zod": "^4.4.3",
37
- "@clipwright/core": "0.30.0",
38
- "@clipwright/sdk": "0.30.0"
56
+ "@clipwright/core": "0.32.0",
57
+ "@clipwright/sdk": "0.32.0"
39
58
  },
40
59
  "devDependencies": {
41
60
  "@types/node": "^26.1.1"