@wplaunchify/ml-mcp-server 2.7.8 → 2.7.9
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/build/tools/fluent-crm.js +62 -1
- package/package.json +1 -1
|
@@ -74,6 +74,15 @@ const createCampaignSchema = z.object({
|
|
|
74
74
|
status: z.enum(['draft', 'scheduled']).optional(),
|
|
75
75
|
scheduled_at: z.string().optional(),
|
|
76
76
|
});
|
|
77
|
+
const campaignIdSchema = z.object({ id: z.number() });
|
|
78
|
+
const campaignLinksSchema = z.object({
|
|
79
|
+
id: z.number(),
|
|
80
|
+
limit: z.number().int().positive().optional(),
|
|
81
|
+
});
|
|
82
|
+
const campaignClickersSchema = z.object({
|
|
83
|
+
id: z.number(),
|
|
84
|
+
include_contact: z.boolean().optional(),
|
|
85
|
+
});
|
|
77
86
|
// Template schemas
|
|
78
87
|
const listTemplatesSchema = z.object({
|
|
79
88
|
page: z.number().optional(),
|
|
@@ -227,7 +236,22 @@ export const fluentCRMTools = [
|
|
|
227
236
|
{
|
|
228
237
|
name: 'fcrm_get_campaign',
|
|
229
238
|
description: 'Get a specific FluentCRM campaign by ID',
|
|
230
|
-
inputSchema: { type: 'object', properties:
|
|
239
|
+
inputSchema: { type: 'object', properties: campaignIdSchema.shape }
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'fcrm_get_campaign_stats',
|
|
243
|
+
description: 'Get FluentCRM campaign analytics: sends, opens, clicks, rates, unsubscribes (requires FluentMCP REST route fc-manager/v1/fcrm/campaigns/{id}/stats)',
|
|
244
|
+
inputSchema: { type: 'object', properties: campaignIdSchema.shape }
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: 'fcrm_get_campaign_links',
|
|
248
|
+
description: 'Get per-link unique click counts for a FluentCRM campaign (optional limit; default 50 on server; requires FluentMCP route .../campaigns/{id}/links)',
|
|
249
|
+
inputSchema: { type: 'object', properties: campaignLinksSchema.shape }
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: 'fcrm_get_campaign_clickers',
|
|
253
|
+
description: 'List subscribers who clicked links in a campaign; set include_contact true for email and names (requires FluentMCP route .../campaigns/{id}/clickers)',
|
|
254
|
+
inputSchema: { type: 'object', properties: campaignClickersSchema.shape }
|
|
231
255
|
},
|
|
232
256
|
{
|
|
233
257
|
name: 'fcrm_create_campaign',
|
|
@@ -546,6 +570,43 @@ export const fluentCRMHandlers = {
|
|
|
546
570
|
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
547
571
|
}
|
|
548
572
|
},
|
|
573
|
+
fcrm_get_campaign_stats: async (args) => {
|
|
574
|
+
try {
|
|
575
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/campaigns/${args.id}/stats`);
|
|
576
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
577
|
+
}
|
|
578
|
+
catch (error) {
|
|
579
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
fcrm_get_campaign_links: async (args) => {
|
|
583
|
+
try {
|
|
584
|
+
const params = new URLSearchParams();
|
|
585
|
+
if (args.limit != null)
|
|
586
|
+
params.append('limit', String(args.limit));
|
|
587
|
+
const q = params.toString();
|
|
588
|
+
const path = `fc-manager/v1/fcrm/campaigns/${args.id}/links` + (q ? `?${q}` : '');
|
|
589
|
+
const response = await makeWordPressRequest('GET', path);
|
|
590
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
591
|
+
}
|
|
592
|
+
catch (error) {
|
|
593
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
fcrm_get_campaign_clickers: async (args) => {
|
|
597
|
+
try {
|
|
598
|
+
const params = new URLSearchParams();
|
|
599
|
+
if (args.include_contact === true)
|
|
600
|
+
params.append('include_contact', 'true');
|
|
601
|
+
const q = params.toString();
|
|
602
|
+
const path = `fc-manager/v1/fcrm/campaigns/${args.id}/clickers` + (q ? `?${q}` : '');
|
|
603
|
+
const response = await makeWordPressRequest('GET', path);
|
|
604
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
605
|
+
}
|
|
606
|
+
catch (error) {
|
|
607
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
608
|
+
}
|
|
609
|
+
},
|
|
549
610
|
// Template handlers
|
|
550
611
|
fcrm_list_templates: async (args) => {
|
|
551
612
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wplaunchify/ml-mcp-server",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.9",
|
|
4
4
|
"description": "Universal MCP Server for WordPress + Fluent Suite (Community, CRM, Cart) + FluentMCP Pro. Comprehensive tools for AI-powered WordPress management via Claude, Cursor, and other MCP clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/server.js",
|