@wplaunchify/ml-mcp-server 1.0.2 → 1.0.3
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-cart.js +31 -31
- package/build/tools/fluent-crm.js +21 -21
- package/package.json +1 -1
|
@@ -306,7 +306,7 @@ export const fluentCartHandlers = {
|
|
|
306
306
|
params.append('status', args.status);
|
|
307
307
|
if (args.category)
|
|
308
308
|
params.append('category', args.category);
|
|
309
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
309
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/products?${params}`);
|
|
310
310
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
311
311
|
}
|
|
312
312
|
catch (error) {
|
|
@@ -315,7 +315,7 @@ export const fluentCartHandlers = {
|
|
|
315
315
|
},
|
|
316
316
|
fcart_get_product: async (args) => {
|
|
317
317
|
try {
|
|
318
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
318
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/products/${args.product_id}`);
|
|
319
319
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
320
320
|
}
|
|
321
321
|
catch (error) {
|
|
@@ -324,7 +324,7 @@ export const fluentCartHandlers = {
|
|
|
324
324
|
},
|
|
325
325
|
fcart_create_product: async (args) => {
|
|
326
326
|
try {
|
|
327
|
-
const response = await makeWordPressRequest('POST', 'fc-manager/v1/
|
|
327
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcart/products', args);
|
|
328
328
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
329
329
|
}
|
|
330
330
|
catch (error) {
|
|
@@ -334,7 +334,7 @@ export const fluentCartHandlers = {
|
|
|
334
334
|
fcart_update_product: async (args) => {
|
|
335
335
|
try {
|
|
336
336
|
const { product_id, ...data } = args;
|
|
337
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
337
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/products/${product_id}`, data);
|
|
338
338
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
339
339
|
}
|
|
340
340
|
catch (error) {
|
|
@@ -344,7 +344,7 @@ export const fluentCartHandlers = {
|
|
|
344
344
|
fcart_delete_product: async (args) => {
|
|
345
345
|
try {
|
|
346
346
|
const params = args.force ? '?force=true' : '';
|
|
347
|
-
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/
|
|
347
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcart/products/${args.product_id}${params}`);
|
|
348
348
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
349
349
|
}
|
|
350
350
|
catch (error) {
|
|
@@ -354,7 +354,7 @@ export const fluentCartHandlers = {
|
|
|
354
354
|
fcart_update_product_pricing: async (args) => {
|
|
355
355
|
try {
|
|
356
356
|
const { product_id, ...data } = args;
|
|
357
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
357
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/products/${product_id}/pricing`, data);
|
|
358
358
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
359
359
|
}
|
|
360
360
|
catch (error) {
|
|
@@ -363,7 +363,7 @@ export const fluentCartHandlers = {
|
|
|
363
363
|
},
|
|
364
364
|
fcart_get_product_thumbnail: async (args) => {
|
|
365
365
|
try {
|
|
366
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
366
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/products/${args.variant_id}/thumbnail`);
|
|
367
367
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
368
368
|
}
|
|
369
369
|
catch (error) {
|
|
@@ -373,7 +373,7 @@ export const fluentCartHandlers = {
|
|
|
373
373
|
fcart_set_product_thumbnail: async (args) => {
|
|
374
374
|
try {
|
|
375
375
|
const { variant_id, ...data } = args;
|
|
376
|
-
const response = await makeWordPressRequest('POST', `fc-manager/v1/
|
|
376
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcart/products/${variant_id}/thumbnail`, data);
|
|
377
377
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
378
378
|
}
|
|
379
379
|
catch (error) {
|
|
@@ -396,7 +396,7 @@ export const fluentCartHandlers = {
|
|
|
396
396
|
params.append('date_from', args.date_from);
|
|
397
397
|
if (args.date_to)
|
|
398
398
|
params.append('date_to', args.date_to);
|
|
399
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
399
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/orders?${params}`);
|
|
400
400
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
401
401
|
}
|
|
402
402
|
catch (error) {
|
|
@@ -405,7 +405,7 @@ export const fluentCartHandlers = {
|
|
|
405
405
|
},
|
|
406
406
|
fcart_get_order: async (args) => {
|
|
407
407
|
try {
|
|
408
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
408
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/orders/${args.order_id}`);
|
|
409
409
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
410
410
|
}
|
|
411
411
|
catch (error) {
|
|
@@ -414,7 +414,7 @@ export const fluentCartHandlers = {
|
|
|
414
414
|
},
|
|
415
415
|
fcart_create_order: async (args) => {
|
|
416
416
|
try {
|
|
417
|
-
const response = await makeWordPressRequest('POST', 'fc-manager/v1/
|
|
417
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcart/orders', args);
|
|
418
418
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
419
419
|
}
|
|
420
420
|
catch (error) {
|
|
@@ -424,7 +424,7 @@ export const fluentCartHandlers = {
|
|
|
424
424
|
fcart_update_order: async (args) => {
|
|
425
425
|
try {
|
|
426
426
|
const { order_id, ...data } = args;
|
|
427
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
427
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/orders/${order_id}`, data);
|
|
428
428
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
429
429
|
}
|
|
430
430
|
catch (error) {
|
|
@@ -433,7 +433,7 @@ export const fluentCartHandlers = {
|
|
|
433
433
|
},
|
|
434
434
|
fcart_mark_order_paid: async (args) => {
|
|
435
435
|
try {
|
|
436
|
-
const response = await makeWordPressRequest('POST', `fc-manager/v1/
|
|
436
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcart/orders/${args.order_id}/mark-paid`);
|
|
437
437
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
438
438
|
}
|
|
439
439
|
catch (error) {
|
|
@@ -443,7 +443,7 @@ export const fluentCartHandlers = {
|
|
|
443
443
|
fcart_refund_order: async (args) => {
|
|
444
444
|
try {
|
|
445
445
|
const { order_id, ...data } = args;
|
|
446
|
-
const response = await makeWordPressRequest('POST', `fc-manager/v1/
|
|
446
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcart/orders/${order_id}/refund`, data);
|
|
447
447
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
448
448
|
}
|
|
449
449
|
catch (error) {
|
|
@@ -452,7 +452,7 @@ export const fluentCartHandlers = {
|
|
|
452
452
|
},
|
|
453
453
|
fcart_update_order_statuses: async (args) => {
|
|
454
454
|
try {
|
|
455
|
-
const response = await makeWordPressRequest('PUT', 'fc-manager/v1/
|
|
455
|
+
const response = await makeWordPressRequest('PUT', 'fc-manager/v1/fcart/orders/update-statuses', args);
|
|
456
456
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
457
457
|
}
|
|
458
458
|
catch (error) {
|
|
@@ -461,7 +461,7 @@ export const fluentCartHandlers = {
|
|
|
461
461
|
},
|
|
462
462
|
fcart_delete_order: async (args) => {
|
|
463
463
|
try {
|
|
464
|
-
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/
|
|
464
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcart/orders/${args.order_id}/delete`);
|
|
465
465
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
466
466
|
}
|
|
467
467
|
catch (error) {
|
|
@@ -478,7 +478,7 @@ export const fluentCartHandlers = {
|
|
|
478
478
|
params.append('per_page', args.per_page);
|
|
479
479
|
if (args.search)
|
|
480
480
|
params.append('search', args.search);
|
|
481
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
481
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/customers?${params}`);
|
|
482
482
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
483
483
|
}
|
|
484
484
|
catch (error) {
|
|
@@ -487,7 +487,7 @@ export const fluentCartHandlers = {
|
|
|
487
487
|
},
|
|
488
488
|
fcart_get_customer: async (args) => {
|
|
489
489
|
try {
|
|
490
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
490
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/customers/${args.customer_id}`);
|
|
491
491
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
492
492
|
}
|
|
493
493
|
catch (error) {
|
|
@@ -496,7 +496,7 @@ export const fluentCartHandlers = {
|
|
|
496
496
|
},
|
|
497
497
|
fcart_create_customer: async (args) => {
|
|
498
498
|
try {
|
|
499
|
-
const response = await makeWordPressRequest('POST', 'fc-manager/v1/
|
|
499
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcart/customers', args);
|
|
500
500
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
501
501
|
}
|
|
502
502
|
catch (error) {
|
|
@@ -506,7 +506,7 @@ export const fluentCartHandlers = {
|
|
|
506
506
|
fcart_update_customer: async (args) => {
|
|
507
507
|
try {
|
|
508
508
|
const { customer_id, ...data } = args;
|
|
509
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
509
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/customers/${customer_id}`, data);
|
|
510
510
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
511
511
|
}
|
|
512
512
|
catch (error) {
|
|
@@ -523,7 +523,7 @@ export const fluentCartHandlers = {
|
|
|
523
523
|
params.append('per_page', args.per_page);
|
|
524
524
|
if (args.status)
|
|
525
525
|
params.append('status', args.status);
|
|
526
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
526
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/coupons?${params}`);
|
|
527
527
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
528
528
|
}
|
|
529
529
|
catch (error) {
|
|
@@ -532,7 +532,7 @@ export const fluentCartHandlers = {
|
|
|
532
532
|
},
|
|
533
533
|
fcart_create_coupon: async (args) => {
|
|
534
534
|
try {
|
|
535
|
-
const response = await makeWordPressRequest('POST', 'fc-manager/v1/
|
|
535
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcart/coupons', args);
|
|
536
536
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
537
537
|
}
|
|
538
538
|
catch (error) {
|
|
@@ -542,7 +542,7 @@ export const fluentCartHandlers = {
|
|
|
542
542
|
fcart_update_coupon: async (args) => {
|
|
543
543
|
try {
|
|
544
544
|
const { coupon_id, ...data } = args;
|
|
545
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
545
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/coupons/${coupon_id}`, data);
|
|
546
546
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
547
547
|
}
|
|
548
548
|
catch (error) {
|
|
@@ -551,7 +551,7 @@ export const fluentCartHandlers = {
|
|
|
551
551
|
},
|
|
552
552
|
fcart_delete_coupon: async (args) => {
|
|
553
553
|
try {
|
|
554
|
-
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/
|
|
554
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcart/coupons/${args.coupon_id}`);
|
|
555
555
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
556
556
|
}
|
|
557
557
|
catch (error) {
|
|
@@ -560,7 +560,7 @@ export const fluentCartHandlers = {
|
|
|
560
560
|
},
|
|
561
561
|
fcart_get_coupon: async (args) => {
|
|
562
562
|
try {
|
|
563
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
563
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/coupons/${args.coupon_id}`);
|
|
564
564
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
565
565
|
}
|
|
566
566
|
catch (error) {
|
|
@@ -569,7 +569,7 @@ export const fluentCartHandlers = {
|
|
|
569
569
|
},
|
|
570
570
|
fcart_apply_coupon: async (args) => {
|
|
571
571
|
try {
|
|
572
|
-
const response = await makeWordPressRequest('POST', 'fc-manager/v1/
|
|
572
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcart/coupons/apply', args);
|
|
573
573
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
574
574
|
}
|
|
575
575
|
catch (error) {
|
|
@@ -588,7 +588,7 @@ export const fluentCartHandlers = {
|
|
|
588
588
|
params.append('status', args.status);
|
|
589
589
|
if (args.customer_id)
|
|
590
590
|
params.append('customer_id', args.customer_id);
|
|
591
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
591
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/subscriptions?${params}`);
|
|
592
592
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
593
593
|
}
|
|
594
594
|
catch (error) {
|
|
@@ -597,7 +597,7 @@ export const fluentCartHandlers = {
|
|
|
597
597
|
},
|
|
598
598
|
fcart_get_subscription: async (args) => {
|
|
599
599
|
try {
|
|
600
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
600
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/subscriptions/${args.subscription_id}`);
|
|
601
601
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
602
602
|
}
|
|
603
603
|
catch (error) {
|
|
@@ -606,7 +606,7 @@ export const fluentCartHandlers = {
|
|
|
606
606
|
},
|
|
607
607
|
fcart_cancel_subscription: async (args) => {
|
|
608
608
|
try {
|
|
609
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
609
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/subscriptions/${args.subscription_id}/cancel`);
|
|
610
610
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
611
611
|
}
|
|
612
612
|
catch (error) {
|
|
@@ -615,7 +615,7 @@ export const fluentCartHandlers = {
|
|
|
615
615
|
},
|
|
616
616
|
fcart_reactivate_subscription: async (args) => {
|
|
617
617
|
try {
|
|
618
|
-
const response = await makeWordPressRequest('PUT', `fc-manager/v1/
|
|
618
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcart/subscriptions/${args.subscription_id}/reactivate`);
|
|
619
619
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
620
620
|
}
|
|
621
621
|
catch (error) {
|
|
@@ -632,7 +632,7 @@ export const fluentCartHandlers = {
|
|
|
632
632
|
params.append('date_to', args.date_to);
|
|
633
633
|
if (args.metrics)
|
|
634
634
|
params.append('metrics', args.metrics.join(','));
|
|
635
|
-
const response = await makeWordPressRequest('GET', `fc-manager/v1/
|
|
635
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/analytics?${params}`);
|
|
636
636
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
637
637
|
}
|
|
638
638
|
catch (error) {
|
|
@@ -2,8 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { makeWordPressRequest } from '../wordpress.js';
|
|
3
3
|
/**
|
|
4
4
|
* FluentCRM Tools - Email Marketing & CRM
|
|
5
|
-
* Uses
|
|
6
|
-
*
|
|
5
|
+
* Uses FluentMCP wrapper API at /fc-manager/v1/fcrm/
|
|
6
|
+
* Proxies to FluentCRM's database via WordPress plugin
|
|
7
7
|
*/
|
|
8
8
|
// ==================== ZOD SCHEMA DEFINITIONS ====================
|
|
9
9
|
// Contact schemas
|
|
@@ -192,7 +192,7 @@ export const fluentCRMHandlers = {
|
|
|
192
192
|
params.append('search', args.search);
|
|
193
193
|
if (args.status)
|
|
194
194
|
params.append('status', args.status);
|
|
195
|
-
const response = await makeWordPressRequest('GET', `
|
|
195
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/contacts?${params}`);
|
|
196
196
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
197
197
|
}
|
|
198
198
|
catch (error) {
|
|
@@ -201,7 +201,7 @@ export const fluentCRMHandlers = {
|
|
|
201
201
|
},
|
|
202
202
|
fcrm_get_contact: async (args) => {
|
|
203
203
|
try {
|
|
204
|
-
const response = await makeWordPressRequest('GET', `
|
|
204
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/contacts/${args.id}`);
|
|
205
205
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
206
206
|
}
|
|
207
207
|
catch (error) {
|
|
@@ -210,7 +210,7 @@ export const fluentCRMHandlers = {
|
|
|
210
210
|
},
|
|
211
211
|
fcrm_create_contact: async (args) => {
|
|
212
212
|
try {
|
|
213
|
-
const response = await makeWordPressRequest('POST', '
|
|
213
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/contacts', args);
|
|
214
214
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
215
215
|
}
|
|
216
216
|
catch (error) {
|
|
@@ -220,7 +220,7 @@ export const fluentCRMHandlers = {
|
|
|
220
220
|
fcrm_update_contact: async (args) => {
|
|
221
221
|
try {
|
|
222
222
|
const { id, ...data } = args;
|
|
223
|
-
const response = await makeWordPressRequest('PUT', `
|
|
223
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/contacts/${id}`, data);
|
|
224
224
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
225
225
|
}
|
|
226
226
|
catch (error) {
|
|
@@ -229,7 +229,7 @@ export const fluentCRMHandlers = {
|
|
|
229
229
|
},
|
|
230
230
|
fcrm_delete_contact: async (args) => {
|
|
231
231
|
try {
|
|
232
|
-
const response = await makeWordPressRequest('DELETE', `
|
|
232
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${args.id}`);
|
|
233
233
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
234
234
|
}
|
|
235
235
|
catch (error) {
|
|
@@ -246,7 +246,7 @@ export const fluentCRMHandlers = {
|
|
|
246
246
|
params.append('per_page', args.per_page);
|
|
247
247
|
if (args.search)
|
|
248
248
|
params.append('search', args.search);
|
|
249
|
-
const response = await makeWordPressRequest('GET', `
|
|
249
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/lists?${params}`);
|
|
250
250
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
251
251
|
}
|
|
252
252
|
catch (error) {
|
|
@@ -255,7 +255,7 @@ export const fluentCRMHandlers = {
|
|
|
255
255
|
},
|
|
256
256
|
fcrm_get_list: async (args) => {
|
|
257
257
|
try {
|
|
258
|
-
const response = await makeWordPressRequest('GET', `
|
|
258
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/lists/${args.id}`);
|
|
259
259
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
260
260
|
}
|
|
261
261
|
catch (error) {
|
|
@@ -264,7 +264,7 @@ export const fluentCRMHandlers = {
|
|
|
264
264
|
},
|
|
265
265
|
fcrm_create_list: async (args) => {
|
|
266
266
|
try {
|
|
267
|
-
const response = await makeWordPressRequest('POST', '
|
|
267
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/lists', args);
|
|
268
268
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
269
269
|
}
|
|
270
270
|
catch (error) {
|
|
@@ -274,7 +274,7 @@ export const fluentCRMHandlers = {
|
|
|
274
274
|
fcrm_update_list: async (args) => {
|
|
275
275
|
try {
|
|
276
276
|
const { id, ...data } = args;
|
|
277
|
-
const response = await makeWordPressRequest('PUT', `
|
|
277
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/lists/${id}`, data);
|
|
278
278
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
279
279
|
}
|
|
280
280
|
catch (error) {
|
|
@@ -283,7 +283,7 @@ export const fluentCRMHandlers = {
|
|
|
283
283
|
},
|
|
284
284
|
fcrm_delete_list: async (args) => {
|
|
285
285
|
try {
|
|
286
|
-
const response = await makeWordPressRequest('DELETE', `
|
|
286
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/lists/${args.id}`);
|
|
287
287
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
288
288
|
}
|
|
289
289
|
catch (error) {
|
|
@@ -300,7 +300,7 @@ export const fluentCRMHandlers = {
|
|
|
300
300
|
params.append('per_page', args.per_page);
|
|
301
301
|
if (args.search)
|
|
302
302
|
params.append('search', args.search);
|
|
303
|
-
const response = await makeWordPressRequest('GET', `
|
|
303
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/tags?${params}`);
|
|
304
304
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
305
305
|
}
|
|
306
306
|
catch (error) {
|
|
@@ -309,7 +309,7 @@ export const fluentCRMHandlers = {
|
|
|
309
309
|
},
|
|
310
310
|
fcrm_get_tag: async (args) => {
|
|
311
311
|
try {
|
|
312
|
-
const response = await makeWordPressRequest('GET', `
|
|
312
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/tags/${args.id}`);
|
|
313
313
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
314
314
|
}
|
|
315
315
|
catch (error) {
|
|
@@ -318,7 +318,7 @@ export const fluentCRMHandlers = {
|
|
|
318
318
|
},
|
|
319
319
|
fcrm_create_tag: async (args) => {
|
|
320
320
|
try {
|
|
321
|
-
const response = await makeWordPressRequest('POST', '
|
|
321
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/tags', args);
|
|
322
322
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
323
323
|
}
|
|
324
324
|
catch (error) {
|
|
@@ -328,7 +328,7 @@ export const fluentCRMHandlers = {
|
|
|
328
328
|
fcrm_update_tag: async (args) => {
|
|
329
329
|
try {
|
|
330
330
|
const { id, ...data } = args;
|
|
331
|
-
const response = await makeWordPressRequest('PUT', `
|
|
331
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/tags/${id}`, data);
|
|
332
332
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
333
333
|
}
|
|
334
334
|
catch (error) {
|
|
@@ -337,7 +337,7 @@ export const fluentCRMHandlers = {
|
|
|
337
337
|
},
|
|
338
338
|
fcrm_delete_tag: async (args) => {
|
|
339
339
|
try {
|
|
340
|
-
const response = await makeWordPressRequest('DELETE', `
|
|
340
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/tags/${args.id}`);
|
|
341
341
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
342
342
|
}
|
|
343
343
|
catch (error) {
|
|
@@ -354,7 +354,7 @@ export const fluentCRMHandlers = {
|
|
|
354
354
|
params.append('per_page', args.per_page);
|
|
355
355
|
if (args.status)
|
|
356
356
|
params.append('status', args.status);
|
|
357
|
-
const response = await makeWordPressRequest('GET', `
|
|
357
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/campaigns?${params}`);
|
|
358
358
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
359
359
|
}
|
|
360
360
|
catch (error) {
|
|
@@ -363,7 +363,7 @@ export const fluentCRMHandlers = {
|
|
|
363
363
|
},
|
|
364
364
|
fcrm_get_campaign: async (args) => {
|
|
365
365
|
try {
|
|
366
|
-
const response = await makeWordPressRequest('GET', `
|
|
366
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/campaigns/${args.id}`);
|
|
367
367
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
368
368
|
}
|
|
369
369
|
catch (error) {
|
|
@@ -372,7 +372,7 @@ export const fluentCRMHandlers = {
|
|
|
372
372
|
},
|
|
373
373
|
fcrm_create_campaign: async (args) => {
|
|
374
374
|
try {
|
|
375
|
-
const response = await makeWordPressRequest('POST', '
|
|
375
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/campaigns', args);
|
|
376
376
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
377
377
|
}
|
|
378
378
|
catch (error) {
|
|
@@ -382,7 +382,7 @@ export const fluentCRMHandlers = {
|
|
|
382
382
|
fcrm_send_campaign: async (args) => {
|
|
383
383
|
try {
|
|
384
384
|
const { id, ...data } = args;
|
|
385
|
-
const response = await makeWordPressRequest('
|
|
385
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/campaigns/${id}`, data);
|
|
386
386
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
387
387
|
}
|
|
388
388
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wplaunchify/ml-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Universal MCP Server for WordPress + Fluent Suite (Community, CRM, Cart) + MinuteLaunch Plugins. 146 tools for AI-powered WordPress management via Claude, Cursor, and other MCP clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/server.js",
|