klamdo-mcp 1.3.0 → 1.4.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/dist/http.js +3 -3
- package/dist/index.js +1 -1
- package/dist/tools.d.ts +177 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +174 -1
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
- package/src/http.ts +3 -3
- package/src/index.ts +1 -1
- package/src/tools.ts +215 -1
package/dist/http.js
CHANGED
|
@@ -37,7 +37,7 @@ async function readBody(req) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
function createMcpServer(apiKey) {
|
|
40
|
-
const server = new index_js_1.Server({ name: "klamdo", version: "1.
|
|
40
|
+
const server = new index_js_1.Server({ name: "klamdo", version: "1.4.0" }, { capabilities: { tools: {}, resources: {} } });
|
|
41
41
|
(0, tools_js_1.registerHandlers)(server, () => apiKey);
|
|
42
42
|
return server;
|
|
43
43
|
}
|
|
@@ -46,7 +46,7 @@ const httpServer = (0, http_1.createServer)(async (req, res) => {
|
|
|
46
46
|
// Health check
|
|
47
47
|
if (req.method === "GET" && url.pathname === "/health") {
|
|
48
48
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
49
|
-
res.end(JSON.stringify({ ok: true, service: "klamdo-mcp", version: "1.
|
|
49
|
+
res.end(JSON.stringify({ ok: true, service: "klamdo-mcp", version: "1.4.0" }));
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
// CORS preflight
|
|
@@ -99,7 +99,7 @@ const httpServer = (0, http_1.createServer)(async (req, res) => {
|
|
|
99
99
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
100
100
|
res.end(JSON.stringify({
|
|
101
101
|
service: "Klamdo MCP Server",
|
|
102
|
-
version: "1.
|
|
102
|
+
version: "1.4.0",
|
|
103
103
|
mcpEndpoint: "/mcp",
|
|
104
104
|
docs: "https://klamdo.app/answers",
|
|
105
105
|
getApiKey: "https://klamdo.app/profile"
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ if (!API_KEY) {
|
|
|
23
23
|
process.stderr.write("[klamdo-mcp] Warning: KLAMDO_API_KEY is not set. Set it in your MCP client config.\n");
|
|
24
24
|
}
|
|
25
25
|
async function main() {
|
|
26
|
-
const server = new index_js_1.Server({ name: "klamdo", version: "1.
|
|
26
|
+
const server = new index_js_1.Server({ name: "klamdo", version: "1.4.0" }, { capabilities: { tools: {}, resources: {} } });
|
|
27
27
|
(0, tools_js_1.registerHandlers)(server, () => API_KEY);
|
|
28
28
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
29
29
|
await server.connect(transport);
|
package/dist/tools.d.ts
CHANGED
|
@@ -31,8 +31,16 @@ export declare const TOOLS: ({
|
|
|
31
31
|
imageUrl?: undefined;
|
|
32
32
|
jobId?: undefined;
|
|
33
33
|
limit?: undefined;
|
|
34
|
+
packageType?: undefined;
|
|
35
|
+
niche?: undefined;
|
|
36
|
+
avatarDurationSeconds?: undefined;
|
|
37
|
+
characterType?: undefined;
|
|
38
|
+
uploadedAssetIds?: undefined;
|
|
39
|
+
options?: undefined;
|
|
40
|
+
packageId?: undefined;
|
|
34
41
|
};
|
|
35
42
|
required: string[];
|
|
43
|
+
additionalProperties?: undefined;
|
|
36
44
|
};
|
|
37
45
|
} | {
|
|
38
46
|
name: string;
|
|
@@ -58,8 +66,16 @@ export declare const TOOLS: ({
|
|
|
58
66
|
imageUrl?: undefined;
|
|
59
67
|
jobId?: undefined;
|
|
60
68
|
limit?: undefined;
|
|
69
|
+
packageType?: undefined;
|
|
70
|
+
niche?: undefined;
|
|
71
|
+
avatarDurationSeconds?: undefined;
|
|
72
|
+
characterType?: undefined;
|
|
73
|
+
uploadedAssetIds?: undefined;
|
|
74
|
+
options?: undefined;
|
|
75
|
+
packageId?: undefined;
|
|
61
76
|
};
|
|
62
77
|
required: string[];
|
|
78
|
+
additionalProperties?: undefined;
|
|
63
79
|
};
|
|
64
80
|
} | {
|
|
65
81
|
name: string;
|
|
@@ -82,8 +98,16 @@ export declare const TOOLS: ({
|
|
|
82
98
|
startFrameAssetId?: undefined;
|
|
83
99
|
jobId?: undefined;
|
|
84
100
|
limit?: undefined;
|
|
101
|
+
packageType?: undefined;
|
|
102
|
+
niche?: undefined;
|
|
103
|
+
avatarDurationSeconds?: undefined;
|
|
104
|
+
characterType?: undefined;
|
|
105
|
+
uploadedAssetIds?: undefined;
|
|
106
|
+
options?: undefined;
|
|
107
|
+
packageId?: undefined;
|
|
85
108
|
};
|
|
86
109
|
required: string[];
|
|
110
|
+
additionalProperties?: undefined;
|
|
87
111
|
};
|
|
88
112
|
} | {
|
|
89
113
|
name: string;
|
|
@@ -106,8 +130,16 @@ export declare const TOOLS: ({
|
|
|
106
130
|
startFrameAssetId?: undefined;
|
|
107
131
|
imageUrl?: undefined;
|
|
108
132
|
limit?: undefined;
|
|
133
|
+
packageType?: undefined;
|
|
134
|
+
niche?: undefined;
|
|
135
|
+
avatarDurationSeconds?: undefined;
|
|
136
|
+
characterType?: undefined;
|
|
137
|
+
uploadedAssetIds?: undefined;
|
|
138
|
+
options?: undefined;
|
|
139
|
+
packageId?: undefined;
|
|
109
140
|
};
|
|
110
141
|
required: string[];
|
|
142
|
+
additionalProperties?: undefined;
|
|
111
143
|
};
|
|
112
144
|
} | {
|
|
113
145
|
name: string;
|
|
@@ -127,8 +159,16 @@ export declare const TOOLS: ({
|
|
|
127
159
|
imageUrl?: undefined;
|
|
128
160
|
jobId?: undefined;
|
|
129
161
|
limit?: undefined;
|
|
162
|
+
packageType?: undefined;
|
|
163
|
+
niche?: undefined;
|
|
164
|
+
avatarDurationSeconds?: undefined;
|
|
165
|
+
characterType?: undefined;
|
|
166
|
+
uploadedAssetIds?: undefined;
|
|
167
|
+
options?: undefined;
|
|
168
|
+
packageId?: undefined;
|
|
130
169
|
};
|
|
131
170
|
required?: undefined;
|
|
171
|
+
additionalProperties?: undefined;
|
|
132
172
|
};
|
|
133
173
|
} | {
|
|
134
174
|
name: string;
|
|
@@ -152,8 +192,145 @@ export declare const TOOLS: ({
|
|
|
152
192
|
startFrameAssetId?: undefined;
|
|
153
193
|
imageUrl?: undefined;
|
|
154
194
|
jobId?: undefined;
|
|
195
|
+
packageType?: undefined;
|
|
196
|
+
niche?: undefined;
|
|
197
|
+
avatarDurationSeconds?: undefined;
|
|
198
|
+
characterType?: undefined;
|
|
199
|
+
uploadedAssetIds?: undefined;
|
|
200
|
+
options?: undefined;
|
|
201
|
+
packageId?: undefined;
|
|
155
202
|
};
|
|
156
203
|
required?: undefined;
|
|
204
|
+
additionalProperties?: undefined;
|
|
205
|
+
};
|
|
206
|
+
} | {
|
|
207
|
+
name: string;
|
|
208
|
+
description: string;
|
|
209
|
+
annotations: {
|
|
210
|
+
readOnlyHint: boolean;
|
|
211
|
+
destructiveHint: boolean;
|
|
212
|
+
idempotentHint: boolean;
|
|
213
|
+
openWorldHint: boolean;
|
|
214
|
+
};
|
|
215
|
+
inputSchema: {
|
|
216
|
+
type: string;
|
|
217
|
+
properties: {
|
|
218
|
+
prompt?: undefined;
|
|
219
|
+
aspectRatio?: undefined;
|
|
220
|
+
startFrameAssetId?: undefined;
|
|
221
|
+
imageUrl?: undefined;
|
|
222
|
+
jobId?: undefined;
|
|
223
|
+
limit?: undefined;
|
|
224
|
+
packageType?: undefined;
|
|
225
|
+
niche?: undefined;
|
|
226
|
+
avatarDurationSeconds?: undefined;
|
|
227
|
+
characterType?: undefined;
|
|
228
|
+
uploadedAssetIds?: undefined;
|
|
229
|
+
options?: undefined;
|
|
230
|
+
packageId?: undefined;
|
|
231
|
+
};
|
|
232
|
+
additionalProperties: boolean;
|
|
233
|
+
required?: undefined;
|
|
234
|
+
};
|
|
235
|
+
} | {
|
|
236
|
+
name: string;
|
|
237
|
+
description: string;
|
|
238
|
+
annotations: {
|
|
239
|
+
readOnlyHint: boolean;
|
|
240
|
+
destructiveHint: boolean;
|
|
241
|
+
idempotentHint: boolean;
|
|
242
|
+
openWorldHint: boolean;
|
|
243
|
+
};
|
|
244
|
+
inputSchema: {
|
|
245
|
+
type: string;
|
|
246
|
+
properties: {
|
|
247
|
+
packageType: {
|
|
248
|
+
type: string;
|
|
249
|
+
enum: string[];
|
|
250
|
+
description: string;
|
|
251
|
+
};
|
|
252
|
+
prompt: {
|
|
253
|
+
type: string;
|
|
254
|
+
description: string;
|
|
255
|
+
};
|
|
256
|
+
niche: {
|
|
257
|
+
type: string;
|
|
258
|
+
description: string;
|
|
259
|
+
};
|
|
260
|
+
aspectRatio: {
|
|
261
|
+
type: string;
|
|
262
|
+
enum: string[];
|
|
263
|
+
description: string;
|
|
264
|
+
default?: undefined;
|
|
265
|
+
};
|
|
266
|
+
avatarDurationSeconds: {
|
|
267
|
+
type: string;
|
|
268
|
+
enum: number[];
|
|
269
|
+
description: string;
|
|
270
|
+
};
|
|
271
|
+
characterType: {
|
|
272
|
+
type: string;
|
|
273
|
+
enum: string[];
|
|
274
|
+
description: string;
|
|
275
|
+
};
|
|
276
|
+
uploadedAssetIds: {
|
|
277
|
+
type: string;
|
|
278
|
+
items: {
|
|
279
|
+
type: string;
|
|
280
|
+
};
|
|
281
|
+
description: string;
|
|
282
|
+
};
|
|
283
|
+
options: {
|
|
284
|
+
type: string;
|
|
285
|
+
properties: {
|
|
286
|
+
useReferencePack: {
|
|
287
|
+
type: string;
|
|
288
|
+
};
|
|
289
|
+
skipVoiceover: {
|
|
290
|
+
type: string;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
startFrameAssetId?: undefined;
|
|
295
|
+
imageUrl?: undefined;
|
|
296
|
+
jobId?: undefined;
|
|
297
|
+
limit?: undefined;
|
|
298
|
+
packageId?: undefined;
|
|
299
|
+
};
|
|
300
|
+
required: string[];
|
|
301
|
+
additionalProperties?: undefined;
|
|
302
|
+
};
|
|
303
|
+
} | {
|
|
304
|
+
name: string;
|
|
305
|
+
description: string;
|
|
306
|
+
annotations: {
|
|
307
|
+
readOnlyHint: boolean;
|
|
308
|
+
destructiveHint: boolean;
|
|
309
|
+
idempotentHint: boolean;
|
|
310
|
+
openWorldHint: boolean;
|
|
311
|
+
};
|
|
312
|
+
inputSchema: {
|
|
313
|
+
type: string;
|
|
314
|
+
properties: {
|
|
315
|
+
packageId: {
|
|
316
|
+
type: string;
|
|
317
|
+
description: string;
|
|
318
|
+
};
|
|
319
|
+
prompt?: undefined;
|
|
320
|
+
aspectRatio?: undefined;
|
|
321
|
+
startFrameAssetId?: undefined;
|
|
322
|
+
imageUrl?: undefined;
|
|
323
|
+
jobId?: undefined;
|
|
324
|
+
limit?: undefined;
|
|
325
|
+
packageType?: undefined;
|
|
326
|
+
niche?: undefined;
|
|
327
|
+
avatarDurationSeconds?: undefined;
|
|
328
|
+
characterType?: undefined;
|
|
329
|
+
uploadedAssetIds?: undefined;
|
|
330
|
+
options?: undefined;
|
|
331
|
+
};
|
|
332
|
+
required: string[];
|
|
333
|
+
additionalProperties?: undefined;
|
|
157
334
|
};
|
|
158
335
|
})[];
|
|
159
336
|
export declare function registerHandlers(server: Server, getApiKey: () => string): void;
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAExE,eAAO,MAAM,QAAQ,QAAsD,CAAC;AAE5E,wBAAsB,MAAM,CAAC,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,CAAC,CAAC,CAyBZ;AAED,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAExE,eAAO,MAAM,QAAQ,QAAsD,CAAC;AAE5E,wBAAsB,MAAM,CAAC,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,CAAC,CAAC,CAyBZ;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmOjB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,QAyTvE"}
|
package/dist/tools.js
CHANGED
|
@@ -148,6 +148,107 @@ exports.TOOLS = [
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "list_packages",
|
|
154
|
+
description: "List Klamdo's available agentic packages, including expected deliverables and required plan tier.",
|
|
155
|
+
annotations: {
|
|
156
|
+
readOnlyHint: true,
|
|
157
|
+
destructiveHint: false,
|
|
158
|
+
idempotentHint: true,
|
|
159
|
+
openWorldHint: true
|
|
160
|
+
},
|
|
161
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "create_package",
|
|
165
|
+
description: "Create a Klamdo agentic package job from a business prompt and get back a package ID plus manifest URL.",
|
|
166
|
+
annotations: {
|
|
167
|
+
readOnlyHint: false,
|
|
168
|
+
destructiveHint: false,
|
|
169
|
+
idempotentHint: false,
|
|
170
|
+
openWorldHint: true
|
|
171
|
+
},
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {
|
|
175
|
+
packageType: {
|
|
176
|
+
type: "string",
|
|
177
|
+
enum: ["digital-marketing", "social-media", "ugc-ad", "coaching-brand", "product-launch", "content-repurpose", "motion-control", "faceless-content", "build-your-own-ai"],
|
|
178
|
+
description: "The Klamdo package to create."
|
|
179
|
+
},
|
|
180
|
+
prompt: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "High-level business prompt describing the package goal."
|
|
183
|
+
},
|
|
184
|
+
niche: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "Optional niche or audience hint."
|
|
187
|
+
},
|
|
188
|
+
aspectRatio: {
|
|
189
|
+
type: "string",
|
|
190
|
+
enum: ["16:9", "9:16", "1:1"],
|
|
191
|
+
description: "Preferred output aspect ratio. Packages currently support 16:9 and 9:16."
|
|
192
|
+
},
|
|
193
|
+
avatarDurationSeconds: {
|
|
194
|
+
type: "number",
|
|
195
|
+
enum: [30, 60, 90, 180],
|
|
196
|
+
description: "Optional avatar-video duration for packages that include avatar outputs."
|
|
197
|
+
},
|
|
198
|
+
characterType: {
|
|
199
|
+
type: "string",
|
|
200
|
+
enum: ["realistic", "anime", "cartoon", "fantasy", "cyber", "3d"],
|
|
201
|
+
description: "Required for build-your-own-ai packages. Controls the character style and image model."
|
|
202
|
+
},
|
|
203
|
+
uploadedAssetIds: {
|
|
204
|
+
type: "array",
|
|
205
|
+
items: { type: "string" },
|
|
206
|
+
description: "Optional Klamdo asset IDs or URLs to feed into the package."
|
|
207
|
+
},
|
|
208
|
+
options: {
|
|
209
|
+
type: "object",
|
|
210
|
+
properties: {
|
|
211
|
+
useReferencePack: { type: "boolean" },
|
|
212
|
+
skipVoiceover: { type: "boolean" }
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
required: ["packageType", "prompt"]
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "get_package",
|
|
221
|
+
description: "Get the status, progress, and deliverable counts for a Klamdo package job.",
|
|
222
|
+
annotations: {
|
|
223
|
+
readOnlyHint: true,
|
|
224
|
+
destructiveHint: false,
|
|
225
|
+
idempotentHint: true,
|
|
226
|
+
openWorldHint: true
|
|
227
|
+
},
|
|
228
|
+
inputSchema: {
|
|
229
|
+
type: "object",
|
|
230
|
+
properties: {
|
|
231
|
+
packageId: { type: "string", description: "The package ID returned by create_package." }
|
|
232
|
+
},
|
|
233
|
+
required: ["packageId"]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "get_package_manifest",
|
|
238
|
+
description: "Fetch the structured package manifest for downstream agent execution.",
|
|
239
|
+
annotations: {
|
|
240
|
+
readOnlyHint: true,
|
|
241
|
+
destructiveHint: false,
|
|
242
|
+
idempotentHint: true,
|
|
243
|
+
openWorldHint: true
|
|
244
|
+
},
|
|
245
|
+
inputSchema: {
|
|
246
|
+
type: "object",
|
|
247
|
+
properties: {
|
|
248
|
+
packageId: { type: "string", description: "The package ID returned by create_package." }
|
|
249
|
+
},
|
|
250
|
+
required: ["packageId"]
|
|
251
|
+
}
|
|
151
252
|
}
|
|
152
253
|
];
|
|
153
254
|
function registerHandlers(server, getApiKey) {
|
|
@@ -270,6 +371,78 @@ function registerHandlers(server, getApiKey) {
|
|
|
270
371
|
content: [{ type: "text", text: lines.length ? lines.join("\n") : "No jobs found." }]
|
|
271
372
|
};
|
|
272
373
|
}
|
|
374
|
+
case "list_packages": {
|
|
375
|
+
const result = await klamdo("/packages", apiKey);
|
|
376
|
+
const lines = [
|
|
377
|
+
`Plan: ${result.planTier}`,
|
|
378
|
+
`Subscription active: ${result.subscriptionActive ? "yes" : "no"}`,
|
|
379
|
+
"",
|
|
380
|
+
...result.packages.map((pkg) => `${pkg.accessible ? "[available]" : "[locked]"} ${pkg.id} — ${pkg.label}\n` +
|
|
381
|
+
` Min tier: ${pkg.minTier}\n` +
|
|
382
|
+
` Estimated credits: ${pkg.estimatedCredits}\n` +
|
|
383
|
+
` Text outputs: ${pkg.expectedOutputs.textRoles.join(", ") || "none"}\n` +
|
|
384
|
+
` Media outputs: ${pkg.expectedOutputs.mediaRoles.join(", ") || "none"}\n` +
|
|
385
|
+
` Document outputs: ${pkg.expectedOutputs.documentRoles.join(", ") || "none"}`),
|
|
386
|
+
];
|
|
387
|
+
return {
|
|
388
|
+
content: [{ type: "text", text: lines.join("\n") }]
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
case "create_package": {
|
|
392
|
+
const result = await klamdo("/packages", apiKey, {
|
|
393
|
+
packageType: input.packageType,
|
|
394
|
+
prompt: input.prompt,
|
|
395
|
+
niche: input.niche,
|
|
396
|
+
aspectRatio: input.aspectRatio,
|
|
397
|
+
avatarDurationSeconds: input.avatarDurationSeconds,
|
|
398
|
+
characterType: input.characterType,
|
|
399
|
+
uploadedAssetIds: input.uploadedAssetIds,
|
|
400
|
+
options: input.options,
|
|
401
|
+
});
|
|
402
|
+
return {
|
|
403
|
+
content: [
|
|
404
|
+
{
|
|
405
|
+
type: "text",
|
|
406
|
+
text: `Package started.\n\nPackage ID: ${result.id}\nType: ${result.packageType}\n` +
|
|
407
|
+
`Status: ${result.status}\nProgress: ${result.progress.completed}/${result.progress.total}\n` +
|
|
408
|
+
`Manifest URL: ${exports.BASE_URL}${result.manifestUrl}\n\n` +
|
|
409
|
+
`Use get_package("${result.id}") for status or get_package_manifest("${result.id}") for the structured deliverables contract.`
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
case "get_package": {
|
|
415
|
+
const packageId = String(input.packageId ?? "");
|
|
416
|
+
if (!packageId)
|
|
417
|
+
throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, "packageId is required");
|
|
418
|
+
const result = await klamdo(`/packages/${packageId}`, apiKey);
|
|
419
|
+
return {
|
|
420
|
+
content: [
|
|
421
|
+
{
|
|
422
|
+
type: "text",
|
|
423
|
+
text: [
|
|
424
|
+
`Package ${result.id}`,
|
|
425
|
+
`Type: ${result.packageType}`,
|
|
426
|
+
`Status: ${result.status}`,
|
|
427
|
+
`Niche: ${result.niche}`,
|
|
428
|
+
`Tier: ${result.tier}`,
|
|
429
|
+
`Progress: ${result.progress.completed}/${result.progress.total}`,
|
|
430
|
+
`Deliverables: text=${result.deliverableCounts.text}, media=${result.deliverableCounts.media}, documents=${result.deliverableCounts.documents}, errors=${result.deliverableCounts.errors}`,
|
|
431
|
+
`Manifest URL: ${exports.BASE_URL}${result.manifestUrl}`
|
|
432
|
+
].join("\n")
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
case "get_package_manifest": {
|
|
438
|
+
const packageId = String(input.packageId ?? "");
|
|
439
|
+
if (!packageId)
|
|
440
|
+
throw new types_js_1.McpError(types_js_1.ErrorCode.InvalidParams, "packageId is required");
|
|
441
|
+
const result = await klamdo(`/packages/${packageId}/manifest`, apiKey);
|
|
442
|
+
return {
|
|
443
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
444
|
+
};
|
|
445
|
+
}
|
|
273
446
|
default:
|
|
274
447
|
throw new types_js_1.McpError(types_js_1.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
275
448
|
}
|
|
@@ -297,7 +470,7 @@ function registerHandlers(server, getApiKey) {
|
|
|
297
470
|
{
|
|
298
471
|
uri: "klamdo://docs",
|
|
299
472
|
mimeType: "text/plain",
|
|
300
|
-
text: `# Klamdo MCP Server v1.
|
|
473
|
+
text: `# Klamdo MCP Server v1.4.0\n\nTools: generate_image, generate_video, upload_start_frame, check_job, get_account, list_jobs, list_packages, create_package, get_package, get_package_manifest\n\nImage/video workflow:\n1. upload_start_frame({ imageUrl: "https://..." }) → assetId\n2. generate_video({ prompt: "...", startFrameAssetId: "asset_xxx" }) → jobId\n3. check_job({ jobId: "job_xxx" }) → status + download URL\n\nPackage workflow:\n1. list_packages()\n2. create_package({ packageType: "coaching-brand", prompt: "Create a coaching launch package for my offer" })\n3. get_package({ packageId: "pkg_xxx" })\n4. get_package_manifest({ packageId: "pkg_xxx" })\n\nGet your API key at https://klamdo.app/profile\nSee current plans and credits at https://klamdo.app/pricing\n`
|
|
301
474
|
}
|
|
302
475
|
]
|
|
303
476
|
};
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAcH,wBA6BC;AAkID,4CAwMC;AAnXD,iEAO4C;AAG/B,QAAA,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,oBAAoB,CAAC;AAErE,KAAK,UAAU,MAAM,CAC1B,IAAY,EACZ,MAAc,EACd,IAA8B;IAE9B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,gBAAQ,WAAW,IAAI,EAAE,EAAE;QACpD,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;QAC7B,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,MAAM,EAAE;SAClC;QACD,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;KAC9C,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,MAAM,KAAK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A0B;gBAChC,WAAW,EAAE,+BAA+B;gBAC5C,QAAQ,EAAE,YAAY;aACvB;SACF;KACF,CAAC,CAAC,CAAC;IAEJ,MAAM,CAAC,iBAAiB,CAAC,oCAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACpE,IAAI,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,eAAe,EAAE,CAAC;YAC3C,OAAO;gBACL,QAAQ,EAAE;oBACR;wBACE,GAAG,EAAE,eAAe;wBACpB,QAAQ,EAAE,YAAY;wBACtB,IAAI,EAAE,qwBAAqwB;qBAC5wB;iBACF;aACF,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,mBAAQ,CAAC,oBAAS,CAAC,cAAc,EAAE,uBAAuB,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5F,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "klamdo-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "MCP server for Klamdo — AI content generation for coaches and creator-founders. Generate
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "MCP server for Klamdo — AI content generation plus agentic package orchestration for coaches and creator-founders. Generate media, create packages, and hand structured deliverables to downstream AI agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"klamdo-mcp": "dist/index.js"
|
package/src/http.ts
CHANGED
|
@@ -39,7 +39,7 @@ async function readBody(req: IncomingMessage): Promise<Buffer> {
|
|
|
39
39
|
|
|
40
40
|
function createMcpServer(apiKey: string): Server {
|
|
41
41
|
const server = new Server(
|
|
42
|
-
{ name: "klamdo", version: "1.
|
|
42
|
+
{ name: "klamdo", version: "1.4.0" },
|
|
43
43
|
{ capabilities: { tools: {}, resources: {} } }
|
|
44
44
|
);
|
|
45
45
|
registerHandlers(server, () => apiKey);
|
|
@@ -52,7 +52,7 @@ const httpServer = createServer(async (req: IncomingMessage, res: ServerResponse
|
|
|
52
52
|
// Health check
|
|
53
53
|
if (req.method === "GET" && url.pathname === "/health") {
|
|
54
54
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
55
|
-
res.end(JSON.stringify({ ok: true, service: "klamdo-mcp", version: "1.
|
|
55
|
+
res.end(JSON.stringify({ ok: true, service: "klamdo-mcp", version: "1.4.0" }));
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -113,7 +113,7 @@ const httpServer = createServer(async (req: IncomingMessage, res: ServerResponse
|
|
|
113
113
|
res.writeHead(200, { "Content-Type": "application/json" });
|
|
114
114
|
res.end(JSON.stringify({
|
|
115
115
|
service: "Klamdo MCP Server",
|
|
116
|
-
version: "1.
|
|
116
|
+
version: "1.4.0",
|
|
117
117
|
mcpEndpoint: "/mcp",
|
|
118
118
|
docs: "https://klamdo.app/answers",
|
|
119
119
|
getApiKey: "https://klamdo.app/profile"
|
package/src/index.ts
CHANGED
package/src/tools.ts
CHANGED
|
@@ -171,6 +171,107 @@ export const TOOLS = [
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "list_packages",
|
|
177
|
+
description: "List Klamdo's available agentic packages, including expected deliverables and required plan tier.",
|
|
178
|
+
annotations: {
|
|
179
|
+
readOnlyHint: true,
|
|
180
|
+
destructiveHint: false,
|
|
181
|
+
idempotentHint: true,
|
|
182
|
+
openWorldHint: true
|
|
183
|
+
},
|
|
184
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "create_package",
|
|
188
|
+
description: "Create a Klamdo agentic package job from a business prompt and get back a package ID plus manifest URL.",
|
|
189
|
+
annotations: {
|
|
190
|
+
readOnlyHint: false,
|
|
191
|
+
destructiveHint: false,
|
|
192
|
+
idempotentHint: false,
|
|
193
|
+
openWorldHint: true
|
|
194
|
+
},
|
|
195
|
+
inputSchema: {
|
|
196
|
+
type: "object",
|
|
197
|
+
properties: {
|
|
198
|
+
packageType: {
|
|
199
|
+
type: "string",
|
|
200
|
+
enum: ["digital-marketing", "social-media", "ugc-ad", "coaching-brand", "product-launch", "content-repurpose", "motion-control", "faceless-content", "build-your-own-ai"],
|
|
201
|
+
description: "The Klamdo package to create."
|
|
202
|
+
},
|
|
203
|
+
prompt: {
|
|
204
|
+
type: "string",
|
|
205
|
+
description: "High-level business prompt describing the package goal."
|
|
206
|
+
},
|
|
207
|
+
niche: {
|
|
208
|
+
type: "string",
|
|
209
|
+
description: "Optional niche or audience hint."
|
|
210
|
+
},
|
|
211
|
+
aspectRatio: {
|
|
212
|
+
type: "string",
|
|
213
|
+
enum: ["16:9", "9:16", "1:1"],
|
|
214
|
+
description: "Preferred output aspect ratio. Packages currently support 16:9 and 9:16."
|
|
215
|
+
},
|
|
216
|
+
avatarDurationSeconds: {
|
|
217
|
+
type: "number",
|
|
218
|
+
enum: [30, 60, 90, 180],
|
|
219
|
+
description: "Optional avatar-video duration for packages that include avatar outputs."
|
|
220
|
+
},
|
|
221
|
+
characterType: {
|
|
222
|
+
type: "string",
|
|
223
|
+
enum: ["realistic", "anime", "cartoon", "fantasy", "cyber", "3d"],
|
|
224
|
+
description: "Required for build-your-own-ai packages. Controls the character style and image model."
|
|
225
|
+
},
|
|
226
|
+
uploadedAssetIds: {
|
|
227
|
+
type: "array",
|
|
228
|
+
items: { type: "string" },
|
|
229
|
+
description: "Optional Klamdo asset IDs or URLs to feed into the package."
|
|
230
|
+
},
|
|
231
|
+
options: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
useReferencePack: { type: "boolean" },
|
|
235
|
+
skipVoiceover: { type: "boolean" }
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
required: ["packageType", "prompt"]
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "get_package",
|
|
244
|
+
description: "Get the status, progress, and deliverable counts for a Klamdo package job.",
|
|
245
|
+
annotations: {
|
|
246
|
+
readOnlyHint: true,
|
|
247
|
+
destructiveHint: false,
|
|
248
|
+
idempotentHint: true,
|
|
249
|
+
openWorldHint: true
|
|
250
|
+
},
|
|
251
|
+
inputSchema: {
|
|
252
|
+
type: "object",
|
|
253
|
+
properties: {
|
|
254
|
+
packageId: { type: "string", description: "The package ID returned by create_package." }
|
|
255
|
+
},
|
|
256
|
+
required: ["packageId"]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: "get_package_manifest",
|
|
261
|
+
description: "Fetch the structured package manifest for downstream agent execution.",
|
|
262
|
+
annotations: {
|
|
263
|
+
readOnlyHint: true,
|
|
264
|
+
destructiveHint: false,
|
|
265
|
+
idempotentHint: true,
|
|
266
|
+
openWorldHint: true
|
|
267
|
+
},
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {
|
|
271
|
+
packageId: { type: "string", description: "The package ID returned by create_package." }
|
|
272
|
+
},
|
|
273
|
+
required: ["packageId"]
|
|
274
|
+
}
|
|
174
275
|
}
|
|
175
276
|
];
|
|
176
277
|
|
|
@@ -340,6 +441,119 @@ export function registerHandlers(server: Server, getApiKey: () => string) {
|
|
|
340
441
|
};
|
|
341
442
|
}
|
|
342
443
|
|
|
444
|
+
case "list_packages": {
|
|
445
|
+
const result = await klamdo<{
|
|
446
|
+
planTier: string;
|
|
447
|
+
subscriptionActive: boolean;
|
|
448
|
+
packages: Array<{
|
|
449
|
+
id: string;
|
|
450
|
+
label: string;
|
|
451
|
+
minTier: string;
|
|
452
|
+
estimatedCredits: number;
|
|
453
|
+
accessible: boolean;
|
|
454
|
+
expectedOutputs: {
|
|
455
|
+
textRoles: string[];
|
|
456
|
+
mediaRoles: string[];
|
|
457
|
+
documentRoles: string[];
|
|
458
|
+
};
|
|
459
|
+
}>;
|
|
460
|
+
}>("/packages", apiKey);
|
|
461
|
+
|
|
462
|
+
const lines = [
|
|
463
|
+
`Plan: ${result.planTier}`,
|
|
464
|
+
`Subscription active: ${result.subscriptionActive ? "yes" : "no"}`,
|
|
465
|
+
"",
|
|
466
|
+
...result.packages.map(
|
|
467
|
+
(pkg) =>
|
|
468
|
+
`${pkg.accessible ? "[available]" : "[locked]"} ${pkg.id} — ${pkg.label}\n` +
|
|
469
|
+
` Min tier: ${pkg.minTier}\n` +
|
|
470
|
+
` Estimated credits: ${pkg.estimatedCredits}\n` +
|
|
471
|
+
` Text outputs: ${pkg.expectedOutputs.textRoles.join(", ") || "none"}\n` +
|
|
472
|
+
` Media outputs: ${pkg.expectedOutputs.mediaRoles.join(", ") || "none"}\n` +
|
|
473
|
+
` Document outputs: ${pkg.expectedOutputs.documentRoles.join(", ") || "none"}`
|
|
474
|
+
),
|
|
475
|
+
];
|
|
476
|
+
return {
|
|
477
|
+
content: [{ type: "text", text: lines.join("\n") }]
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
case "create_package": {
|
|
482
|
+
const result = await klamdo<{
|
|
483
|
+
id: string;
|
|
484
|
+
status: string;
|
|
485
|
+
packageType: string;
|
|
486
|
+
progress: { completed: number; total: number };
|
|
487
|
+
manifestUrl: string;
|
|
488
|
+
}>("/packages", apiKey, {
|
|
489
|
+
packageType: input.packageType,
|
|
490
|
+
prompt: input.prompt,
|
|
491
|
+
niche: input.niche,
|
|
492
|
+
aspectRatio: input.aspectRatio,
|
|
493
|
+
avatarDurationSeconds: input.avatarDurationSeconds,
|
|
494
|
+
characterType: input.characterType,
|
|
495
|
+
uploadedAssetIds: input.uploadedAssetIds,
|
|
496
|
+
options: input.options,
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
return {
|
|
500
|
+
content: [
|
|
501
|
+
{
|
|
502
|
+
type: "text",
|
|
503
|
+
text:
|
|
504
|
+
`Package started.\n\nPackage ID: ${result.id}\nType: ${result.packageType}\n` +
|
|
505
|
+
`Status: ${result.status}\nProgress: ${result.progress.completed}/${result.progress.total}\n` +
|
|
506
|
+
`Manifest URL: ${BASE_URL}${result.manifestUrl}\n\n` +
|
|
507
|
+
`Use get_package("${result.id}") for status or get_package_manifest("${result.id}") for the structured deliverables contract.`
|
|
508
|
+
}
|
|
509
|
+
]
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
case "get_package": {
|
|
514
|
+
const packageId = String(input.packageId ?? "");
|
|
515
|
+
if (!packageId) throw new McpError(ErrorCode.InvalidParams, "packageId is required");
|
|
516
|
+
|
|
517
|
+
const result = await klamdo<{
|
|
518
|
+
id: string;
|
|
519
|
+
packageType: string;
|
|
520
|
+
status: string;
|
|
521
|
+
niche: string;
|
|
522
|
+
tier: string;
|
|
523
|
+
progress: { completed: number; total: number };
|
|
524
|
+
deliverableCounts: { text: number; media: number; documents: number; errors: number };
|
|
525
|
+
manifestUrl: string;
|
|
526
|
+
}>(`/packages/${packageId}`, apiKey);
|
|
527
|
+
|
|
528
|
+
return {
|
|
529
|
+
content: [
|
|
530
|
+
{
|
|
531
|
+
type: "text",
|
|
532
|
+
text: [
|
|
533
|
+
`Package ${result.id}`,
|
|
534
|
+
`Type: ${result.packageType}`,
|
|
535
|
+
`Status: ${result.status}`,
|
|
536
|
+
`Niche: ${result.niche}`,
|
|
537
|
+
`Tier: ${result.tier}`,
|
|
538
|
+
`Progress: ${result.progress.completed}/${result.progress.total}`,
|
|
539
|
+
`Deliverables: text=${result.deliverableCounts.text}, media=${result.deliverableCounts.media}, documents=${result.deliverableCounts.documents}, errors=${result.deliverableCounts.errors}`,
|
|
540
|
+
`Manifest URL: ${BASE_URL}${result.manifestUrl}`
|
|
541
|
+
].join("\n")
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
case "get_package_manifest": {
|
|
548
|
+
const packageId = String(input.packageId ?? "");
|
|
549
|
+
if (!packageId) throw new McpError(ErrorCode.InvalidParams, "packageId is required");
|
|
550
|
+
|
|
551
|
+
const result = await klamdo<Record<string, unknown>>(`/packages/${packageId}/manifest`, apiKey);
|
|
552
|
+
return {
|
|
553
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
|
|
343
557
|
default:
|
|
344
558
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
345
559
|
}
|
|
@@ -367,7 +581,7 @@ export function registerHandlers(server: Server, getApiKey: () => string) {
|
|
|
367
581
|
{
|
|
368
582
|
uri: "klamdo://docs",
|
|
369
583
|
mimeType: "text/plain",
|
|
370
|
-
text: `# Klamdo MCP Server v1.
|
|
584
|
+
text: `# Klamdo MCP Server v1.4.0\n\nTools: generate_image, generate_video, upload_start_frame, check_job, get_account, list_jobs, list_packages, create_package, get_package, get_package_manifest\n\nImage/video workflow:\n1. upload_start_frame({ imageUrl: "https://..." }) → assetId\n2. generate_video({ prompt: "...", startFrameAssetId: "asset_xxx" }) → jobId\n3. check_job({ jobId: "job_xxx" }) → status + download URL\n\nPackage workflow:\n1. list_packages()\n2. create_package({ packageType: "coaching-brand", prompt: "Create a coaching launch package for my offer" })\n3. get_package({ packageId: "pkg_xxx" })\n4. get_package_manifest({ packageId: "pkg_xxx" })\n\nGet your API key at https://klamdo.app/profile\nSee current plans and credits at https://klamdo.app/pricing\n`
|
|
371
585
|
}
|
|
372
586
|
]
|
|
373
587
|
};
|