@clipwright/mcp-server 0.18.0 → 0.20.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
@@ -16,6 +16,50 @@ 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
+ ## [0.20.0] - 2026-09-25
20
+
21
+ The MCP server is ready for directories: it has a name in the official MCP
22
+ Registry, and every tool tells the host whether it only reads or writes.
23
+
24
+ ### Added
25
+
26
+ - Every MCP tool now carries a `title` and the `readOnlyHint`/`destructiveHint`
27
+ annotations: quotes, lists and reads are read-only, `delete_actor` is
28
+ destructive, and `make_ugc`, `create_actor`, `upload_image` and
29
+ `set_actor_defaults` write.
30
+ - `@clipwright/mcp-server` declares `mcpName: io.clipwright/mcp` for the official
31
+ MCP Registry.
32
+
33
+ ## [0.19.0] - 2026-09-22
34
+
35
+ A paid video that arrived after we stopped waiting can now be collected: the run
36
+ goes back to `queued` and drives the pipeline again. The server side was live
37
+ from the day it was deployed; this release carries the contract change to the
38
+ MCP tool description, which is where an agent reads the promise.
39
+
40
+ ### Changed
41
+
42
+ - **Breaking:** `failed` is no longer always final. A run whose paid vendor job
43
+ we still hold can be reopened: it goes back to `queued` and may reach
44
+ `succeeded`. Every reopening is named in `warnings[]`, and one run is reopened
45
+ at most three times. An agent that stops polling the moment it reads `failed`
46
+ will miss a video that was paid for and delivered.
47
+ - *Server-side* A run that lost the video while the vendor was still working on
48
+ it no longer says its paid job "was retained for recovery" when this run's
49
+ terms cannot support recovery. Reading the terms fails soft: when they cannot
50
+ be read at all, the run promises nothing either way.
51
+ - *Server-side* A recovered delivery is written to the ledger under its own
52
+ reason, `run_recovered_delivery`, because the vendor spend was already counted
53
+ on the day the run first failed.
54
+
55
+ ### Operations
56
+
57
+ - Migration 0036 adds `recovery_attempt` and `recovery_reopened_at` to `runs`,
58
+ and both are read on the main render path. **Apply the migration before
59
+ deploying any service**: an early deploy fails every `make_ugc` run, not one
60
+ feature. Order forward is migration, api, worker, web; backwards it is worker
61
+ and api first, then drop the columns.
62
+
19
63
  ## [0.18.0] - 2026-09-21
20
64
 
21
65
  Long-form clips can now show a face for a fifth of their length instead of nearly
package/README.md CHANGED
@@ -1,8 +1,15 @@
1
1
  # @clipwright/mcp-server
2
2
 
