@wplaunchify/ml-mcp-server 2.7.4 → 2.7.6

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.
Files changed (2) hide show
  1. package/build/tools/index.js +201 -76
  2. package/package.json +1 -1
@@ -25,80 +25,205 @@ import { fluentCommunityCoreTools, fluentCommunityCoreHandlers } from './fluent-
25
25
  import { fluentCommunityLearningTools, fluentCommunityLearningHandlers } from './fluent-community-learning.js';
26
26
  import { fluentMcpProTools, fluentMcpProHandlers } from './fluent-mcp-pro.js';
27
27
  import { mlSocialTools, mlSocialHandlers } from './ml-social.js';
28
- // All tools - always loaded, no conditional filtering
29
- export const allTools = [
30
- // WordPress Core
31
- ...unifiedContentTools,
32
- ...unifiedTaxonomyTools,
33
- ...pluginTools,
34
- ...mediaTools,
35
- ...userTools,
36
- ...pluginRepositoryTools,
37
- ...commentTools,
38
- // ML Plugins (Canvas, Simple Site, Image Editor, Media Hub, Social)
39
- ...mlCanvasTools,
40
- ...mlSimpleSiteTools,
41
- ...mlImageEditorTools,
42
- ...mlMediaHubTools,
43
- ...mlSocialTools,
44
- // FluentMCP Pro (WooCommerce, file system, database, WP settings, system, WP-CLI)
45
- ...fluentMcpProTools,
46
- // FluentCommunity
47
- ...fluentCommunityTools,
48
- ...fluentCommunityDesignTools,
49
- ...fluentCommunityLayoutTools,
50
- ...fluentCommunityChatTools,
51
- ...fluentCommunityAdminTools,
52
- ...fluentCommunityCoreTools,
53
- ...fluentCommunityLearningTools,
54
- // FluentCart
55
- ...fluentCartTools,
56
- ...fluentCartAnalyticsTools,
57
- ...fluentCartLicensingTools,
58
- ...fluentCartAdminTools,
59
- // FluentCRM
60
- ...fluentCRMTools,
61
- // Fluent Affiliate
62
- ...fluentAffiliateTools,
63
- // Debug
64
- ...debugTools
65
- ];
66
- // All handlers - always loaded, no conditional filtering
67
- export const toolHandlers = {
68
- // WordPress Core
69
- ...unifiedContentHandlers,
70
- ...unifiedTaxonomyHandlers,
71
- ...pluginHandlers,
72
- ...mediaHandlers,
73
- ...userHandlers,
74
- ...pluginRepositoryHandlers,
75
- ...commentHandlers,
76
- // ML Plugins
77
- ...mlCanvasHandlers,
78
- ...mlSimpleSiteHandlers,
79
- ...mlImageEditorHandlers,
80
- ...mlMediaHubHandlers,
81
- ...mlSocialHandlers,
82
- // FluentMCP Pro
83
- ...fluentMcpProHandlers,
84
- // FluentCommunity
85
- ...fluentCommunityHandlers,
86
- ...fluentCommunityDesignHandlers,
87
- ...fluentCommunityLayoutHandlers,
88
- ...fluentCommunityChatHandlers,
89
- ...fluentCommunityAdminHandlers,
90
- ...fluentCommunityCoreHandlers,
91
- ...fluentCommunityLearningHandlers,
92
- // FluentCart
93
- ...fluentCartHandlers,
94
- ...fluentCartAnalyticsHandlers,
95
- ...fluentCartLicensingHandlers,
96
- ...fluentCartAdminHandlers,
97
- // FluentCRM
98
- ...fluentCRMHandlers,
99
- // Fluent Affiliate
100
- ...fluentAffiliateHandlers,
101
- // Debug
102
- ...debugHandlers
28
+ // Tool categories for selective loading
29
+ const toolCategories = {
30
+ wordpress: [
31
+ ...unifiedContentTools,
32
+ ...unifiedTaxonomyTools,
33
+ ...pluginTools,
34
+ ...mediaTools,
35
+ ...userTools,
36
+ ...pluginRepositoryTools,
37
+ ...commentTools,
38
+ ...mlCanvasTools,
39
+ ...mlSimpleSiteTools,
40
+ ...mlImageEditorTools, // AI image generation via ML Image Editor
41
+ ...mlMediaHubTools, // Image search & icon import via ML Media Hub P2P
42
+ ...mlSocialTools, // Social media publishing via ML Social
43
+ ...fluentMcpProTools // FluentMCP Pro (WooCommerce, file system, database, etc.)
44
+ ],
45
+ // Full FluentCommunity (91 tools) - legacy support
46
+ fluentcommunity: [
47
+ ...fluentCommunityTools,
48
+ ...fluentCommunityDesignTools,
49
+ ...fluentCommunityLayoutTools,
50
+ ...fluentCommunityChatTools,
51
+ ...fluentCommunityAdminTools
52
+ ],
53
+ // COMM1 - Community Core (55 tools) - posts, spaces, members, engagement
54
+ 'fluentcommunity-core': [
55
+ ...fluentCommunityCoreTools,
56
+ ...fluentCommunityChatTools // Chat is part of core community
57
+ ],
58
+ // COMM2 - Learning & Admin (36 tools) - courses, lessons, settings
59
+ 'fluentcommunity-learning': [
60
+ ...fluentCommunityLearningTools,
61
+ ...fluentCommunityDesignTools,
62
+ ...fluentCommunityLayoutTools,
63
+ ...fluentCommunityAdminTools
64
+ ],
65
+ fluentcart: [
66
+ ...fluentCartTools,
67
+ ...fluentCartAnalyticsTools,
68
+ ...fluentCartLicensingTools,
69
+ ...fluentCartAdminTools
70
+ ],
71
+ fluentcrm: [
72
+ ...fluentCRMTools
73
+ ],
74
+ // mlplugins - Only Fluent Affiliate (ML Image Editor & Media Hub are in wordpress category)
75
+ mlplugins: [
76
+ ...fluentAffiliateTools
77
+ ],
78
+ pro: [
79
+ ...fluentMcpProTools
80
+ ],
81
+ debug: [
82
+ ...debugTools
83
+ ]
103
84
  };
104
- console.error(`📦 Loaded ${allTools.length} tools`);
85
+ const handlerCategories = {
86
+ // WP (ENABLED_TOOLS=wordpress) - 100+ tools (includes ML plugins + FluentMCP Pro)
87
+ wordpress: {
88
+ ...unifiedContentHandlers,
89
+ ...unifiedTaxonomyHandlers,
90
+ ...pluginHandlers,
91
+ ...mediaHandlers,
92
+ ...userHandlers,
93
+ ...pluginRepositoryHandlers,
94
+ ...commentHandlers,
95
+ ...mlCanvasHandlers, // ML Canvas Block tools
96
+ ...mlSimpleSiteHandlers, // ML Simple Site tools
97
+ ...mlImageEditorHandlers, // AI image generation
98
+ ...mlMediaHubHandlers, // Image search & icon import
99
+ ...mlSocialHandlers, // Social media publishing
100
+ ...fluentMcpProHandlers // FluentMCP Pro (WooCommerce, file system, database, etc.)
101
+ },
102
+ fluentcommunity: {
103
+ ...fluentCommunityHandlers,
104
+ ...fluentCommunityDesignHandlers,
105
+ ...fluentCommunityLayoutHandlers,
106
+ ...fluentCommunityChatHandlers,
107
+ ...fluentCommunityAdminHandlers
108
+ },
109
+ 'fluentcommunity-core': {
110
+ ...fluentCommunityCoreHandlers,
111
+ ...fluentCommunityChatHandlers
112
+ },
113
+ 'fluentcommunity-learning': {
114
+ ...fluentCommunityLearningHandlers,
115
+ ...fluentCommunityDesignHandlers,
116
+ ...fluentCommunityLayoutHandlers,
117
+ ...fluentCommunityAdminHandlers
118
+ },
119
+ fluentcart: {
120
+ ...fluentCartHandlers,
121
+ ...fluentCartAnalyticsHandlers,
122
+ ...fluentCartLicensingHandlers,
123
+ ...fluentCartAdminHandlers
124
+ },
125
+ fluentcrm: {
126
+ ...fluentCRMHandlers
127
+ },
128
+ // mlplugins - Only Fluent Affiliate (ML Image Editor & Media Hub handlers are in wordpress category)
129
+ mlplugins: {
130
+ ...fluentAffiliateHandlers
131
+ },
132
+ pro: {
133
+ ...fluentMcpProHandlers
134
+ },
135
+ debug: {
136
+ ...debugHandlers
137
+ }
138
+ };
139
+ // Filter tools based on ENABLED_TOOLS environment variable
140
+ function getFilteredTools() {
141
+ const enabledTools = process.env.ENABLED_TOOLS?.toLowerCase();
142
+ // If specific category requested, honor it
143
+ if (enabledTools && enabledTools !== 'all') {
144
+ // Map user-friendly names to internal category names
145
+ const categoryMap = {
146
+ 'wordpress': 'wordpress',
147
+ 'fluent-community': 'fluentcommunity',
148
+ 'fluentcommunity': 'fluentcommunity',
149
+ 'fluentcommunity-core': 'fluentcommunity-core',
150
+ 'fluent-community-core': 'fluentcommunity-core',
151
+ 'fluentcommunity-learning': 'fluentcommunity-learning',
152
+ 'fluent-community-learning': 'fluentcommunity-learning',
153
+ 'fluent-cart': 'fluentcart',
154
+ 'fluentcart': 'fluentcart',
155
+ 'fluent-crm': 'fluentcrm',
156
+ 'fluentcrm': 'fluentcrm',
157
+ 'mlplugins': 'mlplugins',
158
+ 'pro': 'pro',
159
+ 'fluentmcp-pro': 'pro',
160
+ 'fluent-mcp-pro': 'pro',
161
+ 'debug': 'debug'
162
+ };
163
+ const category = categoryMap[enabledTools];
164
+ if (category && toolCategories[category]) {
165
+ console.error(`📦 Loading only: ${enabledTools} (${toolCategories[category].length} tools)`);
166
+ return toolCategories[category];
167
+ }
168
+ console.error(`⚠️ Unknown ENABLED_TOOLS value: ${enabledTools}. Loading all tools.`);
169
+ }
170
+ // ENABLED_TOOLS not set or 'all' - load all tools
171
+ // NOTE: Do NOT include toolCategories.pro here — pro tools are already in wordpress category.
172
+ // Including both causes "Tool X is already registered" crash.
173
+ return [
174
+ ...toolCategories.wordpress,
175
+ ...toolCategories.fluentcommunity,
176
+ ...toolCategories.fluentcart,
177
+ ...toolCategories.fluentcrm,
178
+ ...toolCategories.mlplugins,
179
+ ...toolCategories.debug
180
+ ];
181
+ }
182
+ function getFilteredHandlers() {
183
+ const enabledTools = process.env.ENABLED_TOOLS?.toLowerCase();
184
+ if (!enabledTools || enabledTools === 'all') {
185
+ // NOTE: Do NOT include handlerCategories.pro — pro handlers are already in wordpress category.
186
+ return {
187
+ ...handlerCategories.wordpress,
188
+ ...handlerCategories.fluentcommunity,
189
+ ...handlerCategories.fluentcart,
190
+ ...handlerCategories.fluentcrm,
191
+ ...handlerCategories.mlplugins,
192
+ ...handlerCategories.debug
193
+ };
194
+ }
195
+ // Map user-friendly names to internal category names
196
+ const categoryMap = {
197
+ 'wordpress': 'wordpress',
198
+ 'fluent-community': 'fluentcommunity',
199
+ 'fluentcommunity': 'fluentcommunity',
200
+ 'fluentcommunity-core': 'fluentcommunity-core',
201
+ 'fluent-community-core': 'fluentcommunity-core',
202
+ 'fluentcommunity-learning': 'fluentcommunity-learning',
203
+ 'fluent-community-learning': 'fluentcommunity-learning',
204
+ 'fluent-cart': 'fluentcart',
205
+ 'fluentcart': 'fluentcart',
206
+ 'fluent-crm': 'fluentcrm',
207
+ 'fluentcrm': 'fluentcrm',
208
+ 'mlplugins': 'mlplugins',
209
+ 'pro': 'pro',
210
+ 'fluentmcp-pro': 'pro',
211
+ 'fluent-mcp-pro': 'pro',
212
+ 'debug': 'debug'
213
+ };
214
+ const category = categoryMap[enabledTools];
215
+ if (category && handlerCategories[category]) {
216
+ return handlerCategories[category];
217
+ }
218
+ return {
219
+ ...handlerCategories.wordpress,
220
+ ...handlerCategories.fluentcommunity,
221
+ ...handlerCategories.fluentcart,
222
+ ...handlerCategories.fluentcrm,
223
+ ...handlerCategories.mlplugins,
224
+ ...handlerCategories.debug
225
+ };
226
+ }
227
+ // Export filtered tools and handlers
228
+ export const allTools = getFilteredTools();
229
+ export const toolHandlers = getFilteredHandlers();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
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",