@wplaunchify/ml-mcp-server 1.0.0 → 1.0.2

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.
@@ -2,21 +2,13 @@ import { z } from 'zod';
2
2
  import { makeWordPressRequest } from '../wordpress.js';
3
3
  // ==================== ZOD SCHEMA DEFINITIONS ====================
4
4
  const getColorsSchema = z.object({
5
- mode: z.enum(['light', 'dark']).optional().default('light').describe('Color mode (light or dark)')
5
+ // No parameters needed - returns full color config
6
6
  });
7
7
  const updateColorsSchema = z.object({
8
- mode: z.enum(['light', 'dark']).optional().default('light').describe('Color mode (light or dark)'),
9
- colors: z.object({
10
- navbar_bg: z.string().optional().describe('Navbar background color (hex)'),
11
- navbar_text: z.string().optional().describe('Navbar text color (hex)'),
12
- sidebar_bg: z.string().optional().describe('Sidebar background color (hex)'),
13
- sidebar_text: z.string().optional().describe('Sidebar text color (hex)'),
14
- feed_bg: z.string().optional().describe('Feed background color (hex)'),
15
- button_primary: z.string().optional().describe('Primary button color (hex)'),
16
- button_secondary: z.string().optional().describe('Secondary button color (hex)'),
17
- link_color: z.string().optional().describe('Link color (hex)'),
18
- accent_color: z.string().optional().describe('Accent color (hex)')
19
- }).describe('Color values to update')
8
+ light_schema: z.enum(['default', 'ocean_blue', 'sky_blue', 'emerald_essence', 'sunset_sands', 'custom']).optional().describe('Light mode color schema preset'),
9
+ dark_schema: z.enum(['default', 'ocean_blue', 'sky_blue', 'emerald_essence', 'sunset_sands', 'custom']).optional().describe('Dark mode color schema preset'),
10
+ light_config: z.record(z.string()).optional().describe('Custom light mode colors (only used when light_schema is "custom")'),
11
+ dark_config: z.record(z.string()).optional().describe('Custom dark mode colors (only used when dark_schema is "custom")')
20
12
  });
