@wplaunchify/ml-mcp-server 2.7.1 → 2.7.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.
- package/build/tools/index.js +6 -3
- package/build/tools/ml-social.d.ts +117 -0
- package/build/tools/ml-social.js +139 -0
- package/package.json +1 -1
package/build/tools/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import { fluentCommunityAdminTools, fluentCommunityAdminHandlers } from './fluen
|
|
|
24
24
|
import { fluentCommunityCoreTools, fluentCommunityCoreHandlers } from './fluent-community-core.js';
|
|
25
25
|
import { fluentCommunityLearningTools, fluentCommunityLearningHandlers } from './fluent-community-learning.js';
|
|
26
26
|
import { fluentMcpProTools, fluentMcpProHandlers } from './fluent-mcp-pro.js';
|
|
27
|
+
import { mlSocialTools, mlSocialHandlers } from './ml-social.js';
|
|
27
28
|
// Tool categories for selective loading
|
|
28
29
|
const toolCategories = {
|
|
29
30
|
wordpress: [
|
|
@@ -37,7 +38,8 @@ const toolCategories = {
|
|
|
37
38
|
...mlCanvasTools,
|
|
38
39
|
...mlSimpleSiteTools,
|
|
39
40
|
...mlImageEditorTools, // AI image generation via ML Image Editor
|
|
40
|
-
...mlMediaHubTools // Image search & icon import via ML Media Hub P2P
|
|
41
|
+
...mlMediaHubTools, // Image search & icon import via ML Media Hub P2P
|
|
42
|
+
...mlSocialTools // Social media publishing via ML Social
|
|
41
43
|
],
|
|
42
44
|
// Full FluentCommunity (91 tools) - legacy support
|
|
43
45
|
fluentcommunity: [
|
|
@@ -80,7 +82,7 @@ const toolCategories = {
|
|
|
80
82
|
]
|
|
81
83
|
};
|
|
82
84
|
const handlerCategories = {
|
|
83
|
-
// WP (ENABLED_TOOLS=wordpress) - 45+ tools (includes ML Image Editor & Media Hub)
|
|
85
|
+
// WP (ENABLED_TOOLS=wordpress) - 45+ tools (includes ML Image Editor & Media Hub & Social)
|
|
84
86
|
wordpress: {
|
|
85
87
|
...unifiedContentHandlers,
|
|
86
88
|
...unifiedTaxonomyHandlers,
|
|
@@ -92,7 +94,8 @@ const handlerCategories = {
|
|
|
92
94
|
...mlCanvasHandlers, // ML Canvas Block tools
|
|
93
95
|
...mlSimpleSiteHandlers, // ML Simple Site tools
|
|
94
96
|
...mlImageEditorHandlers, // AI image generation
|
|
95
|
-
...mlMediaHubHandlers // Image search & icon import
|
|
97
|
+
...mlMediaHubHandlers, // Image search & icon import
|
|
98
|
+
...mlSocialHandlers // Social media publishing
|
|
96
99
|
},
|
|
97
100
|
fluentcommunity: {
|
|
98
101
|
...fluentCommunityHandlers,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const mlSocialTools: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {};
|
|
8
|
+
};
|
|
9
|
+
} | {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object";
|
|
14
|
+
properties: {
|
|
15
|
+
content: z.ZodString;
|
|
16
|
+
platforms: z.ZodArray<z.ZodObject<{
|
|
17
|
+
accountId: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
accountId: string;
|
|
20
|
+
}, {
|
|
21
|
+
accountId: string;
|
|
22
|
+
}>, "many">;
|
|
23
|
+
mediaItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
url: z.ZodString;
|
|
25
|
+
type: z.ZodEnum<["image", "video"]>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
url: string;
|
|
28
|
+
type: "image" | "video";
|
|
29
|
+
}, {
|
|
30
|
+
url: string;
|
|
31
|
+
type: "image" | "video";
|
|
32
|
+
}>, "many">>;
|
|
33
|
+
scheduledFor: z.ZodOptional<z.ZodString>;
|
|
34
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
35
|
+
publishNow: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: "object";
|
|
43
|
+
properties: {
|
|
44
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
})[];
|
|
48
|
+
export declare const mlSocialHandlers: {
|
|
49
|
+
social_status: (args: any) => Promise<{
|
|
50
|
+
toolResult: {
|
|
51
|
+
content: {
|
|
52
|
+
type: string;
|
|
53
|
+
text: string;
|
|
54
|
+
}[];
|
|
55
|
+
isError?: undefined;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
toolResult: {
|
|
59
|
+
isError: boolean;
|
|
60
|
+
content: {
|
|
61
|
+
type: string;
|
|
62
|
+
text: string;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
social_accounts: (args: any) => Promise<{
|
|
67
|
+
toolResult: {
|
|
68
|
+
content: {
|
|
69
|
+
type: string;
|
|
70
|
+
text: string;
|
|
71
|
+
}[];
|
|
72
|
+
isError?: undefined;
|
|
73
|
+
};
|
|
74
|
+
} | {
|
|
75
|
+
toolResult: {
|
|
76
|
+
isError: boolean;
|
|
77
|
+
content: {
|
|
78
|
+
type: string;
|
|
79
|
+
text: string;
|
|
80
|
+
}[];
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
83
|
+
social_publish: (args: any) => Promise<{
|
|
84
|
+
toolResult: {
|
|
85
|
+
content: {
|
|
86
|
+
type: string;
|
|
87
|
+
text: string;
|
|
88
|
+
}[];
|
|
89
|
+
isError?: undefined;
|
|
90
|
+
};
|
|
91
|
+
} | {
|
|
92
|
+
toolResult: {
|
|
93
|
+
isError: boolean;
|
|
94
|
+
content: {
|
|
95
|
+
type: string;
|
|
96
|
+
text: string;
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
}>;
|
|
100
|
+
social_posts: (args: any) => Promise<{
|
|
101
|
+
toolResult: {
|
|
102
|
+
content: {
|
|
103
|
+
type: string;
|
|
104
|
+
text: string;
|
|
105
|
+
}[];
|
|
106
|
+
isError?: undefined;
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
toolResult: {
|
|
110
|
+
isError: boolean;
|
|
111
|
+
content: {
|
|
112
|
+
type: string;
|
|
113
|
+
text: string;
|
|
114
|
+
}[];
|
|
115
|
+
};
|
|
116
|
+
}>;
|
|
117
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { makeWordPressRequest } from '../wordpress.js';
|
|
3
|
+
// ML Social Tools - Social Media Publishing via Late API
|
|
4
|
+
// Requires ML Social plugin on WordPress
|
|
5
|
+
export const mlSocialTools = [
|
|
6
|
+
{
|
|
7
|
+
name: 'social_status',
|
|
8
|
+
description: 'Check ML Social connection status - returns whether Late API is configured and connected, plus account/platform counts',
|
|
9
|
+
inputSchema: { type: 'object', properties: {} },
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: 'social_accounts',
|
|
13
|
+
description: 'List all connected social media accounts with their IDs, platforms, and usernames. Use these account IDs when publishing posts.',
|
|
14
|
+
inputSchema: { type: 'object', properties: {} },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'social_publish',
|
|
18
|
+
description: 'Publish content to one or more social media platforms. Supports immediate posting or scheduling. First call social_accounts to get valid account IDs.',
|
|
19
|
+
inputSchema: { type: 'object', properties: z.object({
|
|
20
|
+
content: z.string().describe('Post text content (required). Platform character limits: Twitter 280, LinkedIn 3000, Instagram 2200'),
|
|
21
|
+
platforms: z.array(z.object({
|
|
22
|
+
accountId: z.string().describe('Account ID from social_accounts'),
|
|
23
|
+
})).describe('Array of platform objects. Each must have accountId from social_accounts.'),
|
|
24
|
+
mediaItems: z.array(z.object({
|
|
25
|
+
url: z.string().describe('Public URL to image or video'),
|
|
26
|
+
type: z.enum(['image', 'video']).describe('Media type'),
|
|
27
|
+
})).optional().describe('Optional array of media attachments'),
|
|
28
|
+
scheduledFor: z.string().optional().describe('Optional ISO 8601 timestamp to schedule post (e.g., 2026-02-05T09:00:00Z)'),
|
|
29
|
+
timezone: z.string().optional().describe('Optional timezone for scheduled posts (e.g., America/Chicago)'),
|
|
30
|
+
publishNow: z.boolean().optional().describe('Set to true to publish immediately (default). Set to false with scheduledFor to schedule.'),
|
|
31
|
+
}).shape },
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'social_posts',
|
|
35
|
+
description: 'List recent social media posts created through ML Social. Shows post content, platforms, status, and timestamps.',
|
|
36
|
+
inputSchema: { type: 'object', properties: z.object({
|
|
37
|
+
limit: z.number().optional().describe('Number of posts to return (default: 20, max: 100)'),
|
|
38
|
+
}).shape },
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
export const mlSocialHandlers = {
|
|
42
|
+
social_status: async (args) => {
|
|
43
|
+
try {
|
|
44
|
+
const response = await makeWordPressRequest('GET', 'ml-social/v1/status');
|
|
45
|
+
return {
|
|
46
|
+
toolResult: {
|
|
47
|
+
content: [{
|
|
48
|
+
type: 'text',
|
|
49
|
+
text: JSON.stringify(response, null, 2)
|
|
50
|
+
}]
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
return {
|
|
56
|
+
toolResult: {
|
|
57
|
+
isError: true,
|
|
58
|
+
content: [{
|
|
59
|
+
type: 'text',
|
|
60
|
+
text: `Error checking social status: ${error.message}`
|
|
61
|
+
}]
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
social_accounts: async (args) => {
|
|
67
|
+
try {
|
|
68
|
+
const response = await makeWordPressRequest('GET', 'ml-social/v1/accounts');
|
|
69
|
+
return {
|
|
70
|
+
toolResult: {
|
|
71
|
+
content: [{
|
|
72
|
+
type: 'text',
|
|
73
|
+
text: JSON.stringify(response, null, 2)
|
|
74
|
+
}]
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return {
|
|
80
|
+
toolResult: {
|
|
81
|
+
isError: true,
|
|
82
|
+
content: [{
|
|
83
|
+
type: 'text',
|
|
84
|
+
text: `Error listing social accounts: ${error.message}`
|
|
85
|
+
}]
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
social_publish: async (args) => {
|
|
91
|
+
try {
|
|
92
|
+
const response = await makeWordPressRequest('POST', 'ml-social/v1/post', args);
|
|
93
|
+
return {
|
|
94
|
+
toolResult: {
|
|
95
|
+
content: [{
|
|
96
|
+
type: 'text',
|
|
97
|
+
text: JSON.stringify(response, null, 2)
|
|
98
|
+
}]
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
return {
|
|
104
|
+
toolResult: {
|
|
105
|
+
isError: true,
|
|
106
|
+
content: [{
|
|
107
|
+
type: 'text',
|
|
108
|
+
text: `Error publishing to social: ${error.message}`
|
|
109
|
+
}]
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
social_posts: async (args) => {
|
|
115
|
+
try {
|
|
116
|
+
const params = args.limit ? `?limit=${args.limit}` : '';
|
|
117
|
+
const response = await makeWordPressRequest('GET', `ml-social/v1/posts${params}`);
|
|
118
|
+
return {
|
|
119
|
+
toolResult: {
|
|
120
|
+
content: [{
|
|
121
|
+
type: 'text',
|
|
122
|
+
text: JSON.stringify(response, null, 2)
|
|
123
|
+
}]
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
return {
|
|
129
|
+
toolResult: {
|
|
130
|
+
isError: true,
|
|
131
|
+
content: [{
|
|
132
|
+
type: 'text',
|
|
133
|
+
text: `Error listing social posts: ${error.message}`
|
|
134
|
+
}]
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wplaunchify/ml-mcp-server",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.2",
|
|
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",
|