@wplaunchify/ml-mcp-server 1.0.7 → 1.0.9

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.
@@ -0,0 +1,38 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const debugTools: Tool[];
3
+ export declare const debugHandlers: {
4
+ debug_options: (args: any) => 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
+ }>;
21
+ debug_fluentcrm: (args: any) => Promise<{
22
+ toolResult: {
23
+ content: {
24
+ type: string;
25
+ text: string;
26
+ }[];
27
+ isError?: undefined;
28
+ };
29
+ } | {
30
+ toolResult: {
31
+ isError: boolean;
32
+ content: {
33
+ type: string;
34
+ text: string;
35
+ }[];
36
+ };
37
+ }>;
38
+ };
@@ -0,0 +1,43 @@
1
+ import { makeWordPressRequest } from '../wordpress.js';
2
+ import { z } from 'zod';
3
+ /**
4
+ * Debug Tools
5
+ * Provides debugging and diagnostic tools for FluentMCP
6
+ */
7
+ // Zod Schema Definitions
8
+ const debugOptionsSchema = z.object({});
9
+ const debugFluentCRMSchema = z.object({});
10
+ // Tool Definitions
11
+ export const debugTools = [
12
+ {
13
+ name: 'debug_options',
14
+ description: 'Debug endpoint to find FluentCommunity option names and values',
15
+ inputSchema: { type: 'object', properties: debugOptionsSchema.shape }
16
+ },
17
+ {
18
+ name: 'debug_fluentcrm',
19
+ description: 'Debug endpoint to test FluentCRM API connectivity and configuration',
20
+ inputSchema: { type: 'object', properties: debugFluentCRMSchema.shape }
21
+ }
22
+ ];
23
+ // Tool Handlers
24
+ export const debugHandlers = {
25
+ debug_options: async (args) => {
26
+ try {
27
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/debug/options');
28
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
29
+ }
30
+ catch (error) {
31
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
32
+ }
33
+ },
34
+ debug_fluentcrm: async (args) => {
35
+ try {
36
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/debug/fluentcrm');
37
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
38
+ }
39
+ catch (error) {
40
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
41
+ }
42
+ }
43
+ };
@@ -0,0 +1,3 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const fluentCartAdminTools: Tool[];
3
+ export declare const fluentCartAdminHandlers: Record<string, (args: any) => Promise<any>>;
@@ -0,0 +1,180 @@
1
+ import { z } from 'zod';
2
+ import { makeWordPressRequest } from '../wordpress.js';
3
+ // ==================== ZOD SCHEMA DEFINITIONS ====================
4
+ const listFilesSchema = z.object({
5
+ per_page: z.number().optional().describe('Number of files per page (default: 20)'),
6
+ page: z.number().optional().describe('Page number (default: 1)')
7
+ });
8
+ const getPermissionsSchema = z.object({
9
+ // No parameters - returns current user permissions
10
+ });
11
+ const listIntegrationAddonsSchema = z.object({
12
+ // No parameters - returns all integration addons
13
+ });
14
+ const getGlobalSettingsSchema = z.object({
15
+ // No parameters - returns global integration settings
16
+ });
17
+ const getGlobalFeedsSchema = z.object({
18
+ // No parameters - returns global feeds
19
+ });
20
+ const listNotificationsSchema = z.object({
21
+ per_page: z.number().optional().describe('Number of notifications per page (default: 20)'),
22
+ page: z.number().optional().describe('Page number (default: 1)')
23
+ });
24
+ const getNotificationSchema = z.object({
25
+ id: z.number().describe('Notification ID')
26
+ });
27
+ const listCategoriesSchema = z.object({
28
+ per_page: z.number().optional().describe('Number of categories per page (default: 100)'),
29
+ page: z.number().optional().describe('Page number (default: 1)')
30
+ });
31
+ const getCategorySchema = z.object({
32
+ id: z.number().describe('Category ID')
33
+ });
34
+ // ==================== TOOL DEFINITIONS ====================
35
+ export const fluentCartAdminTools = [
36
+ {
37
+ name: 'fcart_list_files',
38
+ description: 'List FluentCart digital product files',
39
+ inputSchema: { type: 'object', properties: listFilesSchema.shape }
40
+ },
41
+ {
42
+ name: 'fcart_get_permissions',
43
+ description: 'Get current user FluentCart permissions and capabilities',
44
+ inputSchema: { type: 'object', properties: getPermissionsSchema.shape }
45
+ },
46
+ {
47
+ name: 'fcart_list_integration_addons',
48
+ description: 'List available FluentCart integration addons',
49
+ inputSchema: { type: 'object', properties: listIntegrationAddonsSchema.shape }
50
+ },
51
+ {
52
+ name: 'fcart_get_global_settings',
53
+ description: 'Get FluentCart global integration settings',
54
+ inputSchema: { type: 'object', properties: getGlobalSettingsSchema.shape }
55
+ },
56
+ {
57
+ name: 'fcart_get_global_feeds',
58
+ description: 'Get FluentCart global feeds configuration',
59
+ inputSchema: { type: 'object', properties: getGlobalFeedsSchema.shape }
60
+ },
61
+ {
62
+ name: 'fcart_list_notifications',
63
+ description: 'List FluentCart notifications',
64
+ inputSchema: { type: 'object', properties: listNotificationsSchema.shape }
65
+ },
66
+ {
67
+ name: 'fcart_get_notification',
68
+ description: 'Get a specific FluentCart notification by ID',
69
+ inputSchema: { type: 'object', properties: getNotificationSchema.shape }
70
+ },
71
+ {
72
+ name: 'fcart_list_categories',
73
+ description: 'List FluentCart product categories',
74
+ inputSchema: { type: 'object', properties: listCategoriesSchema.shape }
75
+ },
76
+ {
77
+ name: 'fcart_get_category',
78
+ description: 'Get a specific FluentCart product category by ID',
79
+ inputSchema: { type: 'object', properties: getCategorySchema.shape }
80
+ }
81
+ ];
82
+ // ==================== TOOL HANDLERS ====================
83
+ export const fluentCartAdminHandlers = {
84
+ fcart_list_files: async (args) => {
85
+ try {
86
+ const params = {};
87
+ if (args.per_page)
88
+ params.per_page = args.per_page;
89
+ if (args.page)
90
+ params.page = args.page;
91
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/files', params);
92
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
93
+ }
94
+ catch (error) {
95
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
96
+ }
97
+ },
98
+ fcart_get_permissions: async (args) => {
99
+ try {
100
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/permissions');
101
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
102
+ }
103
+ catch (error) {
104
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
105
+ }
106
+ },
107
+ fcart_list_integration_addons: async (args) => {
108
+ try {
109
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/integration/addons');
110
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
111
+ }
112
+ catch (error) {
113
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
114
+ }
115
+ },
116
+ fcart_get_global_settings: async (args) => {
117
+ try {
118
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/integration/global-settings');
119
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
120
+ }
121
+ catch (error) {
122
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
123
+ }
124
+ },
125
+ fcart_get_global_feeds: async (args) => {
126
+ try {
127
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/integration/global-feeds');
128
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
129
+ }
130
+ catch (error) {
131
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
132
+ }
133
+ },
134
+ fcart_list_notifications: async (args) => {
135
+ try {
136
+ const params = {};
137
+ if (args.per_page)
138
+ params.per_page = args.per_page;
139
+ if (args.page)
140
+ params.page = args.page;
141
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/notifications', params);
142
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
143
+ }
144
+ catch (error) {
145
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
146
+ }
147
+ },
148
+ fcart_get_notification: async (args) => {
149
+ try {
150
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/fluentcart/notifications/${args.id}`);
151
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
152
+ }
153
+ catch (error) {
154
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
155
+ }
156
+ },
157
+ fcart_list_categories: async (args) => {
158
+ try {
159
+ const params = {};
160
+ if (args.per_page)
161
+ params.per_page = args.per_page;
162
+ if (args.page)
163
+ params.page = args.page;
164
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/categories', params);
165
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
166
+ }
167
+ catch (error) {
168
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
169
+ }
170
+ },
171
+ fcart_get_category: async (args) => {
172
+ try {
173
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/fcart/categories/${args.id}`);
174
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
175
+ }
176
+ catch (error) {
177
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
178
+ }
179
+ }
180
+ };
@@ -0,0 +1,3 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const fluentCartAnalyticsTools: Tool[];
3
+ export declare const fluentCartAnalyticsHandlers: Record<string, (args: any) => Promise<any>>;
@@ -0,0 +1,149 @@
1
+ import { z } from 'zod';
2
+ import { makeWordPressRequest } from '../wordpress.js';
3
+ // ==================== ZOD SCHEMA DEFINITIONS ====================
4
+ const getReportsOverviewSchema = z.object({
5
+ date_from: z.string().optional().describe('Start date (YYYY-MM-DD)'),
6
+ date_to: z.string().optional().describe('End date (YYYY-MM-DD)')
7
+ });
8
+ const getQuickStatsSchema = z.object({
9
+ // No parameters - returns current quick stats
10
+ });
11
+ const getDashboardStatsSchema = z.object({
12
+ // No parameters - returns dashboard statistics
13
+ });
14
+ const getAnalyticsSchema = z.object({
15
+ date_from: z.string().optional().describe('Start date (YYYY-MM-DD)'),
16
+ date_to: z.string().optional().describe('End date (YYYY-MM-DD)'),
17
+ type: z.enum(['revenue', 'orders', 'products', 'customers']).optional().describe('Analytics type')
18
+ });
19
+ const getSettingsSchema = z.object({
20
+ // No parameters - returns all FluentCart settings
21
+ });
22
+ const listTaxClassesSchema = z.object({
23
+ per_page: z.number().optional().describe('Number of tax classes per page (default: 100)'),
24
+ page: z.number().optional().describe('Page number (default: 1)')
25
+ });
26
+ const listShippingZonesSchema = z.object({
27
+ // No parameters - returns all shipping zones
28
+ });
29
+ // ==================== TOOL DEFINITIONS ====================
30
+ export const fluentCartAnalyticsTools = [
31
+ {
32
+ name: 'fcart_get_reports_overview',
33
+ description: 'Get FluentCart reports overview with sales, revenue, and order statistics for a date range',
34
+ inputSchema: { type: 'object', properties: getReportsOverviewSchema.shape }
35
+ },
36
+ {
37
+ name: 'fcart_get_quick_stats',
38
+ description: 'Get FluentCart quick statistics (today\'s sales, pending orders, low stock items, etc.)',
39
+ inputSchema: { type: 'object', properties: getQuickStatsSchema.shape }
40
+ },
41
+ {
42
+ name: 'fcart_get_dashboard_stats',
43
+ description: 'Get FluentCart dashboard statistics and metrics overview',
44
+ inputSchema: { type: 'object', properties: getDashboardStatsSchema.shape }
45
+ },
46
+ {
47
+ name: 'fcart_get_analytics',
48
+ description: 'Get detailed FluentCart analytics (already exists but kept for compatibility)',
49
+ inputSchema: { type: 'object', properties: getAnalyticsSchema.shape }
50
+ },
51
+ {
52
+ name: 'fcart_get_settings',
53
+ description: 'Get FluentCart global settings and configuration',
54
+ inputSchema: { type: 'object', properties: getSettingsSchema.shape }
55
+ },
56
+ {
57
+ name: 'fcart_list_tax_classes',
58
+ description: 'List all FluentCart tax classes',
59
+ inputSchema: { type: 'object', properties: listTaxClassesSchema.shape }
60
+ },
61
+ {
62
+ name: 'fcart_list_shipping_zones',
63
+ description: 'List all FluentCart shipping zones and methods',
64
+ inputSchema: { type: 'object', properties: listShippingZonesSchema.shape }
65
+ }
66
+ ];
67
+ // ==================== TOOL HANDLERS ====================
68
+ export const fluentCartAnalyticsHandlers = {
69
+ fcart_get_reports_overview: async (args) => {
70
+ try {
71
+ const params = {};
72
+ if (args.date_from)
73
+ params.date_from = args.date_from;
74
+ if (args.date_to)
75
+ params.date_to = args.date_to;
76
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/reports/overview', params);
77
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
78
+ }
79
+ catch (error) {
80
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
81
+ }
82
+ },
83
+ fcart_get_quick_stats: async (args) => {
84
+ try {
85
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/reports/quick-stats');
86
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
87
+ }
88
+ catch (error) {
89
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
90
+ }
91
+ },
92
+ fcart_get_dashboard_stats: async (args) => {
93
+ try {
94
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/dashboard/stats');
95
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
96
+ }
97
+ catch (error) {
98
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
99
+ }
100
+ },
101
+ fcart_get_analytics: async (args) => {
102
+ try {
103
+ const params = {};
104
+ if (args.date_from)
105
+ params.date_from = args.date_from;
106
+ if (args.date_to)
107
+ params.date_to = args.date_to;
108
+ if (args.type)
109
+ params.type = args.type;
110
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/analytics', params);
111
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
112
+ }
113
+ catch (error) {
114
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
115
+ }
116
+ },
117
+ fcart_get_settings: async (args) => {
118
+ try {
119
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/settings');
120
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
121
+ }
122
+ catch (error) {
123
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
124
+ }
125
+ },
126
+ fcart_list_tax_classes: async (args) => {
127
+ try {
128
+ const params = {};
129
+ if (args.per_page)
130
+ params.per_page = args.per_page;
131
+ if (args.page)
132
+ params.page = args.page;
133
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/tax/classes', params);
134
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
135
+ }
136
+ catch (error) {
137
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
138
+ }
139
+ },
140
+ fcart_list_shipping_zones: async (args) => {
141
+ try {
142
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/shipping/zones');
143
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
144
+ }
145
+ catch (error) {
146
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
147
+ }
148
+ }
149
+ };
@@ -0,0 +1,3 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const fluentCartLicensingTools: Tool[];
3
+ export declare const fluentCartLicensingHandlers: Record<string, (args: any) => Promise<any>>;
@@ -0,0 +1,66 @@
1
+ import { z } from 'zod';
2
+ import { makeWordPressRequest } from '../wordpress.js';
3
+ // ==================== ZOD SCHEMA DEFINITIONS ====================
4
+ const getLicensingLineChartSchema = z.object({
5
+ date_from: z.string().optional().describe('Start date (YYYY-MM-DD)'),
6
+ date_to: z.string().optional().describe('End date (YYYY-MM-DD)')
7
+ });
8
+ const getLicensingPieChartSchema = z.object({
9
+ // No parameters - returns license distribution
10
+ });
11
+ const getLicensingSummarySchema = z.object({
12
+ // No parameters - returns licensing summary stats
13
+ });
14
+ // ==================== TOOL DEFINITIONS ====================
15
+ export const fluentCartLicensingTools = [
16
+ {
17
+ name: 'fcart_get_licensing_line_chart',
18
+ description: 'Get FluentCart licensing line chart data showing license activations over time',
19
+ inputSchema: { type: 'object', properties: getLicensingLineChartSchema.shape }
20
+ },
21
+ {
22
+ name: 'fcart_get_licensing_pie_chart',
23
+ description: 'Get FluentCart licensing pie chart data showing license distribution by status',
24
+ inputSchema: { type: 'object', properties: getLicensingPieChartSchema.shape }
25
+ },
26
+ {
27
+ name: 'fcart_get_licensing_summary',
28
+ description: 'Get FluentCart licensing summary with total licenses, active, expired, and revenue',
29
+ inputSchema: { type: 'object', properties: getLicensingSummarySchema.shape }
30
+ }
31
+ ];
32
+ // ==================== TOOL HANDLERS ====================
33
+ export const fluentCartLicensingHandlers = {
34
+ fcart_get_licensing_line_chart: async (args) => {
35
+ try {
36
+ const params = {};
37
+ if (args.date_from)
38
+ params.date_from = args.date_from;
39
+ if (args.date_to)
40
+ params.date_to = args.date_to;
41
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/licensing/line-chart', params);
42
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
43
+ }
44
+ catch (error) {
45
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
46
+ }
47
+ },
48
+ fcart_get_licensing_pie_chart: async (args) => {
49
+ try {
50
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/licensing/pie-chart');
51
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
52
+ }
53
+ catch (error) {
54
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
55
+ }
56
+ },
57
+ fcart_get_licensing_summary: async (args) => {
58
+ try {
59
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fluentcart/licensing/summary');
60
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
61
+ }
62
+ catch (error) {
63
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
64
+ }
65
+ }
66
+ };
@@ -0,0 +1,3 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const fluentCommunityAdminTools: Tool[];
3
+ export declare const fluentCommunityAdminHandlers: Record<string, (args: any) => Promise<any>>;
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ import { makeWordPressRequest } from '../wordpress.js';
3
+ // ==================== ZOD SCHEMA DEFINITIONS ====================
4
+ const cleanupMembersSchema = z.object({
5
+ // No parameters - cleans up orphaned member records
6
+ });
7
+ const listTermsSchema = z.object({
8
+ taxonomy: z.string().describe('Taxonomy slug (e.g., category, post_tag, or custom taxonomy)'),
9
+ per_page: z.number().optional().describe('Number of terms per page (default: 100)'),
10
+ page: z.number().optional().describe('Page number (default: 1)')
11
+ });
12
+ // ==================== TOOL DEFINITIONS ====================
13
+ export const fluentCommunityAdminTools = [
14
+ {
15
+ name: 'fc_cleanup_members',
16
+ description: 'Cleanup orphaned FluentCommunity member records (maintenance tool)',
17
+ inputSchema: { type: 'object', properties: cleanupMembersSchema.shape }
18
+ },
19
+ {
20
+ name: 'fc_list_terms',
21
+ description: 'List FluentCommunity taxonomy terms (categories, tags, or custom taxonomies)',
22
+ inputSchema: { type: 'object', properties: listTermsSchema.shape }
23
+ }
24
+ ];
25
+ // ==================== TOOL HANDLERS ====================
26
+ export const fluentCommunityAdminHandlers = {
27
+ fc_cleanup_members: async (args) => {
28
+ try {
29
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/members/cleanup');
30
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
31
+ }
32
+ catch (error) {
33
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
34
+ }
35
+ },
36
+ fc_list_terms: async (args) => {
37
+ try {
38
+ const params = {
39
+ taxonomy: args.taxonomy
40
+ };
41
+ if (args.per_page)
42
+ params.per_page = args.per_page;
43
+ if (args.page)
44
+ params.page = args.page;
45
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/terms', params);
46
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
47
+ }
48
+ catch (error) {
49
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
50
+ }
51
+ }
52
+ };
@@ -0,0 +1,3 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const fluentCommunityChatTools: Tool[];
3
+ export declare const fluentCommunityChatHandlers: Record<string, (args: any) => Promise<any>>;
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ import { makeWordPressRequest } from '../wordpress.js';
3
+ // ==================== ZOD SCHEMA DEFINITIONS ====================
4
+ const listChatThreadsSchema = z.object({
5
+ per_page: z.number().optional().describe('Number of threads per page (default: 20)'),
6
+ page: z.number().optional().describe('Page number (default: 1)')
7
+ });
8
+ const listChatMessagesSchema = z.object({
9
+ id: z.number().describe('Thread ID'),
10
+ per_page: z.number().optional().describe('Number of messages per page (default: 50)'),
11
+ page: z.number().optional().describe('Page number (default: 1)')
12
+ });
13
+ // ==================== TOOL DEFINITIONS ====================
14
+ export const fluentCommunityChatTools = [
15
+ {
16
+ name: 'fc_list_chat_threads',
17
+ description: 'List FluentCommunity chat threads',
18
+ inputSchema: { type: 'object', properties: listChatThreadsSchema.shape }
19
+ },
20
+ {
21
+ name: 'fc_list_chat_messages',
22
+ description: 'List messages in a specific FluentCommunity chat thread',
23
+ inputSchema: { type: 'object', properties: listChatMessagesSchema.shape }
24
+ }
25
+ ];
26
+ // ==================== TOOL HANDLERS ====================
27
+ export const fluentCommunityChatHandlers = {
28
+ fc_list_chat_threads: async (args) => {
29
+ try {
30
+ const params = {};
31
+ if (args.per_page)
32
+ params.per_page = args.per_page;
33
+ if (args.page)
34
+ params.page = args.page;
35
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/chat/threads', params);
36
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
37
+ }
38
+ catch (error) {
39
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
40
+ }
41
+ },
42
+ fc_list_chat_messages: async (args) => {
43
+ try {
44
+ const params = {};
45
+ if (args.per_page)
46
+ params.per_page = args.per_page;
47
+ if (args.page)
48
+ params.page = args.page;
49
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/chat/threads/${args.id}/messages`, params);
50
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
51
+ }
52
+ catch (error) {
53
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
54
+ }
55
+ }
56
+ };
@@ -1,6 +1,40 @@
1
1
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
2
  export declare const allTools: Tool[];
3
3
  export declare const toolHandlers: {
4
+ debug_options: (args: any) => 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
+ }>;
21
+ debug_fluentcrm: (args: any) => Promise<{
22
+ toolResult: {
23
+ content: {
24
+ type: string;
25
+ text: string;
26
+ }[];
27
+ isError?: undefined;
28
+ };
29
+ } | {
30
+ toolResult: {
31
+ isError: boolean;
32
+ content: {
33
+ type: string;
34
+ text: string;
35
+ }[];
36
+ };
37
+ }>;
4
38
  mlmh_search_images: (args: any) => Promise<{
5
39
  toolResult: {
6
40
  content: {
@@ -12,26 +12,36 @@ import { fluentCartTools, fluentCartHandlers } from './fluent-cart.js';
12
12
  import { fluentCRMTools, fluentCRMHandlers } from './fluent-crm.js';
13
13
  import { mlCanvasTools, mlCanvasHandlers } from './ml-canvas.js';
14
14
  import { mlImageEditorTools, mlImageEditorHandlers } from './ml-image-editor.js';
15
- import { fluentAffiliateTools, fluentAffiliateHandlers } from './fluent-affiliate.js';
16
15
  import { mlMediaHubTools, mlMediaHubHandlers } from './ml-media-hub.js';
17
- // Combine all tools - WordPress + FluentCommunity + FluentCRM + FluentCart + ML Plugins = 145 tools
16
+ import { debugTools, debugHandlers } from './debug.js';
17
+ import { fluentCartAnalyticsTools, fluentCartAnalyticsHandlers } from './fluent-cart-analytics.js';
18
+ import { fluentCartLicensingTools, fluentCartLicensingHandlers } from './fluent-cart-licensing.js';
19
+ import { fluentCartAdminTools, fluentCartAdminHandlers } from './fluent-cart-admin.js';
20
+ import { fluentCommunityChatTools, fluentCommunityChatHandlers } from './fluent-community-chat.js';
21
+ import { fluentCommunityAdminTools, fluentCommunityAdminHandlers } from './fluent-community-admin.js';
22
+ // Combine all tools - WordPress + FluentCommunity + FluentCRM + FluentCart + ML Plugins
18
23
  export const allTools = [
19
- ...unifiedContentTools, // 8 tools (unified content management)
20
- ...unifiedTaxonomyTools, // 8 tools (unified taxonomy management)
21
- ...pluginTools, // 5 tools (WordPress plugin management)
22
- ...mediaTools, // 4 tools (WordPress media library)
23
- ...userTools, // 5 tools (WordPress user management)
24
- ...pluginRepositoryTools, // 2 tools (WordPress.org plugin repository)
25
- ...commentTools, // 5 tools (WordPress comments)
26
- ...fluentCommunityTools, // 21 tools (FluentCommunity spaces, posts, members)
27
- ...fluentCommunityDesignTools, // 6 tools (FluentCommunity colors, branding, CSS)
28
- ...fluentCommunityLayoutTools, // 2 tools (FluentCommunity layout control)
29
- ...fluentCRMTools, // 19 tools (FluentCRM contacts, lists, campaigns)
30
- ...fluentCartTools, // 31 tools (FluentCart products, orders, customers)
31
- ...fluentAffiliateTools, // 0 tools (FluentAffiliate - coming soon)
32
- ...mlCanvasTools, // 3 tools (ML Canvas Block surgical HTML editing)
33
- ...mlImageEditorTools, // 8 tools (ML Image Editor AI generation/editing)
34
- ...mlMediaHubTools // 18 tools (ML Media Hub: basic + advanced search/filters)
24
+ ...unifiedContentTools, // WordPress Core: unified content management
25
+ ...unifiedTaxonomyTools, // WordPress Core: unified taxonomy management
26
+ ...pluginTools, // WordPress Core: plugin management
27
+ ...mediaTools, // WordPress Core: media library
28
+ ...userTools, // WordPress Core: user management
29
+ ...pluginRepositoryTools, // WordPress Core: WordPress.org plugin repository
30
+ ...commentTools, // WordPress Core: comments
31
+ ...fluentCommunityTools, // FluentCommunity: spaces, posts, members
32
+ ...fluentCommunityDesignTools, // FluentCommunity: colors, branding, CSS
33
+ ...fluentCommunityLayoutTools, // FluentCommunity: layout control
34
+ ...fluentCommunityChatTools, // FluentCommunity: chat threads, messages
35
+ ...fluentCommunityAdminTools, // FluentCommunity: cleanup, terms
36
+ ...fluentCRMTools, // FluentCRM: contacts, lists, campaigns
37
+ ...fluentCartTools, // FluentCart: products, orders, customers, subscriptions
38
+ ...fluentCartAnalyticsTools, // FluentCart: reports, stats, analytics
39
+ ...fluentCartLicensingTools, // FluentCart: licensing charts, summary
40
+ ...fluentCartAdminTools, // FluentCart: files, categories, notifications, settings
41
+ ...mlCanvasTools, // ML Canvas Block: surgical HTML editing
42
+ ...mlImageEditorTools, // ML Image Editor: AI generation/editing
43
+ ...mlMediaHubTools, // ML Media Hub: image/icon search and filters
44
+ ...debugTools // Debug: diagnostic tools
35
45
  ];
36
46
  // Combine all handlers
37
47
  export const toolHandlers = {
@@ -45,10 +55,15 @@ export const toolHandlers = {
45
55
  ...fluentCommunityHandlers,
46
56
  ...fluentCommunityDesignHandlers,
47
57
  ...fluentCommunityLayoutHandlers,
58
+ ...fluentCommunityChatHandlers,
59
+ ...fluentCommunityAdminHandlers,
48
60
  ...fluentCRMHandlers,
49
61
  ...fluentCartHandlers,
50
- ...fluentAffiliateHandlers,
62
+ ...fluentCartAnalyticsHandlers,
63
+ ...fluentCartLicensingHandlers,
64
+ ...fluentCartAdminHandlers,
51
65
  ...mlCanvasHandlers,
52
66
  ...mlImageEditorHandlers,
53
- ...mlMediaHubHandlers
67
+ ...mlMediaHubHandlers,
68
+ ...debugHandlers
54
69
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "1.0.7",
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.",
3
+ "version": "1.0.9",
4
+ "description": "Universal MCP Server for WordPress + Fluent Suite (Community, CRM, Cart) + MinuteLaunch Plugins. Comprehensive 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",