@wplaunchify/ml-mcp-server 2.6.4 → 2.7.0

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.
@@ -75,9 +75,10 @@ export const mlImageEditorTools = [
75
75
  },
76
76
  ];
77
77
  export const mlImageEditorHandlers = {
78
+ // All handlers now use FluentMCP proxy at fc-manager/v1/image-editor/* for unified authentication
78
79
  mlimg_generate: async (args) => {
79
80
  try {
80
- const response = await makeWordPressRequest('POST', 'ml-image/v1/generate', args);
81
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/image-editor/generate', args);
81
82
  return {
82
83
  toolResult: {
83
84
  content: [{
@@ -101,7 +102,7 @@ export const mlImageEditorHandlers = {
101
102
  },
102
103
  mlimg_edit: async (args) => {
103
104
  try {
104
- const response = await makeWordPressRequest('POST', 'ml-image/v1/edit', args);
105
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/image-editor/edit', args);
105
106
  return {
106
107
  toolResult: {
107
108
  content: [{
@@ -125,7 +126,7 @@ export const mlImageEditorHandlers = {
125
126
  },
126
127
  mlimg_iterate: async (args) => {
127
128
  try {
128
- const response = await makeWordPressRequest('POST', 'ml-image/v1/iterate', args);
129
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/image-editor/iterate', args);
129
130
  return {
130
131
  toolResult: {
131
132
  content: [{
@@ -149,7 +150,7 @@ export const mlImageEditorHandlers = {
149
150
  },
150
151
  mlimg_batch_generate: async (args) => {
151
152
  try {
152
- const response = await makeWordPressRequest('POST', 'ml-image/v1/batch-generate', args);
153
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/image-editor/batch-generate', args);
153
154
  return {
154
155
  toolResult: {
155
156
  content: [{
@@ -173,7 +174,7 @@ export const mlImageEditorHandlers = {
173
174
  },
174
175
  mlimg_list_images: async (args) => {
175
176
  try {
176
- const response = await makeWordPressRequest('GET', 'ml-image/v1/ai-images', args);
177
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/image-editor/images', args);
177
178
  return {
178
179
  toolResult: {
179
180
  content: [{
@@ -197,7 +198,7 @@ export const mlImageEditorHandlers = {
197
198
  },
198
199
  mlimg_get_history: async (args) => {
199
200
  try {
200
- const response = await makeWordPressRequest('GET', `ml-image/v1/ai-images/${args.id}/history`);
201
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/image-editor/images/${args.id}/history`);
201
202
  return {
202
203
  toolResult: {
203
204
  content: [{
@@ -221,7 +222,7 @@ export const mlImageEditorHandlers = {
221
222
  },
222
223
  mlimg_list_categories: async (args) => {
223
224
  try {
224
- const response = await makeWordPressRequest('GET', 'ml-image/v1/categories');
225
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/image-editor/categories');
225
226
  return {
226
227
  toolResult: {
227
228
  content: [{
@@ -245,7 +246,7 @@ export const mlImageEditorHandlers = {
245
246
  },
246
247
  mlimg_health: async (args) => {
247
248
  try {
248
- const response = await makeWordPressRequest('GET', 'ml-image/v1/health');
249
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/image-editor/health');
249
250
  return {
250
251
  toolResult: {
251
252
  content: [{
@@ -1,14 +1,16 @@
1
1
  /**
2
2
  * ML Media Hub P2P Tools
3
3
  *
4
- * Provides 10 tools for image search, icon import, and media management:
4
+ * Provides 10 core tools for image search, icon import, and media management:
5
5
  * - Google Images search via SERP API
6
6
  * - Noun Project icon search and import
7
7
  * - Media library management with custom categories
8
8
  * - Hotlink support for fast imports
9
9
  *
10
10
  * API Namespace: /mediahub/v1/
11
- * Plugin Version: 3.8.0+
11
+ * Plugin Version: 3.9.0+
12
+ *
13
+ * NOTE: Requires ML Media Hub P2P plugin installed and activated
12
14
  */
13
15
  import { z } from 'zod';
14
16
  export declare const mlMediaHubTools: ({
@@ -109,129 +111,6 @@ export declare const mlMediaHubTools: ({
109
111
  type: "object";
110
112
  properties: {};
111
113
  };
112
- } | {
113
- name: string;
114
- description: string;
115
- inputSchema: {
116
- type: "object";
117
- properties: {
118
- serpapi_key: z.ZodOptional<z.ZodString>;
119
- noun_api_key: z.ZodOptional<z.ZodString>;
120
- noun_api_secret: z.ZodOptional<z.ZodString>;
121
- };
122
- };
123
- } | {
124
- name: string;
125
- description: string;
126
- inputSchema: {
127
- type: "object";
128
- properties: {
129
- query: z.ZodString;
130
- num: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
131
- filters: z.ZodOptional<z.ZodObject<{
132
- size: z.ZodOptional<z.ZodEnum<["large", "medium", "icon", "exact"]>>;
133
- exact_width: z.ZodOptional<z.ZodNumber>;
134
- exact_height: z.ZodOptional<z.ZodNumber>;
135
- color_type: z.ZodOptional<z.ZodEnum<["color", "grayscale", "transparent"]>>;
136
- dominant_color: z.ZodOptional<z.ZodEnum<["red", "orange", "yellow", "green", "blue", "purple", "pink", "white", "gray", "black", "brown"]>>;
137
- type: z.ZodOptional<z.ZodEnum<["photo", "clipart", "lineart", "animated", "face", "news"]>>;
138
- license: z.ZodOptional<z.ZodEnum<["creative_commons", "public_domain", "commercial", "modify"]>>;
139
- date_range: z.ZodOptional<z.ZodEnum<["day", "week", "month", "year"]>>;
140
- site: z.ZodOptional<z.ZodString>;
141
- exclude_sites: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
142
- file_type: z.ZodOptional<z.ZodEnum<["jpg", "png", "gif", "svg", "bmp", "webp"]>>;
143
- aspect_ratio: z.ZodOptional<z.ZodEnum<["tall", "square", "wide", "panoramic"]>>;
144
- safe_search: z.ZodOptional<z.ZodEnum<["strict", "moderate", "off"]>>;
145
- }, "strip", z.ZodTypeAny, {
146
- type?: "photo" | "clipart" | "lineart" | "animated" | "face" | "news" | undefined;
147
- size?: "exact" | "icon" | "large" | "medium" | undefined;
148
- license?: "creative_commons" | "public_domain" | "commercial" | "modify" | undefined;
149
- exact_width?: number | undefined;
150
- exact_height?: number | undefined;
151
- color_type?: "color" | "grayscale" | "transparent" | undefined;
152
- dominant_color?: "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "white" | "gray" | "black" | "brown" | undefined;
153
- date_range?: "day" | "week" | "month" | "year" | undefined;
154
- site?: string | undefined;
155
- exclude_sites?: string[] | undefined;
156
- file_type?: "jpg" | "png" | "gif" | "svg" | "bmp" | "webp" | undefined;
157
- aspect_ratio?: "tall" | "square" | "wide" | "panoramic" | undefined;
158
- safe_search?: "strict" | "moderate" | "off" | undefined;
159
- }, {
160
- type?: "photo" | "clipart" | "lineart" | "animated" | "face" | "news" | undefined;
161
- size?: "exact" | "icon" | "large" | "medium" | undefined;
162
- license?: "creative_commons" | "public_domain" | "commercial" | "modify" | undefined;
163
- exact_width?: number | undefined;
164
- exact_height?: number | undefined;
165
- color_type?: "color" | "grayscale" | "transparent" | undefined;
166
- dominant_color?: "red" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "white" | "gray" | "black" | "brown" | undefined;
167
- date_range?: "day" | "week" | "month" | "year" | undefined;
168
- site?: string | undefined;
169
- exclude_sites?: string[] | undefined;
170
- file_type?: "jpg" | "png" | "gif" | "svg" | "bmp" | "webp" | undefined;
171
- aspect_ratio?: "tall" | "square" | "wide" | "panoramic" | undefined;
172
- safe_search?: "strict" | "moderate" | "off" | undefined;
173
- }>>;
174
- };
175
- };
176
- } | {
177
- name: string;
178
- description: string;
179
- inputSchema: {
180
- type: "object";
181
- properties: {
182
- query: z.ZodString;
183
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
184
- filters: z.ZodOptional<z.ZodObject<{
185
- style: z.ZodOptional<z.ZodEnum<["outline", "filled", "glyph", "hand-drawn", "flat", "3d"]>>;
186
- license: z.ZodOptional<z.ZodEnum<["public_domain", "creative_commons", "royalty_free"]>>;
187
- format: z.ZodOptional<z.ZodEnum<["svg", "png"]>>;
188
- color: z.ZodOptional<z.ZodString>;
189
- background: z.ZodOptional<z.ZodString>;
190
- size: z.ZodOptional<z.ZodNumber>;
191
- collection_id: z.ZodOptional<z.ZodNumber>;
192
- creator: z.ZodOptional<z.ZodString>;
193
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
194
- exclude_tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
195
- sort_by: z.ZodOptional<z.ZodEnum<["relevance", "popularity", "recent"]>>;
196
- min_downloads: z.ZodOptional<z.ZodNumber>;
197
- }, "strip", z.ZodTypeAny, {
198
- tags?: string[] | undefined;
199
- format?: "png" | "svg" | undefined;
200
- size?: number | undefined;
201
- license?: "creative_commons" | "public_domain" | "royalty_free" | undefined;
202
- color?: string | undefined;
203
- style?: "flat" | "outline" | "filled" | "glyph" | "hand-drawn" | "3d" | undefined;
204
- background?: string | undefined;
205
- collection_id?: number | undefined;
206
- creator?: string | undefined;
207
- exclude_tags?: string[] | undefined;
208
- sort_by?: "relevance" | "popularity" | "recent" | undefined;
209
- min_downloads?: number | undefined;
210
- }, {
211
- tags?: string[] | undefined;
212
- format?: "png" | "svg" | undefined;
213
- size?: number | undefined;
214
- license?: "creative_commons" | "public_domain" | "royalty_free" | undefined;
215
- color?: string | undefined;
216
- style?: "flat" | "outline" | "filled" | "glyph" | "hand-drawn" | "3d" | undefined;
217
- background?: string | undefined;
218
- collection_id?: number | undefined;
219
- creator?: string | undefined;
220
- exclude_tags?: string[] | undefined;
221
- sort_by?: "relevance" | "popularity" | "recent" | undefined;
222
- min_downloads?: number | undefined;
223
- }>>;
224
- };
225
- };
226
- } | {
227
- name: string;
228
- description: string;
229
- inputSchema: {
230
- type: "object";
231
- properties: {
232
- type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["images", "icons", "all"]>>>;
233
- };
234
- };
235
114
  } | {
236
115
  name: string;
237
116
  description: string;
@@ -239,6 +118,8 @@ export declare const mlMediaHubTools: ({
239
118
  type: "object";
240
119
  properties: {
241
120
  name: z.ZodString;
121
+ slug: z.ZodOptional<z.ZodString>;
122
+ description: z.ZodOptional<z.ZodString>;
242
123
  };
243
124
  };
244
125
  } | {
@@ -247,21 +128,9 @@ export declare const mlMediaHubTools: ({
247
128
  inputSchema: {
248
129
  type: "object";
249
130
  properties: {
250
- page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
251
- per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
252
- search: z.ZodOptional<z.ZodString>;
253
- sort: z.ZodOptional<z.ZodEnum<["popular", "recent", "name"]>>;
254
- };
255
- };
256
- } | {
257
- name: string;
258
- description: string;
259
- inputSchema: {
260
- type: "object";
261
- properties: {
262
- collection_id: z.ZodNumber;
263
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
264
- format: z.ZodOptional<z.ZodEnum<["svg", "png"]>>;
131
+ serpapi_key: z.ZodOptional<z.ZodString>;
132
+ noun_api_key: z.ZodOptional<z.ZodString>;
133
+ noun_api_secret: z.ZodOptional<z.ZodString>;
265
134
  };
266
135
  };
267
136
  })[];
@@ -436,140 +305,4 @@ export declare const mlMediaHubHandlers: {
436
305
  }[];
437
306
  };
438
307
  }>;
439
- mlmh_advanced_image_search: (args: any) => Promise<{
440
- toolResult: {
441
- content: {
442
- type: string;
443
- text: string;
444
- }[];
445
- isError?: undefined;
446
- };
447
- } | {
448
- toolResult: {
449
- isError: boolean;
450
- content: {
451
- type: string;
452
- text: string;
453
- }[];
454
- };
455
- }>;
456
- mlmh_advanced_icon_search: (args: any) => Promise<{
457
- toolResult: {
458
- content: {
459
- type: string;
460
- text: string;
461
- }[];
462
- isError?: undefined;
463
- };
464
- } | {
465
- toolResult: {
466
- isError: boolean;
467
- content: {
468
- type: string;
469
- text: string;
470
- }[];
471
- };
472
- }>;
473
- mlmh_save_search_preset: (args: any) => Promise<{
474
- toolResult: {
475
- content: {
476
- type: string;
477
- text: string;
478
- }[];
479
- isError?: undefined;
480
- };
481
- } | {
482
- toolResult: {
483
- isError: boolean;
484
- content: {
485
- type: string;
486
- text: string;
487
- }[];
488
- };
489
- }>;
490
- mlmh_load_search_preset: (args: any) => Promise<{
491
- toolResult: {
492
- content: {
493
- type: string;
494
- text: string;
495
- }[];
496
- isError?: undefined;
497
- };
498
- } | {
499
- toolResult: {
500
- isError: boolean;
501
- content: {
502
- type: string;
503
- text: string;
504
- }[];
505
- };
506
- }>;
507
- mlmh_list_search_presets: (args: any) => Promise<{
508
- toolResult: {
509
- content: {
510
- type: string;
511
- text: string;
512
- }[];
513
- isError?: undefined;
514
- };
515
- } | {
516
- toolResult: {
517
- isError: boolean;
518
- content: {
519
- type: string;
520
- text: string;
521
- }[];
522
- };
523
- }>;
524
- mlmh_delete_search_preset: (args: any) => Promise<{
525
- toolResult: {
526
- content: {
527
- type: string;
528
- text: string;
529
- }[];
530
- isError?: undefined;
531
- };
532
- } | {
533
- toolResult: {
534
- isError: boolean;
535
- content: {
536
- type: string;
537
- text: string;
538
- }[];
539
- };
540
- }>;
541
- mlmh_browse_icon_collections: (args: any) => Promise<{
542
- toolResult: {
543
- content: {
544
- type: string;
545
- text: string;
546
- }[];
547
- isError?: undefined;
548
- };
549
- } | {
550
- toolResult: {
551
- isError: boolean;
552
- content: {
553
- type: string;
554
- text: string;
555
- }[];
556
- };
557
- }>;
558
- mlmh_get_collection_icons: (args: any) => Promise<{
559
- toolResult: {
560
- content: {
561
- type: string;
562
- text: string;
563
- }[];
564
- isError?: undefined;
565
- };
566
- } | {
567
- toolResult: {
568
- isError: boolean;
569
- content: {
570
- type: string;
571
- text: string;
572
- }[];
573
- };
574
- }>;
575
308
  };
@@ -1,14 +1,16 @@
1
1
  /**
2
2
  * ML Media Hub P2P Tools
3
3
  *
4
- * Provides 10 tools for image search, icon import, and media management:
4
+ * Provides 10 core tools for image search, icon import, and media management:
5
5
  * - Google Images search via SERP API
6
6
  * - Noun Project icon search and import
7
7
  * - Media library management with custom categories
8
8
  * - Hotlink support for fast imports
9
9
  *
10
10
  * API Namespace: /mediahub/v1/
11
- * Plugin Version: 3.8.0+
11
+ * Plugin Version: 3.9.0+
12
+ *
13
+ * NOTE: Requires ML Media Hub P2P plugin installed and activated
12
14
  */
13
15
  import { z } from 'zod';
14
16
  import { makeWordPressRequest } from '../wordpress.js';
@@ -109,131 +111,18 @@ export const mlMediaHubTools = [
109
111
  name: 'mlmh_get_info',
110
112
  description: 'Get complete API documentation for ML Media Hub including all endpoints, authentication methods, parameters, and usage examples. Self-documenting endpoint. Public, no authentication required.',
111
113
  inputSchema: { type: 'object', properties: {} }
112
- },
113
- // ============================================================================
114
- // ADVANCED SEARCH & FILTER TOOLS (8 new tools)
115
- // ============================================================================
116
- {
117
- name: 'mlmh_advanced_image_search',
118
- description: 'Advanced Google Images search with comprehensive filters for size, color, type, license, aspect ratio, file format, and source domains. Provides fine-grained control over image search results.',
119
- inputSchema: { type: 'object', properties: z.object({
120
- query: z.string().describe('Search query for images'),
121
- num: z.number().optional().default(10).describe('Number of results (1-50)'),
122
- filters: z.object({
123
- // Size filters
124
- size: z.enum(['large', 'medium', 'icon', 'exact']).optional().describe('Image size preset'),
125
- exact_width: z.number().optional().describe('Exact width in pixels (requires size=exact)'),
126
- exact_height: z.number().optional().describe('Exact height in pixels (requires size=exact)'),
127
- // Color filters
128
- color_type: z.enum(['color', 'grayscale', 'transparent']).optional().describe('Color type filter'),
129
- dominant_color: z.enum(['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink', 'white', 'gray', 'black', 'brown']).optional().describe('Dominant color filter'),
130
- // Type filters
131
- type: z.enum(['photo', 'clipart', 'lineart', 'animated', 'face', 'news']).optional().describe('Image type'),
132
- // License filters
133
- license: z.enum(['creative_commons', 'public_domain', 'commercial', 'modify']).optional().describe('Usage rights filter'),
134
- // Time filters
135
- date_range: z.enum(['day', 'week', 'month', 'year']).optional().describe('Time range filter'),
136
- // Source filters
137
- site: z.string().optional().describe('Limit to specific domain (e.g., "unsplash.com")'),
138
- exclude_sites: z.array(z.string()).optional().describe('Exclude specific domains'),
139
- // Format filters
140
- file_type: z.enum(['jpg', 'png', 'gif', 'svg', 'bmp', 'webp']).optional().describe('File format filter'),
141
- // Aspect ratio
142
- aspect_ratio: z.enum(['tall', 'square', 'wide', 'panoramic']).optional().describe('Aspect ratio filter'),
143
- // Safe search
144
- safe_search: z.enum(['strict', 'moderate', 'off']).optional().describe('Safe search level')
145
- }).optional().describe('Advanced filter options')
146
- }).shape }
147
- },
148
- {
149
- name: 'mlmh_advanced_icon_search',
150
- description: 'Advanced Noun Project icon search with filters for style, license, format, popularity, collections, and creator. Perfect for finding icons that match your design system.',
151
- inputSchema: { type: 'object', properties: z.object({
152
- query: z.string().describe('Search term for icons'),
153
- limit: z.number().optional().default(20).describe('Number of results'),
154
- filters: z.object({
155
- // Style filters
156
- style: z.enum(['outline', 'filled', 'glyph', 'hand-drawn', 'flat', '3d']).optional().describe('Icon style'),
157
- // License filters
158
- license: z.enum(['public_domain', 'creative_commons', 'royalty_free']).optional().describe('License type'),
159
- // Format preferences
160
- format: z.enum(['svg', 'png']).optional().describe('File format'),
161
- // Color options (for PNG)
162
- color: z.string().optional().describe('Icon color in hex format (e.g., "#FF0000")'),
163
- background: z.string().optional().describe('Background color in hex or "transparent"'),
164
- // Size options (for PNG)
165
- size: z.number().optional().describe('Icon size in pixels (32, 64, 128, 256, 512, or 1024)'),
166
- // Collection filters
167
- collection_id: z.number().optional().describe('Search within specific collection ID'),
168
- creator: z.string().optional().describe('Filter by icon creator username'),
169
- // Tag filters
170
- tags: z.array(z.string()).optional().describe('Must have these tags'),
171
- exclude_tags: z.array(z.string()).optional().describe('Must NOT have these tags'),
172
- // Popularity
173
- sort_by: z.enum(['relevance', 'popularity', 'recent']).optional().describe('Sort order'),
174
- min_downloads: z.number().optional().describe('Minimum download count filter')
175
- }).optional().describe('Advanced filter options')
176
- }).shape }
177
- },
178
- {
179
- name: 'mlmh_save_search_preset',
180
- description: 'Save a search configuration preset for reuse. Store commonly used filter combinations with a memorable name for quick access later.',
181
- inputSchema: { type: 'object', properties: z.object({
182
- name: z.string().describe('Preset name (e.g., "Brand Photos", "Outline Icons", "Hero Images")'),
183
- type: z.enum(['images', 'icons']).describe('Preset type'),
184
- filters: z.record(z.any()).describe('Filter configuration object (same structure as advanced search filters)'),
185
- description: z.string().optional().describe('Optional description of what this preset is for')
186
- }).shape }
187
- },
188
- {
189
- name: 'mlmh_load_search_preset',
190
- description: 'Load a saved search preset by name. Returns the filter configuration that can be used with advanced search tools.',
191
- inputSchema: { type: 'object', properties: z.object({
192
- name: z.string().describe('Preset name to load'),
193
- type: z.enum(['images', 'icons']).optional().describe('Filter by preset type')
194
- }).shape }
195
- },
196
- {
197
- name: 'mlmh_list_search_presets',
198
- description: 'List all saved search presets with their names, types, and descriptions. Useful for discovering available presets.',
199
- inputSchema: { type: 'object', properties: z.object({
200
- type: z.enum(['images', 'icons', 'all']).optional().default('all').describe('Filter by preset type')
201
- }).shape }
202
- },
203
- {
204
- name: 'mlmh_delete_search_preset',
205
- description: 'Delete a saved search preset by name.',
206
- inputSchema: { type: 'object', properties: z.object({
207
- name: z.string().describe('Preset name to delete')
208
- }).shape }
209
- },
210
- {
211
- name: 'mlmh_browse_icon_collections',
212
- description: 'Browse curated Noun Project icon collections. Collections are professionally curated sets of icons with consistent style and theme.',
213
- inputSchema: { type: 'object', properties: z.object({
214
- page: z.number().optional().default(1).describe('Page number for pagination'),
215
- per_page: z.number().optional().default(20).describe('Collections per page'),
216
- search: z.string().optional().describe('Search term for collection names'),
217
- sort: z.enum(['popular', 'recent', 'name']).optional().describe('Sort order')
218
- }).shape }
219
- },
220
- {
221
- name: 'mlmh_get_collection_icons',
222
- description: 'Get all icons from a specific Noun Project collection. Perfect for importing entire icon sets with consistent styling.',
223
- inputSchema: { type: 'object', properties: z.object({
224
- collection_id: z.number().describe('Collection ID from mlmh_browse_icon_collections'),
225
- limit: z.number().optional().default(50).describe('Number of icons to return'),
226
- format: z.enum(['svg', 'png']).optional().describe('Icon format preference')
227
- }).shape }
228
114
  }
115
+ // NOTE: Advanced search/preset/collection tools removed - require plugin endpoints not yet implemented
116
+ // To add: /search-images-advanced, /noun-search-advanced, /presets, /noun-collections, /noun-collection-icons
229
117
  ];
230
118
  // ============================================================================
231
119
  // TOOL HANDLERS
232
120
  // ============================================================================
233
121
  export const mlMediaHubHandlers = {
122
+ // All handlers now use FluentMCP proxy at fc-manager/v1/mediahub/* for unified authentication
234
123
  mlmh_search_images: async (args) => {
235
124
  try {
236
- const response = await makeWordPressRequest('POST', 'mediahub/v1/search-images', args);
125
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/mediahub/search-images', args);
237
126
  return {
238
127
  toolResult: {
239
128
  content: [{
@@ -257,7 +146,7 @@ export const mlMediaHubHandlers = {
257
146
  },
258
147
  mlmh_import_images: async (args) => {
259
148
  try {
260
- const response = await makeWordPressRequest('POST', 'mediahub/v1/import-images', args);
149
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/mediahub/import-images', args);
261
150
  return {
262
151
  toolResult: {
263
152
  content: [{
@@ -281,7 +170,7 @@ export const mlMediaHubHandlers = {
281
170
  },
282
171
  mlmh_search_icons: async (args) => {
283
172
  try {
284
- const response = await makeWordPressRequest('POST', 'mediahub/v1/noun-search', args);
173
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/mediahub/search-icons', args);
285
174
  return {
286
175
  toolResult: {
287
176
  content: [{
@@ -305,7 +194,7 @@ export const mlMediaHubHandlers = {
305
194
  },
306
195
  mlmh_import_icon: async (args) => {
307
196
  try {
308
- const response = await makeWordPressRequest('POST', 'mediahub/v1/noun-import', args);
197
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/mediahub/import-icon', args);
309
198
  return {
310
199
  toolResult: {
311
200
  content: [{
@@ -339,7 +228,7 @@ export const mlMediaHubHandlers = {
339
228
  if (args.search)
340
229
  params.append('search', args.search);
341
230
  const query = params.toString();
342
- const response = await makeWordPressRequest('GET', `mediahub/v1/media${query ? '?' + query : ''}`);
231
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/mediahub/media${query ? '?' + query : ''}`);
343
232
  return {
344
233
  toolResult: {
345
234
  content: [{
@@ -363,7 +252,7 @@ export const mlMediaHubHandlers = {
363
252
  },
364
253
  mlmh_list_categories: async (args) => {
365
254
  try {
366
- const response = await makeWordPressRequest('GET', 'mediahub/v1/media-categories');
255
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/mediahub/categories');
367
256
  return {
368
257
  toolResult: {
369
258
  content: [{
@@ -387,7 +276,7 @@ export const mlMediaHubHandlers = {
387
276
  },
388
277
  mlmh_create_category: async (args) => {
389
278
  try {
390
- const response = await makeWordPressRequest('POST', 'mediahub/v1/media-categories', args);
279
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/mediahub/categories', args);
391
280
  return {
392
281
  toolResult: {
393
282
  content: [{
@@ -411,7 +300,7 @@ export const mlMediaHubHandlers = {
411
300
  },
412
301
  mlmh_get_settings: async (args) => {
413
302
  try {
414
- const response = await makeWordPressRequest('GET', 'mediahub/v1/settings');
303
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/mediahub/settings');
415
304
  return {
416
305
  toolResult: {
417
306
  content: [{
@@ -435,7 +324,7 @@ export const mlMediaHubHandlers = {
435
324
  },
436
325
  mlmh_update_settings: async (args) => {
437
326
  try {
438
- const response = await makeWordPressRequest('POST', 'mediahub/v1/settings', args);
327
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/mediahub/settings', args);
439
328
  return {
440
329
  toolResult: {
441
330
  content: [{
@@ -459,7 +348,7 @@ export const mlMediaHubHandlers = {
459
348
  },
460
349
  mlmh_get_info: async (args) => {
461
350
  try {
462
- const response = await makeWordPressRequest('GET', 'mediahub/v1/info');
351
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/mediahub/info');
463
352
  return {
464
353
  toolResult: {
465
354
  content: [{
@@ -480,235 +369,6 @@ export const mlMediaHubHandlers = {
480
369
  }
481
370
  };
482
371
  }
483
- },
484
- // ============================================================================
485
- // ADVANCED SEARCH & FILTER HANDLERS (8 new handlers)
486
- // ============================================================================
487
- mlmh_advanced_image_search: async (args) => {
488
- try {
489
- // Merge query and filters into a single request body
490
- const requestBody = {
491
- query: args.query,
492
- num: args.num || 10,
493
- ...args.filters
494
- };
495
- const response = await makeWordPressRequest('POST', 'mediahub/v1/search-images-advanced', requestBody);
496
- return {
497
- toolResult: {
498
- content: [{
499
- type: 'text',
500
- text: JSON.stringify(response, null, 2)
501
- }]
502
- }
503
- };
504
- }
505
- catch (error) {
506
- return {
507
- toolResult: {
508
- isError: true,
509
- content: [{
510
- type: 'text',
511
- text: `Error in advanced image search: ${error.message}`
512
- }]
513
- }
514
- };
515
- }
516
- },
517
- mlmh_advanced_icon_search: async (args) => {
518
- try {
519
- const requestBody = {
520
- query: args.query,
521
- limit: args.limit || 20,
522
- ...args.filters
523
- };
524
- const response = await makeWordPressRequest('POST', 'mediahub/v1/noun-search-advanced', requestBody);
525
- return {
526
- toolResult: {
527
- content: [{
528
- type: 'text',
529
- text: JSON.stringify(response, null, 2)
530
- }]
531
- }
532
- };
533
- }
534
- catch (error) {
535
- return {
536
- toolResult: {
537
- isError: true,
538
- content: [{
539
- type: 'text',
540
- text: `Error in advanced icon search: ${error.message}`
541
- }]
542
- }
543
- };
544
- }
545
- },
546
- mlmh_save_search_preset: async (args) => {
547
- try {
548
- const response = await makeWordPressRequest('POST', 'mediahub/v1/presets', args);
549
- return {
550
- toolResult: {
551
- content: [{
552
- type: 'text',
553
- text: JSON.stringify(response, null, 2)
554
- }]
555
- }
556
- };
557
- }
558
- catch (error) {
559
- return {
560
- toolResult: {
561
- isError: true,
562
- content: [{
563
- type: 'text',
564
- text: `Error saving search preset: ${error.message}`
565
- }]
566
- }
567
- };
568
- }
569
- },
570
- mlmh_load_search_preset: async (args) => {
571
- try {
572
- const params = new URLSearchParams();
573
- params.append('name', args.name);
574
- if (args.type)
575
- params.append('type', args.type);
576
- const response = await makeWordPressRequest('GET', `mediahub/v1/presets?${params.toString()}`);
577
- return {
578
- toolResult: {
579
- content: [{
580
- type: 'text',
581
- text: JSON.stringify(response, null, 2)
582
- }]
583
- }
584
- };
585
- }
586
- catch (error) {
587
- return {
588
- toolResult: {
589
- isError: true,
590
- content: [{
591
- type: 'text',
592
- text: `Error loading search preset: ${error.message}`
593
- }]
594
- }
595
- };
596
- }
597
- },
598
- mlmh_list_search_presets: async (args) => {
599
- try {
600
- const params = new URLSearchParams();
601
- if (args.type && args.type !== 'all')
602
- params.append('type', args.type);
603
- const query = params.toString();
604
- const response = await makeWordPressRequest('GET', `mediahub/v1/presets${query ? '?' + query : ''}`);
605
- return {
606
- toolResult: {
607
- content: [{
608
- type: 'text',
609
- text: JSON.stringify(response, null, 2)
610
- }]
611
- }
612
- };
613
- }
614
- catch (error) {
615
- return {
616
- toolResult: {
617
- isError: true,
618
- content: [{
619
- type: 'text',
620
- text: `Error listing search presets: ${error.message}`
621
- }]
622
- }
623
- };
624
- }
625
- },
626
- mlmh_delete_search_preset: async (args) => {
627
- try {
628
- const response = await makeWordPressRequest('DELETE', `mediahub/v1/presets/${encodeURIComponent(args.name)}`);
629
- return {
630
- toolResult: {
631
- content: [{
632
- type: 'text',
633
- text: JSON.stringify(response, null, 2)
634
- }]
635
- }
636
- };
637
- }
638
- catch (error) {
639
- return {
640
- toolResult: {
641
- isError: true,
642
- content: [{
643
- type: 'text',
644
- text: `Error deleting search preset: ${error.message}`
645
- }]
646
- }
647
- };
648
- }
649
- },
650
- mlmh_browse_icon_collections: async (args) => {
651
- try {
652
- const params = new URLSearchParams();
653
- if (args.page)
654
- params.append('page', args.page.toString());
655
- if (args.per_page)
656
- params.append('per_page', args.per_page.toString());
657
- if (args.search)
658
- params.append('search', args.search);
659
- if (args.sort)
660
- params.append('sort', args.sort);
661
- const query = params.toString();
662
- const response = await makeWordPressRequest('GET', `mediahub/v1/noun-collections${query ? '?' + query : ''}`);
663
- return {
664
- toolResult: {
665
- content: [{
666
- type: 'text',
667
- text: JSON.stringify(response, null, 2)
668
- }]
669
- }
670
- };
671
- }
672
- catch (error) {
673
- return {
674
- toolResult: {
675
- isError: true,
676
- content: [{
677
- type: 'text',
678
- text: `Error browsing icon collections: ${error.message}`
679
- }]
680
- }
681
- };
682
- }
683
- },
684
- mlmh_get_collection_icons: async (args) => {
685
- try {
686
- const params = new URLSearchParams();
687
- params.append('collection_id', args.collection_id.toString());
688
- if (args.limit)
689
- params.append('limit', args.limit.toString());
690
- if (args.format)
691
- params.append('format', args.format);
692
- const response = await makeWordPressRequest('GET', `mediahub/v1/noun-collection-icons?${params.toString()}`);
693
- return {
694
- toolResult: {
695
- content: [{
696
- type: 'text',
697
- text: JSON.stringify(response, null, 2)
698
- }]
699
- }
700
- };
701
- }
702
- catch (error) {
703
- return {
704
- toolResult: {
705
- isError: true,
706
- content: [{
707
- type: 'text',
708
- text: `Error getting collection icons: ${error.message}`
709
- }]
710
- }
711
- };
712
- }
713
372
  }
373
+ // NOTE: Advanced handlers removed - require plugin endpoints not yet implemented
714
374
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "2.6.4",
3
+ "version": "2.7.0",
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",