clipbait 1.9.3 → 1.9.4
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/index.js +7 -4
- package/package.json +1 -1
- package/server.json +35 -0
package/index.js
CHANGED
|
@@ -244,12 +244,15 @@ async function runMcpServer() {
|
|
|
244
244
|
const ok = (t) => ({ content: [{ type: "text", text: t }] });
|
|
245
245
|
const fail = (e) => ({ content: [{ type: "text", text: "Error: " + (e.message || String(e)) }], isError: true });
|
|
246
246
|
|
|
247
|
-
server.tool("generate_clips", "Generate short vertical viral clips from a long video (YouTube, Twitch VOD, Rumble, Ganjing). Returns a job id; poll get_job.",
|
|
248
|
-
{ videoUrl: z.string(), aspectRatio: z.enum(["9:16", "16:9"]).optional(), maxClips: z.number().int().min(1).max(20).optional() },
|
|
249
|
-
async (a) => { try { const d = await api("POST", "/clips/generate", { videoUrl: a.videoUrl, aspectRatio: a.aspectRatio || "9:16", maxClips: a.maxClips || 9 }); return ok(`Clip job started: ${d.jobId}${d.duplicate ? " (duplicate of a recent job, no extra credits)" : ""}.
|
|
247
|
+
server.tool("generate_clips", "Generate short vertical viral clips from a long video (YouTube, Twitch VOD, Rumble, Ganjing). Returns a job id; poll get_job. If the user has more than one brand/profile (call list_brands), ask which one to use before generating — the brand controls AI face detection, watermark, and the creator name on clips.",
|
|
248
|
+
{ videoUrl: z.string(), aspectRatio: z.enum(["9:16", "16:9"]).optional(), maxClips: z.number().int().min(1).max(20).optional(), brandId: z.string().optional().describe("Which brand/profile to clip as (from list_brands). Defaults to the active brand.") },
|
|
249
|
+
async (a) => { try { const d = await api("POST", "/clips/generate", { videoUrl: a.videoUrl, aspectRatio: a.aspectRatio || "9:16", maxClips: a.maxClips || 9, brandId: a.brandId }); return ok(`Clip job started. jobId: ${d.jobId}${d.duplicate ? " (duplicate of a recent job, no extra credits)" : ""}. Status: processing. Typical completion time: 10 to 30 minutes. Clip URLs are available from get_job once status is complete.`); } catch (e) { return fail(e); } });
|
|
250
|
+
|
|
251
|
+
server.tool("list_brands", "List the user's brand/creator profiles. Each controls AI face detection, watermark, and the creator name on clips. Pass a brand's id as brandId to generate_clips.", {},
|
|
252
|
+
async () => { try { const d = await api("GET", "/users/me/brands"); const active = String(d.activeBrandId || ""); const list = (d.brands || []).map((b) => `${b._id} · ${b.name}${String(b._id) === active ? " (active)" : ""}`).join("\n"); return ok(list || "No brands yet."); } catch (e) { return fail(e); } });
|
|
250
253
|
|
|
251
254
|
server.tool("get_job", "Check a clip job's status and get finished clip URLs.", { jobId: z.string() },
|
|
252
|
-
async (a) => { try { const d = await api("GET", "/clips/status/" + a.jobId); const clips = (d.clips || []).map((x, i) =>
|
|
255
|
+
async (a) => { try { const d = await api("GET", "/clips/status/" + a.jobId); const clips = (d.clips || []).map((x, i) => `${i + 1}. ${x.hook || "Clip"} · ${x.url ? "[Download](" + x.url + ")" : "(rendering)"}`).join("\n"); return ok(`Status: ${d.status} (${d.progress ?? 0}%)\n${clips || "No clips yet."}`); } catch (e) { return fail(e); } });
|
|
253
256
|
|
|
254
257
|
server.tool("list_recent_clips", "List your recent clip jobs and how many clips each produced.", {},
|
|
255
258
|
async () => { try { const d = await api("GET", "/clips/jobs"); const jobs = (d.jobs || d || []).slice(0, 10).map((j) => `${j._id} · ${j.status} · ${(j.clips || []).length} clips · ${j.videoTitle || j.streamerName || ""}`).join("\n"); return ok(jobs || "No jobs yet."); } catch (e) { return fail(e); } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clipbait",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
4
4
|
"description": "Clipbait CLI + MCP server — turn any video into viral clips, and auto-clip live streams, from your terminal or any AI agent.",
|
|
5
5
|
"mcpName": "io.github.spiritscripts/clipbait",
|
|
6
6
|
"bin": { "clipbait": "index.js" },
|
package/server.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.spiritscripts/clipbait",
|
|
4
|
+
"description": "Turn any video into viral clips and clip live streams, from any AI agent.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/spiritscripts/clipbait-agent",
|
|
7
|
+
"source": "github"
|
|
8
|
+
},
|
|
9
|
+
"version": "1.9.3",
|
|
10
|
+
"packages": [
|
|
11
|
+
{
|
|
12
|
+
"registryType": "npm",
|
|
13
|
+
"identifier": "clipbait",
|
|
14
|
+
"version": "1.9.3",
|
|
15
|
+
"transport": {
|
|
16
|
+
"type": "stdio"
|
|
17
|
+
},
|
|
18
|
+
"packageArguments": [
|
|
19
|
+
{
|
|
20
|
+
"type": "positional",
|
|
21
|
+
"value": "mcp"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"environmentVariables": [
|
|
25
|
+
{
|
|
26
|
+
"description": "Your Clipbait API key (cbk_live_...). Get it at https://app.clipbait.ai/me",
|
|
27
|
+
"isRequired": true,
|
|
28
|
+
"format": "string",
|
|
29
|
+
"isSecret": true,
|
|
30
|
+
"name": "CLIPBAIT_API_KEY"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|