@wplaunchify/ml-mcp-server 2.7.12 → 2.7.13

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.
@@ -1,6 +1,23 @@
1
1
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
2
  export declare const debugTools: Tool[];
3
3
  export declare const debugHandlers: {
4
+ fmcp_get_site_context: () => Promise<{
5
+ toolResult: {
6
+ content: {
7
+ type: string;
8
+ text: string;
9
+ }[];
10
+ isError?: undefined;
11
+ };
12
+ } | {
13
+ toolResult: {
14
+ isError: boolean;
15
+ content: {
16
+ type: string;
17
+ text: string;
18
+ }[];
19
+ };
20
+ }>;
4
21
  debug_options: (args: any) => Promise<{
5
22
  toolResult: {
6
23
  content: {
@@ -7,8 +7,14 @@ import { z } from 'zod';
7
7
  // Zod Schema Definitions
8
8
  const debugOptionsSchema = z.object({});
9
9
  const debugFluentCRMSchema = z.object({});
10
+ const siteContextSchema = z.object({});
10
11
  // Tool Definitions
11
12
  export const debugTools = [
13
+ {
14
+ name: 'fmcp_get_site_context',
15
+ description: 'Site-wide FluentMCP context: installed products, versions, counts, ENABLED_TOOLS categories, discovery URLs. Call first on a new site.',
16
+ inputSchema: { type: 'object', properties: siteContextSchema.shape }
17
+ },
12
18
  {
13
19
  name: 'debug_options',
14
20
  description: 'Debug endpoint to find FluentCommunity option names and values',
@@ -22,6 +28,15 @@ export const debugTools = [
22
28
  ];
23
29
  // Tool Handlers
24
30
  export const debugHandlers = {
31
+ fmcp_get_site_context: async () => {
32
+ try {
33
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/mcp/site-context');
34
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
35
+ }
36
+ catch (error) {
37
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
38
+ }
39
+ },
25
40
  debug_options: async (args) => {
26
41
  try {
27
42
  const response = await makeWordPressRequest('GET', 'fc-manager/v1/debug/options');
@@ -344,6 +344,16 @@ export const fluentCRMTools = [
344
344
  description: 'Delete a note or activity from a FluentCRM contact.',
345
345
  inputSchema: { type: 'object', properties: deleteNoteSchema.shape }
346
346
  },
347
+ {
348
+ name: 'fcrm_get_crm_context',
349
+ description: 'FluentCRM context: versions, counts, contact statuses, note types, custom fields schema, canonical /fcrm endpoints.',
350
+ inputSchema: { type: 'object', properties: z.object({}).shape }
351
+ },
352
+ {
353
+ name: 'fcrm_estimate_contacts',
354
+ description: 'Count FluentCRM contacts matching filters without loading full list (same filters as fcrm_list_contacts).',
355
+ inputSchema: { type: 'object', properties: listContactsSchema.shape }
356
+ },
347
357
  ];
348
358
  // ==================== TOOL HANDLERS ====================
349
359
  export const fluentCRMHandlers = {
@@ -748,8 +758,33 @@ export const fluentCRMHandlers = {
748
758
  },
749
759
  fcrm_delete_note: async (args) => {
750
760
  try {
751
- const { id, note_id } = args;
752
- const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`);
761
+ const { id, note_id, ...rest } = args;
762
+ const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`, rest);
763
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
764
+ }
765
+ catch (error) {
766
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
767
+ }
768
+ },
769
+ fcrm_get_crm_context: async () => {
770
+ try {
771
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcrm/context');
772
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
773
+ }
774
+ catch (error) {
775
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
776
+ }
777
+ },
778
+ fcrm_estimate_contacts: async (args) => {
779
+ try {
780
+ const params = new URLSearchParams();
781
+ if (args.search)
782
+ params.append('search', args.search);
783
+ if (args.status)
784
+ params.append('status', args.status);
785
+ const q = params.toString();
786
+ const path = 'fc-manager/v1/fcrm/contacts/estimate' + (q ? `?${q}` : '');
787
+ const response = await makeWordPressRequest('GET', path);
753
788
  return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
754
789
  }
755
790
  catch (error) {
@@ -40,6 +40,7 @@ const toolCategories = {
40
40
  ...mlImageEditorTools, // AI image generation via ML Image Editor
41
41
  ...mlMediaHubTools, // Image search & icon import via ML Media Hub P2P
42
42
  ...mlSocialTools, // Social media publishing via ML Social
43
+ ...debugTools, // fmcp_get_site_context (v2.7.0)
43
44
  ...fluentMcpProTools // FluentMCP Pro (WooCommerce, file system, database, etc.)
44
45
  ],
45
46
  // Full FluentCommunity (91 tools) - legacy support
@@ -97,6 +98,7 @@ const handlerCategories = {
97
98
  ...mlImageEditorHandlers, // AI image generation
98
99
  ...mlMediaHubHandlers, // Image search & icon import
99
100
  ...mlSocialHandlers, // Social media publishing
101
+ ...debugHandlers, // fmcp_get_site_context
100
102
  ...fluentMcpProHandlers // FluentMCP Pro (WooCommerce, file system, database, etc.)
101
103
  },
102
104
  fluentcommunity: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "2.7.12",
3
+ "version": "2.7.13",
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",