3
- MCP server for [Clipwright](https://clipwright.io): generate UGC videos from
4
- your coding agent. A talking-head clip is rendered from a script you pass in;
5
- the agent gets a `run_id` and polls until a video URL is ready.
3
+ Your coding agent writes the script; [Clipwright](https://clipwright.io) renders
4
+ a short vertical video of an actor speaking it, 1080×1920 by default. The agent
5
+ asks for a free quote before it spends anything, and whatever the API cannot
6
+ honor comes back in `warnings[]` instead of being dropped silently.
7
+
8
+ The agent gets a `run_id` at once and polls until the video URL is ready.
9
+ Clipwright returns the file; it does not publish anywhere. Quotes, voices,
10
+ actors and the account balance are free. Renders spend credits: an account opened
11
+ by signing up starts with none, so buy a pack at [clipwright.io/pricing](https://clipwright.io/pricing)
12
+ before the first one.
6
13
 
7
14
  ## Install
8
15
 
@@ -28,7 +35,7 @@ Any MCP host works — the server speaks JSON-RPC over stdio.
28
35
 
29
36
  - `list_voices` — voices for `voice`: the presets and the catalog, with
30
37
  filters by language, gender, age, use case and model, and a short audio
31
- sample per voice. Free, spends no credits.
38
+ sample where the voice has one. Free, spends no credits.
32
39
  - `list_actors` — ready-made faces with stable ids and verified formats. Free.
33
40
  - `quote_ugc` — estimated duration and price, plus a warning when `make_ugc`
34
41
  with the same input would be refused for money or access. Free.
@@ -45,6 +52,8 @@ Any MCP host works — the server speaks JSON-RPC over stdio.
45
52
  to `make_ugc` as `actor_id`.
46
53
  - `delete_actor` — removes a personal actor of this account. Videos already made
47
54
  with it stay as they are. Free.
55
+ - `get_actor_defaults`, `set_actor_defaults` — read and save an actor's B-roll
56
+ default. It is stored only: today's talking-actor videos do not use it. Free.
48
57
 
49
58
  Call `quote_ugc` before `make_ugc`: the quote is where the contract tells you
50
59
  what it will and will not honor. Anything the API cannot deliver comes back in
@@ -56,3 +65,10 @@ a failed run on purpose, not a free refresh.
56
65
 
57
66
  `SKILL.md` ships inside the package with the full operating instructions, and
58
67
  `CHANGELOG.md` next to it says what changed in each release and what was removed.
68
+
69
+ ## Privacy
70
+
71
+ The server sends your script, chosen options and any uploaded image to the
72
+ Clipwright API to quote and render the video. How that data is handled:
73
+ [clipwright.io/privacy](https://clipwright.io/privacy). Documentation:
74
+ [clipwright.io/docs](https://clipwright.io/docs).
package/dist/format.js CHANGED
@@ -1,24 +1,7 @@
1
1
  import { FAILED_STATE, isTerminal, runMoney, VIDEO_URL_CHECK } from "@clipwright/core";
2
2
  import { ClipwrightApiError } from "@clipwright/sdk";
3
- /**
4
- * ОТКАЗ API, РАЗВЁРНУТЫЙ ДЛЯ АГЕНТА (US-622).
5
- *
6
- * ЗАЧЕМ ОБЁРТКА, ЕСЛИ ИСКЛЮЧЕНИЕ И ТАК ДОЕЗЖАЕТ. Доезжает — одной строкой:
7
- * MCP SDK превращает брошенную ошибку в `isError` с текстом сообщения. Для
8
- * «поле не то» этого хватало, для денег — нет. 402 значит «остановись и скажи
9
- * человеку числа», 429 значит «подожди столько-то и повтори ТОТ ЖЕ вызов», и
10
- * различить их в свободном тексте агент может только угадыванием. Здесь он
11
- * получает `retryable`, `next_action` и сами числа полями.
12
- *
13
- * ПОЧЕМУ ТОЛЬКО `ClipwrightApiError`, А НЕ ЛЮБАЯ ОШИБКА. Остальные — местные:
14
- * нерезолвящийся `CLIPWRIGHT_CLIENT_ID`, сеть, битый baseUrl. У них нет ни
15
- * статуса, ни кода отказа, и завернуть их в ту же форму значило бы приписать им
16
- * ответ сервера, которого не было. Они летят дальше как есть, и MCP SDK отдаёт
17
- * их текст — там он и уместен.
18
- *
19
- * `isError: true` остаётся: отказ есть отказ. Меняется не факт, а то, СКОЛЬКО
20
- * агент о нём узнаёт.
21
- */
3
+ /** An API refusal expanded for the agent: `retryable`, `next_action` and numbers */
4
+ /** as fields. Local errors rethrow, since they carry no server answer. */
22
5
  export function formatFailure(error) {
23
6
  if (!(error instanceof ClipwrightApiError))
24
7
  throw error;
@@ -27,14 +10,8 @@ export function formatFailure(error) {
27
10
  isError: true,
28
11
  };
29
12
  }
30
- /**
31
- * Тело тула, у которого отказ API развёрнут для агента.
32
- *
33
- * Обёртка одна на все четыре тула намеренно: забытый `try` в одном из них дал
34
- * бы агенту плоский текст ровно там, где отказ денежный, — и обнаружилось бы
35
- * это у клиента. Через общую обёртку забыть нельзя: она либо стоит, либо тул не
36
- * собирается.
37
- */
13
+ /** Tool body with API refusals expanded for the agent; shared by every tool so */
14
+ /** no tool can forget the `try`. */
38
15
  export async function withFailureReport(body) {
39
16
  try {
40
17
  return await body();
@@ -43,26 +20,12 @@ export async function withFailureReport(body) {
43
20
  return formatFailure(error);
44
21
  }
45
22
  }
46
- /**
47
- * Чистое форматирование ответа `get_run` (вынесено из хендлера, чтобы
48
- * тестировать терминальную форму без подъёма stdio-транспорта и env).
49
- *
50
- * ОБЕ терминальные ветки несут И `status` (SUCCEEDED/FAILED — императив для
51
- * агента), И `state` (фактический `run.state` — исправление US-501, контракт
52
- * поллинга: терминал теперь виден в самом `state`, не только в `status`).
53
- *
54
- * Осознанная деградация (минор Critic №3, зафиксировать в docs/15): неизвестный
55
- * ТЕРМИНАЛЬНЫЙ статус сервера (напр. `"canceled"`) НЕ входит в `TERMINAL_STATES`
56
- * → `isTerminal=false` → проваливается в IN_PROGRESS-ветку (агенту скажут
57
- * «продолжай поллить» про завершённый ран). В прототипе это принято осознанно:
58
- * MCP и API деплоятся одной версией, а против текущего краша это строгое
59
- * улучшение.
60
- */
23
+ /** Pure `get_run` formatter. Terminal answers carry both `status` and `state`; */
24
+ /** an unknown terminal state falls into IN_PROGRESS by design. */
61
25
  export function formatGetRun(run) {
62
26
  if (isTerminal(run.state)) {
63
- // Терминально: различение исхода — именованной константой core (не
64
- // позиционным индексом: переупорядочивание массива молча инвертировало бы
65
- // успех/провал).
27
+ // Outcome by core's named constant, not an array index that reordering
28
+ // could silently invert.
66
29
  if (run.state === FAILED_STATE) {
67
30
  return {
68
31
  content: [
@@ -73,8 +36,7 @@ export function formatGetRun(run) {
73
36
  run_id: run.run_id,
74
37
  state: run.state,
75
38
  ...runMoney(run),
76
- // Правило проекта №3: расхождения никогда не молчат — warnings
77
- // пробрасываются в КАЖДУЮ ветку get_run (US-512).
39
+ // Warnings are never silent: every get_run branch carries them.
78
40
  warnings: run.warnings,
79
41
  error: run.error,
80
42
  }),
@@ -102,8 +64,7 @@ export function formatGetRun(run) {
102
64
  ],
103
65
  };
104
66
  }
105
- // Нетерминальное (и неизвестное терминальное — см. деградация выше) состояние:
106
- // тот же императивный формат, что и у make_ugc.
67
+ // Non-terminal (or unknown terminal) state: the same imperative format as make_ugc.
107
68
  return {
108
69
  content: [
109
70
  {
@@ -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,EAAgB,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAYrD;;;;;;;;;;;;;;;;;;GAkBG;AACH,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;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAoC;IAEpC,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,EAAE,CAAC;IACt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Ae,EAAE,eAAe;wBAChC,gBAAgB,EAAE,GAAG,CAAC,YAAY,EAAE,gBAAgB,IAAI,IAAI;wBAC5D,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,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
@@ -2,70 +2,60 @@ import { readFile } from "node:fs/promises";
2
2
  import { createRequire } from "node:module";
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import { z } from "zod";
5
- // Схемы приходят из barrel `@clipwright/core` (единый источник правды, правило №2),
6
- // а НЕ из `/idempotency` — там живёт только ключ идемпотентности, не shape.
7
- // `offeredUgcInputShape`, а НЕ полный `makeUgcInputShape`: поля с диспозицией
8
- // `rejected` не должны предлагаться вызывателю, которого мы за их использование
9
- // накажем четырёхсотым (блокер B4). Множество выводится из реестра диспозиций,
10
- // поэтому смена решения по полю переносит его между поверхностями одной строкой.
5
+ // `offeredUgcInputShape`, not the full shape: fields the server rejects must not
6
+ // be offered to a caller who would get a 400 for using them.
11
7
  import { offeredUgcInputShape, actorDefaultsInput, BROLL_POLICY_DESCRIPTION, CATALOG_LANGUAGES, CREATE_ACTOR_DESCRIPTION, createActorInputShape, SCRIPT_LENGTH_DESCRIPTION, voicesQueryShape, agentRetryShape, runId, MAKE_UGC_DESCRIPTION, MAKE_UGC_AGENT_PROTOCOL, UPLOAD_IMAGE_DESCRIPTION, UPLOAD_MAX_BYTES, sniffUploadMediaType, } from "@clipwright/core";
12
8
  import { formatGetRun, withFailureReport } from "./format.js";
13
- // Версия — из манифеста: литерал расходился с ним молча, а импорт JSON не проходит `rootDir`.
9
+ // Version from the manifest: a literal drifts, and a JSON import breaks `rootDir`.
14
10
  const packageVersion = () => createRequire(import.meta.url)("../package.json").version;
15
- /**
16
- * Строит MCP-сервер с зарегистрированными тулами, БЕЗ подключения транспорта.
17
- *
18
- * Вынесено из index.ts (US-516): index.ts раньше и строил сервер, И сразу
19
- * коннектил его к stdio на верхнем уровне модуля — это делало регистрацию
20
- * тулов непроверяемой без реального stdio-процесса. Разделение — тот же
21
- * паттерн, что app.ts/index.ts в apps/api (app — тестируемый, index —
22
- * тонкий bootstrap).
23
- */
11
+ /** Builds the MCP server with its tools registered but NO transport connected, */
12
+ /** so tool registration is testable without a stdio process. */
24
13
  export function createServer(client) {
25
14
  const server = new McpServer({ name: "clipwright", version: packageVersion() });
26
- // Полная схема публикуется в tools/list (у конкурента она пустая — антипаттерн).
15
+ // tools/list publishes the full schema; an empty schema leaves agents guessing.
27
16
  server.registerTool("make_ugc", {
17
+ title: "Make a talking-actor video",
18
+ annotations: { readOnlyHint: false, destructiveHint: false },
28
19
  description: `${MAKE_UGC_DESCRIPTION} ${MAKE_UGC_AGENT_PROTOCOL}`,
29
- // [Правило №2] Плоская схема = предлагаемый вход рендера + агентный ретрай,
30
- // собранная из shape core. Проза описания держится в согласии со схемой
31
- // намеренно: LLM-вызыватель читает описание РАНЬШЕ схемы, поэтому обещание
32
- // в тексте («1080p 9:16», «character») было бы тем же дефектом
33
- // «предлагаем и наказываем», просто слоем выше.
20
+ // Flat schema: offered render input plus agent retry. The description must agree
21
+ // with it, since an LLM reads the description before the schema.
34
22
  inputSchema: { ...offeredUgcInputShape, ...agentRetryShape },
35
23
  }, async (args) => withFailureReport(async () => {
36
- // [ARB-1] РАСЩЕПЛЯЕМ плоский вход: `attempt` живёт в opts SDK. Если передать
37
- // его внутрь `input`, `makeUgcInput.parse` в `idempotencyKeyFor` молча срежет
38
- // лишний ключ → суффикс всегда `:1` → повтор вернёт тот же run → M1 мёртв.
24
+ // `attempt` goes in SDK opts: inside `input` the schema would strip it,
25
+ // and a retry would return the same run.
39
26
  const { attempt, ...input } = args;
40
- // [A5] Возврат СРАЗУ после старта (state≈"queued"), без bounded-wait и без цикла.
27
+ // Return right after start (state≈"queued"), without waiting.
41
28
  const run = await client.startUgc(input, { attempt });
42
- // ТЕМ ЖЕ ФОРМАТТЕРОМ, ЧТО И `get_run`: своя копия формы IN_PROGRESS теряла
43
- // `run.warnings`, и агент узнавал о снапе уже после платного старта.
29
+ // Same formatter as `get_run`, so warnings reach the agent at once.
44
30
  return formatGetRun(run);
45
31
  }));
46
32
  server.registerTool("get_run", {
33
+ title: "Get run status",
34
+ annotations: { readOnlyHint: true, destructiveHint: false },
47
35
  description: "Check the status of a video generation started by make_ugc. Pass the run_id. While the run " +
48
36
  "is still working it returns status IN_PROGRESS with a next_action telling you to poll again; " +
49
37
  "repeat every ~5 seconds until it reaches a terminal state — SUCCEEDED (with video_url) or FAILED.",
50
38
  inputSchema: { run_id: runId },
51
39
  }, async ({ run_id }) => withFailureReport(async () => {
52
- // Терминальная форма + деградация вынесены в чистый `formatGetRun` (тест
53
- // без stdio-транспорта). Терминал несёт И `status`, И `state` (US-501).
40
+ // Terminal shape lives in the pure `formatGetRun`: both `status` and `state`.
54
41
  const run = await client.getRun(run_id);
55
42
  return formatGetRun(run);
56
43
  }));
57
44
  server.registerTool("quote_ugc", {
45
+ title: "Quote a video",
46
+ annotations: { readOnlyHint: true, destructiveHint: false },
58
47
  description: "Estimate the credit cost of a make_ugc call WITHOUT spending credits. " +
59
48
  "Always call this first and show the user the price before make_ugc.",
60
- // [Правило №2] Тот же shape core, что и у make_ugc: `script` — единственное
61
- // обязательное поле (остальные .optional()/.default()), поэтому переиспользуем
62
- // shape целиком вместо рукописного {script} — цена учитывает captions/look и не расходится со схемой.
49
+ // Same core shape as make_ugc, so the quote prices exactly what make_ugc
50
+ // would render.
63
51
  inputSchema: offeredUgcInputShape,
64
52
  }, async (args) => withFailureReport(async () => {
65
53
  const quote = await client.quoteUgc(args);
66
54
  return { content: [{ type: "text", text: JSON.stringify(quote) }] };
67
55
  }));
68
56
  server.registerTool("upload_image", {
57
+ title: "Upload an image",
58
+ annotations: { readOnlyHint: false, destructiveHint: false },
69
59
  description: UPLOAD_IMAGE_DESCRIPTION,
70
60
  inputSchema: {
71
61
  path: z.string().min(1).describe("Absolute or cwd-relative path to a PNG or JPEG file"),
@@ -95,6 +85,8 @@ export function createServer(client) {
95
85
  };
96
86
  }));
97
87
  server.registerTool("list_voices", {
88
+ title: "List voices",
89
+ annotations: { readOnlyHint: true, destructiveHint: false },
98
90
  description: "List the voices for make_ugc's `voice` field: the presets first, then catalog voices in " +
99
91
  `${CATALOG_LANGUAGES.length} languages. Filter by \`language\` (the voice's native language; any voice ` +
100
92
  "speaks any supported language), `gender`, `age`, `use_case` and `model`; an unknown filter value is " +
@@ -109,38 +101,51 @@ export function createServer(client) {
109
101
  "never store it. A voice without `preview_url` has no sample yet. Free. " + SCRIPT_LENGTH_DESCRIPTION,
110
102
  inputSchema: voicesQueryShape,
111
103
  }, async (filters) => withFailureReport(async () => {
112
- // Тула ретранслирует /v1/voices: без сети к вендору и без его ключа на этой поверхности.
104
+ // Relays /v1/voices: no vendor call and no vendor key on this surface.
113
105
  const voices = await client.listVoices(filters);
114
106
  return { content: [{ type: "text", text: JSON.stringify({ voices }) }] };
115
107
  }));
116
108
  server.registerTool("list_actors", {
109
+ title: "List actors",
110
+ annotations: { readOnlyHint: true, destructiveHint: false },
117
111
  description: "List saved Clipwright actors with stable IDs, gender, age and verified image formats. Choose actor_id for quote_ugc and make_ugc. Preview URLs expire; actor IDs remain reusable. Do not combine actor_id with image, person or actor_gender. Without voice, the actor speaks the default voice of their gender.",
118
112
  inputSchema: {},
119
113
  }, async () => withFailureReport(async () => ({
120
114
  content: [{ type: "text", text: JSON.stringify({ actors: await client.listActors() }) }],
121
115
  })));
122
116
  server.registerTool("get_actor_defaults", {
117
+ title: "Get actor B-roll default",
118
+ annotations: { readOnlyHint: true, destructiveHint: false },
123
119
  description: `Read this account actor's saved B-roll default. ${BROLL_POLICY_DESCRIPTION}`,
124
120
  inputSchema: { actor_id: z.string().min(1) },
125
121
  }, async ({ actor_id }) => withFailureReport(async () => ({
126
122
  content: [{ type: "text", text: JSON.stringify(await client.getActorDefaults(actor_id)) }],
127
123
  })));
128
124
  server.registerTool("set_actor_defaults", {
125
+ title: "Set actor B-roll default",
126
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
129
127
  description: `Save this account actor's B-roll default without spending credits. ${BROLL_POLICY_DESCRIPTION}`,
130
128
  inputSchema: { actor_id: z.string().min(1), ...actorDefaultsInput.shape },
131
129
  }, async ({ actor_id, ...input }) => withFailureReport(async () => ({
132
130
  content: [{ type: "text", text: JSON.stringify(await client.setActorDefaults(actor_id, input)) }],
133
131
  })));
134
- // Личный актёр аккаунта (clipwright#120). Схема — та же, что проверяет сервер,
135
- // поэтому предлагаемое и принимаемое разойтись не могут.
136
- server.registerTool("create_actor", { description: CREATE_ACTOR_DESCRIPTION, inputSchema: { ...createActorInputShape, ...agentRetryShape } }, async (args) => withFailureReport(async () => {
137
- // `attempt` живёт в opts SDK: внутри `input` схема срезала бы его молча,
138
- // и повтор агента возвращал бы первый ран вместо нового.
132
+ // Personal actor: the same schema the server checks, so offered and accepted
133
+ // input cannot drift.
134
+ server.registerTool("create_actor", {
135
+ title: "Create a personal actor",
136
+ annotations: { readOnlyHint: false, destructiveHint: false },
137
+ description: CREATE_ACTOR_DESCRIPTION,
138
+ inputSchema: { ...createActorInputShape, ...agentRetryShape },
139
+ }, async (args) => withFailureReport(async () => {
140
+ // `attempt` goes in SDK opts: inside `input` the schema would strip it,
141
+ // and a retry would return the first run.
139
142
  const { attempt, ...input } = args;
140
143
  const run = await client.createActor(input, { attempt });
141
144
  return formatGetRun(run);
142
145
  }));
143
146
  server.registerTool("quote_actor", {
147
+ title: "Quote a personal actor",
148
+ annotations: { readOnlyHint: true, destructiveHint: false },
144
149
  description: "Estimate the credit cost of create_actor WITHOUT spending credits. Call this first and show the " +
145
150
  "price before create_actor: each requested format is a separate charged image.",
146
151
  inputSchema: createActorInputShape,
@@ -148,6 +153,8 @@ export function createServer(client) {
148
153
  content: [{ type: "text", text: JSON.stringify(await client.quoteActor(args)) }],
149
154
  })));
150
155
  server.registerTool("delete_actor", {
156
+ title: "Delete a personal actor",
157
+ annotations: { readOnlyHint: false, destructiveHint: true },
151
158
  description: "Delete a personal actor of this account by actor_id. Videos already made with it stay as they are, " +
152
159
  "and new runs can no longer use it. An actor used by a run that has not finished is refused until that " +
153
160
  "run ends. Catalog actors belong to Clipwright and are not deletable.",
@@ -156,8 +163,10 @@ export function createServer(client) {
156
163
  await client.deleteActor(actor_id);
157
164
  return { content: [{ type: "text", text: JSON.stringify({ deleted: actor_id }) }] };
158
165
  }));
159
- // Остаток счёта без траты попытки: иначе его узнают только отказом 402 (clipwright#135).
166
+ // Balance without spending an attempt; otherwise only a 402 would reveal it.
160
167
  server.registerTool("get_account", {
168
+ title: "Get account credits",
169
+ annotations: { readOnlyHint: true, destructiveHint: false },
161
170
  description: "Read this account's credits. Free, spends nothing. debt_credits above zero means make_ugc " +
162
171
  "is refused with debt_outstanding whatever the balance, until the account buys credits; " +
163
172
  "with no debt, balance_credits is what a new run can spend. holds_credits are reserved for " +
@@ -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,oFAAoF;AACpF,4EAA4E;AAC5E,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,iFAAiF;AACjF,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9D,8FAA8F;AAC9F,MAAM,cAAc,GAAG,GAAW,EAAE,CACjC,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAyB,CAAC,OAAO,CAAC;AAErF;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,MAAwB;IACnD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;IAEhF,iFAAiF;IACjF,MAAM,CAAC,YAAY,CACjB,UAAU,EACV;QACE,WAAW,EAAE,GAAG,oBAAoB,IAAI,uBAAuB,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;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"}
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@clipwright/mcp-server",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "description": "MCP server for Clipwright: generate UGC videos from your coding agent",
5
+ "mcpName": "io.clipwright/mcp",
5
6
  "keywords": [
6
7
  "mcp",
8
+ "mcp-server",
7
9
  "modelcontextprotocol",
8
10
  "ugc",
9
- "video"
11
+ "video",
12
+ "video-generation",
13
+ "ai-avatar",
14
+ "talking-head"
10
15
  ],
11
16
  "license": "MIT",
12
17
  "author": "Dimantika Sp. z o.o.",
@@ -29,8 +34,8 @@
29
34
  "dependencies": {
30
35
  "@modelcontextprotocol/sdk": "^1.29.0",
31
36
  "zod": "^4.4.3",
32
- "@clipwright/core": "0.18.0",
33
- "@clipwright/sdk": "0.18.0"
37
+ "@clipwright/core": "0.20.0",
38
+ "@clipwright/sdk": "0.20.0"
34
39
  },
35
40
  "devDependencies": {
36
41
  "@types/node": "^26.1.1"