@wplaunchify/ml-mcp-server 2.7.11 → 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: {
@@ -8,10 +8,12 @@ export declare const mlCanvasTools: ({
8
8
  title: z.ZodString;
9
9
  html: z.ZodOptional<z.ZodString>;
10
10
  css: z.ZodOptional<z.ZodString>;
11
+ post_type: z.ZodOptional<z.ZodEnum<["page", "post"]>>;
11
12
  hideHeader: z.ZodOptional<z.ZodBoolean>;
12
13
  hideFooter: z.ZodOptional<z.ZodBoolean>;
13
14
  canvasMode: z.ZodOptional<z.ZodBoolean>;
14
15
  hideTitle: z.ZodOptional<z.ZodBoolean>;
16
+ dequeueKadenceGlobal: z.ZodOptional<z.ZodBoolean>;
15
17
  status: z.ZodOptional<z.ZodEnum<["draft", "publish"]>>;
16
18
  };
17
19
  };
@@ -26,6 +28,7 @@ export declare const mlCanvasTools: ({
26
28
  replace_html: z.ZodOptional<z.ZodString>;
27
29
  find_css: z.ZodOptional<z.ZodString>;
28
30
  replace_css: z.ZodOptional<z.ZodString>;
31
+ dequeueKadenceGlobal: z.ZodOptional<z.ZodBoolean>;
29
32
  };
30
33
  };
31
34
  } | {
@@ -4,27 +4,30 @@ import { makeWordPressRequest } from '../wordpress.js';
4
4
  export const mlCanvasTools = [
5
5
  {
6
6
  name: 'mlcanvas_create_page',
7
- description: 'Create a custom HTML/CSS page using ML Canvas Block. Perfect for landing pages, full-width designs, and custom layouts. No block recovery needed!',
7
+ description: 'Create a custom HTML/CSS page using ML Canvas Block. IMPORTANT CSS RULES: (1) Do NOT generate <html> or <body> tags - start at your wrapper div. (2) Set backgrounds on .container (or your own class), NEVER on body. (3) Use class-based selectors (.hero h1) not bare elements (h1). For full custom pages, set hideHeader, hideFooter, hideTitle, canvasMode, and dequeueKadenceGlobal all to true.',
8
8
  inputSchema: { type: 'object', properties: z.object({
9
9
  title: z.string().describe('Page title (required)'),
10
- html: z.string().optional().describe('Custom HTML content'),
11
- css: z.string().optional().describe('Custom CSS styles'),
10
+ html: z.string().optional().describe('Custom HTML content. Start with a wrapper div like <div class="container">. Do NOT include <html> or <body> tags.'),
11
+ css: z.string().optional().describe('Custom CSS styles. Target .container for page backgrounds, NOT body. Use class-based selectors for headings.'),
12
+ post_type: z.enum(['page', 'post']).optional().describe('Content type: page (default) or post'),
12
13
  hideHeader: z.boolean().optional().describe('Hide site header'),
13
14
  hideFooter: z.boolean().optional().describe('Hide site footer'),
14
15
  canvasMode: z.boolean().optional().describe('Full-width canvas mode (100% width, zero padding)'),
15
16
  hideTitle: z.boolean().optional().describe('Hide page title/hero section'),
17
+ dequeueKadenceGlobal: z.boolean().optional().describe('Remove Kadence theme global CSS to prevent heading/color overrides. Recommended true for custom designs.'),
16
18
  status: z.enum(['draft', 'publish']).optional().describe('Page status (default: draft)'),
17
19
  }).shape },
18
20
  },
19
21
  {
20
22
  name: 'mlcanvas_edit_page',
21
- description: 'Surgical editing for ML Canvas pages - find/replace specific HTML/CSS snippets without rewriting entire page. Works on ANY post type with ML Canvas block.',
23
+ description: 'Surgical editing for ML Canvas pages - find/replace specific HTML/CSS snippets without rewriting entire page. Works on ANY post type with ML Canvas block. Can also toggle page settings like dequeueKadenceGlobal.',
22
24
  inputSchema: { type: 'object', properties: z.object({
23
25
  page_id: z.number().describe('Page/Post ID to edit (required)'),
24
26
  find_html: z.string().optional().describe('HTML string to find and replace'),
25
27
  replace_html: z.string().optional().describe('New HTML to replace with'),
26
28
  find_css: z.string().optional().describe('CSS string to find and replace'),
27
29
  replace_css: z.string().optional().describe('New CSS to replace with'),
30
+ dequeueKadenceGlobal: z.boolean().optional().describe('Remove Kadence theme global CSS on this page'),
28
31
  }).shape },
29
32
  },
30
33
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "2.7.11",
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",