@wplaunchify/ml-mcp-server 2.7.9 → 2.7.11
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 +95 -0
- package/package.json +3 -2
|
@@ -95,6 +95,31 @@ const createTemplateSchema = z.object({
|
|
|
95
95
|
email_subject: z.string().optional(),
|
|
96
96
|
design_template: z.enum(['simple', 'plain', 'classic', 'raw_classic', 'raw_html']).optional(),
|
|
97
97
|
});
|
|
98
|
+
// Note / Activity schemas
|
|
99
|
+
const noteTypeSchema = z.enum(['note', 'call', 'email', 'meeting', 'activity']);
|
|
100
|
+
const listNotesSchema = z.object({
|
|
101
|
+
id: z.number(),
|
|
102
|
+
per_page: z.number().optional(),
|
|
103
|
+
page: z.number().optional(),
|
|
104
|
+
type: noteTypeSchema.optional(),
|
|
105
|
+
});
|
|
106
|
+
const createNoteSchema = z.object({
|
|
107
|
+
id: z.number(),
|
|
108
|
+
title: z.string().optional(),
|
|
109
|
+
description: z.string().optional(),
|
|
110
|
+
type: noteTypeSchema.optional(),
|
|
111
|
+
});
|
|
112
|
+
const updateNoteSchema = z.object({
|
|
113
|
+
id: z.number(),
|
|
114
|
+
note_id: z.number(),
|
|
115
|
+
title: z.string().optional(),
|
|
116
|
+
description: z.string().optional(),
|
|
117
|
+
type: noteTypeSchema.optional(),
|
|
118
|
+
});
|
|
119
|
+
const deleteNoteSchema = z.object({
|
|
120
|
+
id: z.number(),
|
|
121
|
+
note_id: z.number(),
|
|
122
|
+
});
|
|
98
123
|
// ==================== TOOL DEFINITIONS ====================
|
|
99
124
|
export const fluentCRMTools = [
|
|
100
125
|
// Contact Management
|
|
@@ -298,6 +323,27 @@ export const fluentCRMTools = [
|
|
|
298
323
|
description: 'Delete a FluentCRM email template',
|
|
299
324
|
inputSchema: { type: 'object', properties: z.object({ id: z.number() }).shape }
|
|
300
325
|
},
|
|
326
|
+
// Contact Notes / Activities
|
|
327
|
+
{
|
|
328
|
+
name: 'fcrm_list_notes',
|
|
329
|
+
description: 'List notes and activities for a FluentCRM contact. Filter by type: note, call, email, meeting, activity.',
|
|
330
|
+
inputSchema: { type: 'object', properties: listNotesSchema.shape }
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: 'fcrm_create_note',
|
|
334
|
+
description: 'Create a note or activity on a FluentCRM contact. Supports HTML in description.',
|
|
335
|
+
inputSchema: { type: 'object', properties: createNoteSchema.shape }
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'fcrm_update_note',
|
|
339
|
+
description: 'Update a note or activity on a FluentCRM contact.',
|
|
340
|
+
inputSchema: { type: 'object', properties: updateNoteSchema.shape }
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: 'fcrm_delete_note',
|
|
344
|
+
description: 'Delete a note or activity from a FluentCRM contact.',
|
|
345
|
+
inputSchema: { type: 'object', properties: deleteNoteSchema.shape }
|
|
346
|
+
},
|
|
301
347
|
];
|
|
302
348
|
// ==================== TOOL HANDLERS ====================
|
|
303
349
|
export const fluentCRMHandlers = {
|
|
@@ -661,4 +707,53 @@ export const fluentCRMHandlers = {
|
|
|
661
707
|
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
662
708
|
}
|
|
663
709
|
},
|
|
710
|
+
// Contact Notes / Activities handlers
|
|
711
|
+
fcrm_list_notes: async (args) => {
|
|
712
|
+
try {
|
|
713
|
+
const params = new URLSearchParams();
|
|
714
|
+
if (args.per_page)
|
|
715
|
+
params.append('per_page', args.per_page);
|
|
716
|
+
if (args.page)
|
|
717
|
+
params.append('page', args.page);
|
|
718
|
+
if (args.type)
|
|
719
|
+
params.append('type', args.type);
|
|
720
|
+
const q = params.toString();
|
|
721
|
+
const path = `fc-manager/v1/fcrm/contacts/${args.id}/notes` + (q ? `?${q}` : '');
|
|
722
|
+
const response = await makeWordPressRequest('GET', path);
|
|
723
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
724
|
+
}
|
|
725
|
+
catch (error) {
|
|
726
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
fcrm_create_note: async (args) => {
|
|
730
|
+
try {
|
|
731
|
+
const { id, ...data } = args;
|
|
732
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/contacts/${id}/notes`, data);
|
|
733
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
734
|
+
}
|
|
735
|
+
catch (error) {
|
|
736
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
fcrm_update_note: async (args) => {
|
|
740
|
+
try {
|
|
741
|
+
const { id, note_id, ...data } = args;
|
|
742
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`, data);
|
|
743
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
744
|
+
}
|
|
745
|
+
catch (error) {
|
|
746
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
fcrm_delete_note: async (args) => {
|
|
750
|
+
try {
|
|
751
|
+
const { id, note_id } = args;
|
|
752
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`);
|
|
753
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
754
|
+
}
|
|
755
|
+
catch (error) {
|
|
756
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
757
|
+
}
|
|
758
|
+
},
|
|
664
759
|
};
|
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.11",
|
|
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",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"start": "node ./build/server.js",
|
|
17
17
|
"dev": "tsx watch src/server.ts",
|
|
18
18
|
"clean": "rimraf build",
|
|
19
|
-
"prepare": "npm run build"
|
|
19
|
+
"prepare": "npm run build",
|
|
20
|
+
"release": "node ./scripts/npm-with-token.mjs publish"
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
22
23
|
"wordpress",
|