21
13
  const updatePortalSettingsSchema = z.object({
22
14
  settings: z.object({
@@ -51,7 +43,7 @@ export const fluentCommunityDesignTools = [
51
43
  },
52
44
  {
53
45
  name: 'fc_update_colors',
54
- description: 'Update FluentCommunity color scheme for light or dark mode',
46
+ description: 'Update FluentCommunity color scheme. Use light_schema/dark_schema to select preset (default, ocean_blue, sky_blue, emerald_essence, sunset_sands, custom). Use light_config/dark_config to set custom colors when schema is "custom".',
55
47
  inputSchema: { type: 'object', properties: updateColorsSchema.shape }
56
48
  },
57
49
  {
@@ -90,10 +82,16 @@ export const fluentCommunityDesignHandlers = {
90
82
  fc_update_colors: async (args) => {
91
83
  try {
92
84
  // Use FluentCommunity's NATIVE color-config endpoint
93
- const data = {
94
- mode: args.mode || 'light',
95
- colors: args.colors
96
- };
85
+ // Pass light_schema, dark_schema, light_config, dark_config directly
86
+ const data = {};
87
+ if (args.light_schema)
88
+ data.light_schema = args.light_schema;
89
+ if (args.dark_schema)
90
+ data.dark_schema = args.dark_schema;
91
+ if (args.light_config)
92
+ data.light_config = args.light_config;
93
+ if (args.dark_config)
94
+ data.dark_config = args.dark_config;
97
95
  const response = await makeWordPressRequest('POST', 'fluent-community/v2/settings/color-config', data);
98
96
  return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
99
97
  }
@@ -276,6 +276,23 @@ export declare const fluentCommunityHandlers: {
276
276
  }[];
277
277
  };
278
278
  }>;
279
+ fc_register_member: (args: any) => Promise<{
280
+ toolResult: {
281
+ content: {
282
+ type: string;
283
+ text: string;
284
+ }[];
285
+ isError?: undefined;
286
+ };
287
+ } | {
288
+ toolResult: {
289
+ isError: boolean;
290
+ content: {
291
+ type: string;
292
+ text: string;
293
+ }[];
294
+ };
295
+ }>;
279
296
  fc_search_content: (args: any) => Promise<{
280
297
  toolResult: {
281
298
  content: {
@@ -103,6 +103,12 @@ const removeSpaceMemberSchema = z.object({
103
103
  space_id: z.number().describe('The space ID'),
104
104
  user_id: z.number().describe('The user ID to remove')
105
105
  });
106
+ const registerMemberSchema = z.object({
107
+ user_id: z.number().describe('The WordPress user ID to register in FluentCommunity'),
108
+ status: z.enum(['active', 'inactive']).optional().default('active').describe('Member status'),
109
+ avatar: z.string().optional().describe('Avatar URL'),
110
+ cover_photo: z.string().optional().describe('Cover photo URL')
111
+ });
106
112
  const searchContentSchema = z.object({
107
113
  query: z.string().describe('Search query'),
108
114
  content_type: z.enum(['all', 'posts', 'comments', 'spaces']).optional().default('all').describe('Type of content to search'),
@@ -219,6 +225,11 @@ export const fluentCommunityTools = [
219
225
  description: 'Remove a user from a FluentCommunity space',
220
226
  inputSchema: { type: 'object', properties: removeSpaceMemberSchema.shape }
221
227
  },
228
+ {
229
+ name: 'fc_register_member',
230
+ description: 'Register a WordPress user in FluentCommunity (creates XProfile entry so they appear in Members directory)',
231
+ inputSchema: { type: 'object', properties: registerMemberSchema.shape }
232
+ },
222
233
  // ==================== SEARCH & ANALYTICS TOOLS ====================
223
234
  {
224
235
  name: 'fc_search_content',
@@ -463,6 +474,24 @@ export const fluentCommunityHandlers = {
463
474
  return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
464
475
  }
465
476
  },
477
+ fc_register_member: async (args) => {
478
+ try {
479
+ const memberData = {
480
+ user_id: args.user_id
481
+ };
482
+ if (args.status)
483
+ memberData.status = args.status;
484
+ if (args.avatar)
485
+ memberData.avatar = args.avatar;
486
+ if (args.cover_photo)
487
+ memberData.cover_photo = args.cover_photo;
488
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/members/register', memberData);
489
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
490
+ }
491
+ catch (error) {
492
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
493
+ }
494
+ },
466
495
  // ==================== SEARCH & ANALYTICS HANDLERS ====================
467
496
  fc_search_content: async (args) => {
468
497
  try {
@@ -1327,6 +1327,23 @@ export declare const toolHandlers: {
1327
1327
  }[];
1328
1328
  };
1329
1329
  }>;
1330
+ fc_register_member: (args: any) => Promise<{
1331
+ toolResult: {
1332
+ content: {
1333
+ type: string;
1334
+ text: string;
1335
+ }[];
1336
+ isError?: undefined;
1337
+ };
1338
+ } | {
1339
+ toolResult: {
1340
+ isError: boolean;
1341
+ content: {
1342
+ type: string;
1343
+ text: string;
1344
+ }[];
1345
+ };
1346
+ }>;
1330
1347
  fc_search_content: (args: any) => Promise<{
1331
1348
  toolResult: {
1332
1349
  content: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "1.0.0",
4
- "description": "Universal MCP Server for WordPress + Fluent Suite (Community, CRM, Cart) + MinuteLaunch Plugins. 145 tools for AI-powered WordPress management via Claude, Cursor, and other MCP clients.",
3
+ "version": "1.0.2",
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",
7
7
  "exports": "./build/server.js",