katto-mcp 0.3.2 → 0.5.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.
Files changed (2) hide show
  1. package/index.mjs +77 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -149,6 +149,69 @@ const TOOLS = [
149
149
  "duration buckets).",
150
150
  inputSchema: { type: "object", properties: {} },
151
151
  },
152
+ {
153
+ name: "katto_rerender_clip",
154
+ description:
155
+ "Re-render one finished clip with a new reframe layout and/or caption style. Does NOT use video quota. " +
156
+ "Returns a rerender_id; poll katto_get_rerender for the new clip url.",
157
+ inputSchema: {
158
+ type: "object",
159
+ properties: {
160
+ id: { type: "string", description: "Job id from katto_create_clip_job." },
161
+ clip_index: { type: "number", description: "0-based index of the clip to re-render." },
162
+ layout_mode: {
163
+ type: "string",
164
+ enum: ["face_tracking", "wide", "split_screen", "stacked", "passthrough", "grid_3", "grid_4"],
165
+ },
166
+ caption_style: { type: "string", description: "A caption style preset name." },
167
+ },
168
+ required: ["id", "clip_index"],
169
+ },
170
+ },
171
+ {
172
+ name: "katto_dub_clip",
173
+ description:
174
+ "Re-render one finished clip dubbed into one or more languages (en, es, fr, it, pt, hi, ja, zh). Does " +
175
+ "NOT use video quota. Returns a rerender_id; poll katto_get_rerender for the result.",
176
+ inputSchema: {
177
+ type: "object",
178
+ properties: {
179
+ id: { type: "string", description: "Job id." },
180
+ clip_index: { type: "number", description: "0-based clip index." },
181
+ languages: {
182
+ type: "array",
183
+ items: { type: "string", enum: ["en", "es", "fr", "it", "pt", "hi", "ja", "zh"] },
184
+ },
185
+ },
186
+ required: ["id", "clip_index", "languages"],
187
+ },
188
+ },
189
+ {
190
+ name: "katto_get_rerender",
191
+ description:
192
+ "Poll a re-render started by katto_rerender_clip or katto_dub_clip. Returns { status, clip_url, captions_url }.",
193
+ inputSchema: {
194
+ type: "object",
195
+ properties: {
196
+ id: { type: "string", description: "Job id." },
197
+ rerender_id: { type: "string", description: "The rerender_id returned by rerender/dub." },
198
+ },
199
+ required: ["id", "rerender_id"],
200
+ },
201
+ },
202
+ {
203
+ name: "katto_get_brand_kit",
204
+ description:
205
+ "Get your saved brand kits (colors, caption font and position, default layout, watermark url).",
206
+ inputSchema: { type: "object", properties: {} },
207
+ },
208
+ {
209
+ name: "katto_get_webhook_secret",
210
+ description:
211
+ "Get your webhook signing secret and how to verify Katto's signed completion callbacks " +
212
+ "(HMAC-SHA256 of {timestamp}.{body}). Pass webhook_url on a job to receive them.",
213
+ inputSchema: { type: "object", properties: {} },
214
+ },
152
215
  ];
153
216
 
154
217
  // Static reference data — returned by the list_* tools without an API call.
@@ -167,7 +230,7 @@ const CLIP_LENGTHS = [
167
230
  { value: '90_180', label: '90 to 180 seconds' },
168
231
  ];
169
232
 
170
- const server = new Server({ name: "katto", version: "0.3.2" }, { capabilities: { tools: {} } });
233
+ const server = new Server({ name: "katto", version: "0.5.0" }, { capabilities: { tools: {} } });
171
234
 
172
235
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
173
236
 
@@ -204,6 +267,19 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
204
267
  data = { sources: SOURCES, note: "You can also clip a local file via the REST API (POST /v1/uploads)." };
205
268
  } else if (name === "katto_list_clip_lengths") {
206
269
  data = { clip_lengths: CLIP_LENGTHS };
270
+ } else if (name === "katto_rerender_clip") {
271
+ const b = {};
272
+ if (args.layout_mode) b.layout_mode = args.layout_mode;
273
+ if (args.caption_style) b.caption_style = args.caption_style;
274
+ data = await api(`/api/v1/jobs/${encodeURIComponent(args.id)}/clips/${encodeURIComponent(args.clip_index)}/rerender`, { method: "POST", body: JSON.stringify(b) });
275
+ } else if (name === "katto_dub_clip") {
276
+ data = await api(`/api/v1/jobs/${encodeURIComponent(args.id)}/clips/${encodeURIComponent(args.clip_index)}/rerender`, { method: "POST", body: JSON.stringify({ dub: args.languages || [] }) });
277
+ } else if (name === "katto_get_rerender") {
278
+ data = await api(`/api/v1/jobs/${encodeURIComponent(args.id)}/rerenders/${encodeURIComponent(args.rerender_id)}`);
279
+ } else if (name === "katto_get_brand_kit") {
280
+ data = await api("/api/v1/brand-kit");
281
+ } else if (name === "katto_get_webhook_secret") {
282
+ data = await api("/api/v1/webhook");
207
283
  } else {
208
284
  throw new Error(`Unknown tool: ${name}`);
209
285
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "katto-mcp",
3
- "version": "0.3.2",
3
+ "version": "0.5.0",
4
4
  "mcpName": "io.github.miracleweasel/katto-mcp",
5
5
  "description": "MCP server for Katto — turn long videos into scored, captioned 9:16 clips from any MCP client (Claude, Cursor, ...).",
6
6
  "type": "module",