@launchpath-ai/mcp-server 1.0.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 (53) hide show
  1. package/README.md +94 -0
  2. package/build/client.d.ts +38 -0
  3. package/build/client.js +210 -0
  4. package/build/client.js.map +1 -0
  5. package/build/index.d.ts +12 -0
  6. package/build/index.js +374 -0
  7. package/build/index.js.map +1 -0
  8. package/build/tools/agents.d.ts +6 -0
  9. package/build/tools/agents.js +249 -0
  10. package/build/tools/agents.js.map +1 -0
  11. package/build/tools/analytics.d.ts +7 -0
  12. package/build/tools/analytics.js +282 -0
  13. package/build/tools/analytics.js.map +1 -0
  14. package/build/tools/campaigns.d.ts +6 -0
  15. package/build/tools/campaigns.js +158 -0
  16. package/build/tools/campaigns.js.map +1 -0
  17. package/build/tools/channels.d.ts +7 -0
  18. package/build/tools/channels.js +319 -0
  19. package/build/tools/channels.js.map +1 -0
  20. package/build/tools/clients.d.ts +6 -0
  21. package/build/tools/clients.js +138 -0
  22. package/build/tools/clients.js.map +1 -0
  23. package/build/tools/composio.d.ts +6 -0
  24. package/build/tools/composio.js +188 -0
  25. package/build/tools/composio.js.map +1 -0
  26. package/build/tools/core.d.ts +6 -0
  27. package/build/tools/core.js +130 -0
  28. package/build/tools/core.js.map +1 -0
  29. package/build/tools/integrations.d.ts +6 -0
  30. package/build/tools/integrations.js +188 -0
  31. package/build/tools/integrations.js.map +1 -0
  32. package/build/tools/knowledge.d.ts +7 -0
  33. package/build/tools/knowledge.js +274 -0
  34. package/build/tools/knowledge.js.map +1 -0
  35. package/build/tools/portal.d.ts +6 -0
  36. package/build/tools/portal.js +86 -0
  37. package/build/tools/portal.js.map +1 -0
  38. package/build/tools/tools-config.d.ts +6 -0
  39. package/build/tools/tools-config.js +213 -0
  40. package/build/tools/tools-config.js.map +1 -0
  41. package/build/tools/whatsapp.d.ts +7 -0
  42. package/build/tools/whatsapp.js +399 -0
  43. package/build/tools/whatsapp.js.map +1 -0
  44. package/build/types.d.ts +87 -0
  45. package/build/types.js +3 -0
  46. package/build/types.js.map +1 -0
  47. package/package.json +44 -0
  48. package/plugin.json +28 -0
  49. package/skills/agent-report/SKILL.md +44 -0
  50. package/skills/deploy-agent/SKILL.md +74 -0
  51. package/skills/launchpath-guide/SKILL.md +60 -0
  52. package/skills/setup-client/SKILL.md +44 -0
  53. package/skills/whatsapp-campaign/SKILL.md +72 -0
@@ -0,0 +1,399 @@
1
+ /**
2
+ * WhatsApp toolset (on-demand) — templates, broadcasts, contacts, sequences,
3
+ * activation, enrollment
4
+ */
5
+ import { z } from "zod";
6
+ import { formatError } from "../client.js";
7
+ export function registerWhatsAppTools(server, client) {
8
+ // --- list_wa_templates ---
9
+ server.registerTool("list_wa_templates", {
10
+ title: "List WhatsApp Templates",
11
+ description: "List WhatsApp message templates for a channel. Templates must be approved by Meta before sending.",
12
+ inputSchema: {
13
+ agent_id: z.string().describe("The agent's UUID"),
14
+ channel_id: z.string().describe("The WhatsApp channel's UUID"),
15
+ },
16
+ annotations: {
17
+ readOnlyHint: true,
18
+ openWorldHint: false,
19
+ },
20
+ }, async ({ agent_id, channel_id }) => {
21
+ const res = await client.get(`/api/agents/${agent_id}/channels/${channel_id}/templates`);
22
+ if (res.error) {
23
+ return {
24
+ isError: true,
25
+ content: [{ type: "text", text: formatError(res.error, res.status) }],
26
+ };
27
+ }
28
+ return {
29
+ content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
30
+ };
31
+ });
32
+ // --- create_wa_template ---
33
+ server.registerTool("create_wa_template", {
34
+ title: "Create WhatsApp Template",
35
+ description: "Create and submit a WhatsApp message template for Meta approval. Templates are required before sending broadcasts. Approval typically takes 1-24 hours.",
36
+ inputSchema: {
37
+ agent_id: z.string().describe("The agent's UUID"),
38
+ channel_id: z.string().describe("The WhatsApp channel's UUID"),
39
+ name: z
40
+ .string()
41
+ .describe("Template name (lowercase, underscores only, e.g., 'welcome_message')"),
42
+ category: z
43
+ .enum(["UTILITY", "MARKETING", "AUTHENTICATION"])
44
+ .describe("Template category for Meta review"),
45
+ language: z.string().describe("Language code (e.g., 'en_US', 'es')"),
46
+ body: z
47
+ .string()
48
+ .describe("Message body text. Use {{1}}, {{2}}, etc. for variables."),
49
+ header: z.string().optional().describe("Optional header text"),
50
+ footer: z.string().optional().describe("Optional footer text"),
51
+ },
52
+ annotations: {
53
+ destructiveHint: false,
54
+ idempotentHint: false,
55
+ },
56
+ }, async ({ agent_id, channel_id, name, category, language, body, header, footer }) => {
57
+ const reqBody = { name, category, language, body };
58
+ if (header)
59
+ reqBody.header = header;
60
+ if (footer)
61
+ reqBody.footer = footer;
62
+ const res = await client.post(`/api/agents/${agent_id}/channels/${channel_id}/templates`, reqBody);
63
+ if (res.error) {
64
+ return {
65
+ isError: true,
66
+ content: [{ type: "text", text: formatError(res.error, res.status) }],
67
+ };
68
+ }
69
+ return {
70
+ content: [
71
+ {
72
+ type: "text",
73
+ text: `WhatsApp template created and submitted for approval.\n\n${JSON.stringify(res.data, null, 2)}`,
74
+ },
75
+ ],
76
+ };
77
+ });
78
+ // --- send_wa_broadcast ---
79
+ server.registerTool("send_wa_broadcast", {
80
+ title: "Send WhatsApp Broadcast",
81
+ description: "Send a template message to contacts via WhatsApp. This sends REAL messages to REAL people. The template must be approved by Meta first. Provide contact_ids for specific contacts, or audience_filter to target by tags/status.",
82
+ inputSchema: {
83
+ agent_id: z.string().describe("The agent's UUID"),
84
+ channel_id: z.string().describe("The WhatsApp channel's UUID"),
85
+ template_id: z.string().describe("The approved template's UUID"),
86
+ contact_ids: z
87
+ .array(z.string())
88
+ .optional()
89
+ .describe("Send to specific contacts by UUID"),
90
+ audience_filter: z
91
+ .object({
92
+ tags: z.array(z.string()).optional().describe("Filter contacts by tags"),
93
+ status: z.string().optional().describe("Filter contacts by status (e.g., 'active')"),
94
+ })
95
+ .optional()
96
+ .describe('Filter contacts by tags/status (e.g., { tags: ["vip"], status: "active" })'),
97
+ variable_mapping: z
98
+ .record(z.string(), z.string())
99
+ .optional()
100
+ .describe('Map template vars to contact fields for personalization (e.g., { "1": "name", "2": "custom_fields.company" })'),
101
+ scheduled_for: z
102
+ .string()
103
+ .optional()
104
+ .describe("ISO datetime to schedule the send (e.g., '2026-04-01T10:00:00Z')"),
105
+ },
106
+ annotations: {
107
+ destructiveHint: false,
108
+ idempotentHint: false,
109
+ openWorldHint: true,
110
+ },
111
+ }, async ({ agent_id, channel_id, template_id, contact_ids, audience_filter, variable_mapping, scheduled_for }) => {
112
+ const body = { template_id };
113
+ if (contact_ids)
114
+ body.contact_ids = contact_ids;
115
+ if (audience_filter)
116
+ body.audience_filter = audience_filter;
117
+ if (variable_mapping)
118
+ body.variable_mapping = variable_mapping;
119
+ if (scheduled_for)
120
+ body.scheduled_for = scheduled_for;
121
+ const res = await client.post(`/api/agents/${agent_id}/channels/${channel_id}/templates/${template_id}/bulk-send`, body);
122
+ if (res.error) {
123
+ return {
124
+ isError: true,
125
+ content: [
126
+ {
127
+ type: "text",
128
+ text: formatError(res.error, res.status, "Verify the template is approved (status: APPROVED) and contacts exist. Provide either contact_ids or audience_filter."),
129
+ },
130
+ ],
131
+ };
132
+ }
133
+ return {
134
+ content: [
135
+ {
136
+ type: "text",
137
+ text: `Broadcast sent successfully.\n\n${JSON.stringify(res.data, null, 2)}`,
138
+ },
139
+ ],
140
+ };
141
+ });
142
+ // --- list_wa_contacts ---
143
+ server.registerTool("list_wa_contacts", {
144
+ title: "List WhatsApp Contacts",
145
+ description: "List contacts for a campaign. Contacts are people you can send WhatsApp messages to.",
146
+ inputSchema: {
147
+ campaign_id: z.string().describe("The campaign's UUID"),
148
+ status: z.string().optional().describe("Filter by contact status"),
149
+ tag: z.string().optional().describe("Filter by tag"),
150
+ limit: z.number().optional().describe("Max contacts to return (default: 50)"),
151
+ offset: z.number().optional().describe("Number of contacts to skip for pagination"),
152
+ },
153
+ annotations: {
154
+ readOnlyHint: true,
155
+ openWorldHint: false,
156
+ },
157
+ }, async ({ campaign_id, status, tag, limit, offset }) => {
158
+ const params = new URLSearchParams();
159
+ if (status)
160
+ params.set("status", status);
161
+ if (tag)
162
+ params.set("tag", tag);
163
+ params.set("limit", String(limit ?? 50));
164
+ if (offset)
165
+ params.set("offset", String(offset));
166
+ const qs = params.toString() ? `?${params.toString()}` : "";
167
+ const res = await client.get(`/api/campaigns/${campaign_id}/contacts${qs}`);
168
+ if (res.error) {
169
+ return {
170
+ isError: true,
171
+ content: [{ type: "text", text: formatError(res.error, res.status) }],
172
+ };
173
+ }
174
+ return {
175
+ content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }],
176
+ };
177
+ });
178
+ // --- import_wa_contacts ---
179
+ server.registerTool("import_wa_contacts", {
180
+ title: "Import WhatsApp Contacts",
181
+ description: "Import contacts into a campaign. Each contact needs at minimum a phone number.",
182
+ inputSchema: {
183
+ campaign_id: z.string().describe("The campaign's UUID"),
184
+ contacts: z
185
+ .array(z.object({
186
+ phone: z.string().describe("Phone number with country code (e.g., '+1234567890')"),
187
+ name: z.string().optional().describe("Contact name"),
188
+ email: z.string().optional().describe("Contact email"),
189
+ tags: z.array(z.string()).optional().describe("Tags for segmentation"),
190
+ }))
191
+ .describe("Array of contacts to import"),
192
+ },
193
+ annotations: {
194
+ destructiveHint: false,
195
+ idempotentHint: false,
196
+ },
197
+ }, async ({ campaign_id, contacts }) => {
198
+ const res = await client.post(`/api/campaigns/${campaign_id}/contacts/ingest`, { contacts });
199
+ if (res.error) {
200
+ return {
201
+ isError: true,
202
+ content: [{ type: "text", text: formatError(res.error, res.status) }],
203
+ };
204
+ }
205
+ return {
206
+ content: [
207
+ {
208
+ type: "text",
209
+ text: `Contacts imported successfully.\n\n${JSON.stringify(res.data, null, 2)}`,
210
+ },
211
+ ],
212
+ };
213
+ });
214
+ // --- create_wa_sequence ---
215
+ server.registerTool("create_wa_sequence", {
216
+ title: "Create WhatsApp Sequence",
217
+ description: "Create a drip campaign sequence with timed sends. Steps execute in order with configurable delays. Sequences start as drafts — use activate_wa_sequence to start sending.",
218
+ inputSchema: {
219
+ campaign_id: z.string().describe("The campaign's UUID"),
220
+ name: z.string().describe("Sequence name"),
221
+ steps: z
222
+ .array(z.object({
223
+ template_id: z
224
+ .string()
225
+ .optional()
226
+ .describe("Template UUID (required for template steps)"),
227
+ delay_hours: z
228
+ .number()
229
+ .describe("Hours to wait before sending this step (0 for immediate)"),
230
+ type: z
231
+ .enum(["template", "text"])
232
+ .optional()
233
+ .describe('Step type: "template" (default) or "text" for free-text messages'),
234
+ text_content: z
235
+ .string()
236
+ .optional()
237
+ .describe("Message text for text steps (max 4096 chars). Only works within 24h of last customer reply."),
238
+ variable_mapping: z
239
+ .record(z.string(), z.string())
240
+ .optional()
241
+ .describe('Map template vars to contact fields (e.g., { "1": "name" })'),
242
+ stop_on_reply: z
243
+ .boolean()
244
+ .optional()
245
+ .describe("Stop sequence if contact replies at this step"),
246
+ }))
247
+ .describe("Ordered array of sequence steps"),
248
+ auto_enroll_on_import: z
249
+ .boolean()
250
+ .optional()
251
+ .describe("Automatically enroll new contacts when they are imported via CSV or API"),
252
+ auto_enroll_on_tags: z
253
+ .array(z.string())
254
+ .optional()
255
+ .describe('Auto-enroll contacts when they receive any of these tags (e.g., ["lead", "interested"])'),
256
+ stop_on_reply: z
257
+ .boolean()
258
+ .optional()
259
+ .describe("Stop the sequence when a contact replies (default: true). Set to false to keep sending regardless of replies."),
260
+ stop_on_tags: z
261
+ .array(z.string())
262
+ .optional()
263
+ .describe('Safety net — automatically remove a contact from this sequence if they get any of these tags (e.g., ["unsubscribed", "purchased"])'),
264
+ },
265
+ annotations: {
266
+ destructiveHint: false,
267
+ idempotentHint: false,
268
+ },
269
+ }, async ({ campaign_id, name, steps, auto_enroll_on_import, auto_enroll_on_tags, stop_on_reply, stop_on_tags }) => {
270
+ // Map snake_case fields to camelCase for the backend
271
+ const mappedSteps = steps.map((step) => {
272
+ const mapped = {
273
+ delayMinutes: step.delay_hours * 60,
274
+ };
275
+ if (step.template_id)
276
+ mapped.templateId = step.template_id;
277
+ if (step.type)
278
+ mapped.type = step.type;
279
+ if (step.text_content)
280
+ mapped.textContent = step.text_content;
281
+ if (step.variable_mapping)
282
+ mapped.variableMapping = step.variable_mapping;
283
+ if (step.stop_on_reply !== undefined)
284
+ mapped.stopOnReply = step.stop_on_reply;
285
+ return mapped;
286
+ });
287
+ const body = { name, steps: mappedSteps };
288
+ // Build auto_enroll object matching backend shape: { on_ingest?: boolean, on_tag?: string[] }
289
+ const autoEnroll = {};
290
+ if (auto_enroll_on_import !== undefined)
291
+ autoEnroll.on_ingest = auto_enroll_on_import;
292
+ if (auto_enroll_on_tags)
293
+ autoEnroll.on_tag = auto_enroll_on_tags;
294
+ if (Object.keys(autoEnroll).length > 0)
295
+ body.auto_enroll = autoEnroll;
296
+ if (stop_on_reply !== undefined)
297
+ body.stop_on_reply = stop_on_reply;
298
+ if (stop_on_tags)
299
+ body.stop_on_tags = stop_on_tags;
300
+ const res = await client.post(`/api/campaigns/${campaign_id}/sequences`, body);
301
+ if (res.error) {
302
+ return {
303
+ isError: true,
304
+ content: [{ type: "text", text: formatError(res.error, res.status) }],
305
+ };
306
+ }
307
+ return {
308
+ content: [
309
+ {
310
+ type: "text",
311
+ text: `Sequence created successfully. Use activate_wa_sequence to start it, then enroll_wa_contacts to add contacts.\n\n${JSON.stringify(res.data, null, 2)}`,
312
+ },
313
+ ],
314
+ };
315
+ });
316
+ // --- activate_wa_sequence ---
317
+ server.registerTool("activate_wa_sequence", {
318
+ title: "Activate WhatsApp Sequence",
319
+ description: "Activate or pause a WhatsApp drip sequence. Sequences start as drafts — activate them to begin sending to enrolled contacts.",
320
+ inputSchema: {
321
+ campaign_id: z.string().describe("The campaign's UUID"),
322
+ sequence_id: z.string().describe("The sequence's UUID"),
323
+ status: z
324
+ .enum(["active", "paused"])
325
+ .describe('Set to "active" to start sending, or "paused" to stop'),
326
+ },
327
+ annotations: {
328
+ destructiveHint: false,
329
+ idempotentHint: true,
330
+ },
331
+ }, async ({ campaign_id, sequence_id, status }) => {
332
+ const res = await client.patch(`/api/campaigns/${campaign_id}/sequences/${sequence_id}`, { status });
333
+ if (res.error) {
334
+ return {
335
+ isError: true,
336
+ content: [{ type: "text", text: formatError(res.error, res.status) }],
337
+ };
338
+ }
339
+ return {
340
+ content: [
341
+ {
342
+ type: "text",
343
+ text: `Sequence ${status === "active" ? "activated" : "paused"} successfully.\n\n${JSON.stringify(res.data, null, 2)}`,
344
+ },
345
+ ],
346
+ };
347
+ });
348
+ // --- enroll_wa_contacts ---
349
+ server.registerTool("enroll_wa_contacts", {
350
+ title: "Enroll Contacts in Sequence",
351
+ description: "Enroll contacts into an active WhatsApp sequence. Provide contact_ids for specific contacts, or filter to enroll by tags/status. The sequence must be active.",
352
+ inputSchema: {
353
+ campaign_id: z.string().describe("The campaign's UUID"),
354
+ sequence_id: z.string().describe("The sequence's UUID"),
355
+ contact_ids: z
356
+ .array(z.string())
357
+ .optional()
358
+ .describe("Specific contact UUIDs to enroll (max 1000)"),
359
+ filter: z
360
+ .object({
361
+ tags: z.array(z.string()).optional().describe("Enroll contacts with these tags"),
362
+ status: z.string().optional().describe("Enroll contacts with this status"),
363
+ })
364
+ .optional()
365
+ .describe("Filter to select contacts for enrollment"),
366
+ },
367
+ annotations: {
368
+ destructiveHint: false,
369
+ idempotentHint: false,
370
+ },
371
+ }, async ({ campaign_id, sequence_id, contact_ids, filter }) => {
372
+ const body = {};
373
+ if (contact_ids)
374
+ body.contactIds = contact_ids;
375
+ if (filter)
376
+ body.filter = filter;
377
+ const res = await client.post(`/api/campaigns/${campaign_id}/sequences/${sequence_id}/enroll`, body);
378
+ if (res.error) {
379
+ return {
380
+ isError: true,
381
+ content: [
382
+ {
383
+ type: "text",
384
+ text: formatError(res.error, res.status, "Make sure the sequence is active (use activate_wa_sequence first) and contacts exist."),
385
+ },
386
+ ],
387
+ };
388
+ }
389
+ return {
390
+ content: [
391
+ {
392
+ type: "text",
393
+ text: `Contacts enrolled in sequence successfully.\n\n${JSON.stringify(res.data, null, 2)}`,
394
+ },
395
+ ],
396
+ };
397
+ });
398
+ }
399
+ //# sourceMappingURL=whatsapp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatsapp.js","sourceRoot":"","sources":["../../src/tools/whatsapp.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,qBAAqB,CACnC,MAAiB,EACjB,MAAwB;IAExB,4BAA4B;IAC5B,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,mGAAmG;QACrG,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YACjD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SAC/D;QACD,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,KAAK;SACrB;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;QACjC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAC1B,eAAe,QAAQ,aAAa,UAAU,YAAY,CAC3D,CAAC;QACF,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YACd,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;aAC/E,CAAC;QACJ,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI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C,CAAC,EAAE;iBAC5F;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,87 @@
1
+ /** Shared types for LaunchPath MCP Server */
2
+ export interface LaunchPathConfig {
3
+ apiKey: string;
4
+ baseUrl: string;
5
+ }
6
+ export interface ApiResponse<T = unknown> {
7
+ data?: T;
8
+ error?: string;
9
+ status: number;
10
+ }
11
+ export interface Agent {
12
+ id: string;
13
+ name: string;
14
+ description: string | null;
15
+ status: "active" | "draft" | "archived";
16
+ model: string;
17
+ template_id: string | null;
18
+ knowledge_enabled: boolean;
19
+ created_at: string;
20
+ updated_at: string;
21
+ _counts?: {
22
+ tools: number;
23
+ knowledge_docs: number;
24
+ channels: number;
25
+ };
26
+ }
27
+ export interface AgentDetail extends Agent {
28
+ system_prompt: string | null;
29
+ personality: string | null;
30
+ greeting: string | null;
31
+ tool_guidelines: string | null;
32
+ user_id: string;
33
+ }
34
+ export interface KnowledgeDocument {
35
+ id: string;
36
+ agent_id: string;
37
+ title: string;
38
+ doc_type: string;
39
+ source_url: string | null;
40
+ status: string;
41
+ chunk_count: number;
42
+ created_at: string;
43
+ }
44
+ export interface Channel {
45
+ id: string;
46
+ agent_id: string;
47
+ channel_type: string;
48
+ name: string;
49
+ is_enabled: boolean;
50
+ allowed_origins: string[] | null;
51
+ rate_limit_rpm: number | null;
52
+ widget_config: Record<string, unknown> | null;
53
+ token: string | null;
54
+ created_at: string;
55
+ }
56
+ export interface Client {
57
+ id: string;
58
+ name: string;
59
+ email: string | null;
60
+ website: string | null;
61
+ logo_url: string | null;
62
+ created_at: string;
63
+ }
64
+ export interface Campaign {
65
+ id: string;
66
+ name: string;
67
+ agent_id: string;
68
+ client_id: string;
69
+ status: string;
70
+ channel_type: string | null;
71
+ created_at: string;
72
+ }
73
+ export interface Conversation {
74
+ id: string;
75
+ agent_id: string;
76
+ channel_id: string | null;
77
+ status: string;
78
+ message_count: number;
79
+ created_at: string;
80
+ updated_at: string;
81
+ }
82
+ export interface ToolsetDefinition {
83
+ name: string;
84
+ description: string;
85
+ isDefault: boolean;
86
+ register: () => void;
87
+ }
package/build/types.js ADDED
@@ -0,0 +1,3 @@
1
+ /** Shared types for LaunchPath MCP Server */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,6CAA6C"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@launchpath-ai/mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "LaunchPath MCP Server — manage AI agents, knowledge bases, deployments, clients, and campaigns from Claude Code",
5
+ "type": "module",
6
+ "bin": {
7
+ "launchpath-mcp": "./build/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "start": "node build/index.js",
12
+ "dev": "tsc --watch"
13
+ },
14
+ "dependencies": {
15
+ "@modelcontextprotocol/sdk": "^1.27.1",
16
+ "zod": "^3.25.0"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^22.0.0",
20
+ "typescript": "^5.8.0"
21
+ },
22
+ "engines": {
23
+ "node": ">=18"
24
+ },
25
+ "keywords": [
26
+ "mcp",
27
+ "model-context-protocol",
28
+ "claude",
29
+ "ai-agents",
30
+ "launchpath"
31
+ ],
32
+ "license": "MIT",
33
+ "files": [
34
+ "build",
35
+ "skills",
36
+ "plugin.json",
37
+ "README.md"
38
+ ],
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/launchpath/mcp-server"
42
+ },
43
+ "homepage": "https://launchpath.ai"
44
+ }
package/plugin.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "launchpath",
3
+ "version": "1.0.0",
4
+ "title": "LaunchPath — AI Agent Deployment",
5
+ "description": "Create, train, deploy, and manage AI agents for businesses — entirely from Claude Code. Build an AI agency from your terminal.",
6
+ "author": "LaunchPath",
7
+ "homepage": "https://launchpath.ai",
8
+ "repository": "https://github.com/launchpath/claude-plugin",
9
+ "mcpServers": {
10
+ "launchpath": {
11
+ "command": "npx",
12
+ "args": ["@launchpath/mcp-server"],
13
+ "env": {
14
+ "LAUNCHPATH_API_KEY": {
15
+ "description": "Your LaunchPath API key. Get it from Settings → API Keys in the LaunchPath dashboard.",
16
+ "required": true
17
+ }
18
+ }
19
+ }
20
+ },
21
+ "skills": [
22
+ "skills/deploy-agent",
23
+ "skills/setup-client",
24
+ "skills/agent-report",
25
+ "skills/launchpath-guide",
26
+ "skills/whatsapp-campaign"
27
+ ]
28
+ }
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: agent-report
3
+ description: Pull a summary of all your LaunchPath agents — status, conversations, deployments, and what needs attention.
4
+ allowed-tools: mcp__launchpath__*
5
+ context: fork
6
+ ---
7
+
8
+ You are generating a report on the user's LaunchPath agents. Follow this workflow:
9
+
10
+ ## Step 1: Gather data
11
+
12
+ 1. Call `list_agents` to get all agents
13
+ 2. Call `enable_toolset("analytics")` to load analytics tools
14
+ 3. For each agent, call `list_channels` to see deployment status
15
+ 4. For agents that are deployed, call `list_conversations` to see recent activity
16
+
17
+ ## Step 2: Build the report
18
+
19
+ Present a structured report with these sections:
20
+
21
+ ### Overview
22
+ - Total agents (active vs draft vs archived)
23
+ - Total deployed channels
24
+ - Total conversations in the last 7 days
25
+
26
+ ### Agent Status Table
27
+ For each agent, show:
28
+ | Agent | Status | Channels | Knowledge Docs | Recent Conversations |
29
+
30
+ ### Needs Attention
31
+ Flag any issues:
32
+ - Agents that are **draft with no recent edits** (may be abandoned)
33
+ - Agents that are **deployed but have zero conversations** (may need promotion)
34
+ - Agents with **no knowledge base** (will give poor responses)
35
+ - Agents with **high human takeover rates** (may need prompt improvements)
36
+
37
+ ### Recommendations
38
+ Suggest concrete next steps:
39
+ - Which agents to activate or archive
40
+ - Which agents need more knowledge
41
+ - Which agents should be tested
42
+ - Growth opportunities (new channels, new clients)
43
+
44
+ Keep the report concise and actionable. Use tables and bullet points, not paragraphs.