@wplaunchify/ml-mcp-server 1.0.5 → 1.0.7
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/server.js +35 -2
- package/build/tools/fluent-community.js +3 -3
- package/package.json +66 -66
package/build/server.js
CHANGED
|
@@ -6,10 +6,43 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
7
|
import { allTools, toolHandlers } from './tools/index.js';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
+
// Generate server name from WordPress URL
|
|
10
|
+
function generateServerName() {
|
|
11
|
+
const apiUrl = process.env.WORDPRESS_API_URL || '';
|
|
12
|
+
const customName = process.env.MCP_SERVER_NAME;
|
|
13
|
+
if (customName) {
|
|
14
|
+
return customName;
|
|
15
|
+
}
|
|
16
|
+
if (!apiUrl) {
|
|
17
|
+
return 'wordpress';
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const url = new URL(apiUrl);
|
|
21
|
+
const hostname = url.hostname;
|
|
22
|
+
const parts = hostname.split('.');
|
|
23
|
+
if (parts.length >= 3) {
|
|
24
|
+
// e.g., fccmanagermcp.instawp.co
|
|
25
|
+
const subdomain = parts[0];
|
|
26
|
+
const domain = parts[1];
|
|
27
|
+
// Try with domain (no TLD): fccmanagermcp-instawp
|
|
28
|
+
const withDomain = `${subdomain}-${domain}`;
|
|
29
|
+
if (withDomain.length <= 25) {
|
|
30
|
+
return withDomain;
|
|
31
|
+
}
|
|
32
|
+
// Fallback to subdomain only: fccmanagermcp
|
|
33
|
+
return subdomain;
|
|
34
|
+
}
|
|
35
|
+
// Fallback to hostname without TLD
|
|
36
|
+
return parts.slice(0, -1).join('-') || 'wordpress';
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
return 'wordpress';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
9
42
|
// Create MCP server instance
|
|
10
43
|
const server = new McpServer({
|
|
11
|
-
name:
|
|
12
|
-
version: "
|
|
44
|
+
name: generateServerName(),
|
|
45
|
+
version: "1.0.7"
|
|
13
46
|
}, {
|
|
14
47
|
capabilities: {
|
|
15
48
|
tools: allTools.reduce((acc, tool) => {
|
|
@@ -317,7 +317,7 @@ export const fluentCommunityHandlers = {
|
|
|
317
317
|
fc_update_post: async (args) => {
|
|
318
318
|
try {
|
|
319
319
|
const { post_id, ...updateData } = args;
|
|
320
|
-
const response = await makeWordPressRequest('
|
|
320
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/posts/${post_id}`, updateData);
|
|
321
321
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
322
322
|
}
|
|
323
323
|
catch (error) {
|
|
@@ -379,7 +379,7 @@ export const fluentCommunityHandlers = {
|
|
|
379
379
|
fc_update_space: async (args) => {
|
|
380
380
|
try {
|
|
381
381
|
const { space_id, ...updateData } = args;
|
|
382
|
-
const response = await makeWordPressRequest('
|
|
382
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/spaces/${space_id}`, updateData);
|
|
383
383
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
384
384
|
}
|
|
385
385
|
catch (error) {
|
|
@@ -420,7 +420,7 @@ export const fluentCommunityHandlers = {
|
|
|
420
420
|
fc_update_comment: async (args) => {
|
|
421
421
|
try {
|
|
422
422
|
const { comment_id, ...updateData } = args;
|
|
423
|
-
const response = await makeWordPressRequest('
|
|
423
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/comments/${comment_id}`, updateData);
|
|
424
424
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
425
425
|
}
|
|
426
426
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@wplaunchify/ml-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
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
|
-
"type": "module",
|
|
6
|
-
"main": "./build/server.js",
|
|
7
|
-
"exports": "./build/server.js",
|
|
8
|
-
"bin": {
|
|
9
|
-
"ml-mcp-server": "./build/server.js"
|
|
10
|
-
},
|
|
11
|
-
"engines": {
|
|
12
|
-
"node": ">=18.0.0"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsc --project tsconfig.json",
|
|
16
|
-
"start": "node ./build/server.js",
|
|
17
|
-
"dev": "tsx watch src/server.ts",
|
|
18
|
-
"clean": "rimraf build",
|
|
19
|
-
"prepare": "npm run build"
|
|
20
|
-
},
|
|
21
|
-
"keywords": [
|
|
22
|
-
"wordpress",
|
|
23
|
-
"mcp",
|
|
24
|
-
"model-context-protocol",
|
|
25
|
-
"fluent-community",
|
|
26
|
-
"fluent-crm",
|
|
27
|
-
"fluent-cart",
|
|
28
|
-
"minutelaunch",
|
|
29
|
-
"ai",
|
|
30
|
-
"claude",
|
|
31
|
-
"cursor"
|
|
32
|
-
],
|
|
33
|
-
"author": "1WD LLC",
|
|
34
|
-
"license": "MIT",
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "https://github.com/wplaunchify/ml-mcp-server.git"
|
|
38
|
-
},
|
|
39
|
-
"bugs": {
|
|
40
|
-
"url": "https://github.com/wplaunchify/ml-mcp-server/issues"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://github.com/wplaunchify/ml-mcp-server#readme",
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@modelcontextprotocol/sdk": "^1.4.1",
|
|
45
|
-
"axios": "^1.6.7",
|
|
46
|
-
"dotenv": "^16.4.5",
|
|
47
|
-
"fs-extra": "^11.2.0",
|
|
48
|
-
"zod": "^3.23.8",
|
|
49
|
-
"zod-to-json-schema": "^3.24.1"
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@types/fs-extra": "^11.0.4",
|
|
53
|
-
"@types/node": "^22.10.0",
|
|
54
|
-
"rimraf": "^5.0.5",
|
|
55
|
-
"tsx": "^4.7.1",
|
|
56
|
-
"typescript": "^5.3.3"
|
|
57
|
-
},
|
|
58
|
-
"publishConfig": {
|
|
59
|
-
"access": "public"
|
|
60
|
-
},
|
|
61
|
-
"files": [
|
|
62
|
-
"build",
|
|
63
|
-
"README.md",
|
|
64
|
-
"LICENSE"
|
|
65
|
-
]
|
|
66
|
-
}
|
|
1
|
+
{
|
|
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.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./build/server.js",
|
|
7
|
+
"exports": "./build/server.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"ml-mcp-server": "./build/server.js"
|
|
10
|
+
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=18.0.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc --project tsconfig.json",
|
|
16
|
+
"start": "node ./build/server.js",
|
|
17
|
+
"dev": "tsx watch src/server.ts",
|
|
18
|
+
"clean": "rimraf build",
|
|
19
|
+
"prepare": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"wordpress",
|
|
23
|
+
"mcp",
|
|
24
|
+
"model-context-protocol",
|
|
25
|
+
"fluent-community",
|
|
26
|
+
"fluent-crm",
|
|
27
|
+
"fluent-cart",
|
|
28
|
+
"minutelaunch",
|
|
29
|
+
"ai",
|
|
30
|
+
"claude",
|
|
31
|
+
"cursor"
|
|
32
|
+
],
|
|
33
|
+
"author": "1WD LLC",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/wplaunchify/ml-mcp-server.git"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/wplaunchify/ml-mcp-server/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/wplaunchify/ml-mcp-server#readme",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.4.1",
|
|
45
|
+
"axios": "^1.6.7",
|
|
46
|
+
"dotenv": "^16.4.5",
|
|
47
|
+
"fs-extra": "^11.2.0",
|
|
48
|
+
"zod": "^3.23.8",
|
|
49
|
+
"zod-to-json-schema": "^3.24.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/fs-extra": "^11.0.4",
|
|
53
|
+
"@types/node": "^22.10.0",
|
|
54
|
+
"rimraf": "^5.0.5",
|
|
55
|
+
"tsx": "^4.7.1",
|
|
56
|
+
"typescript": "^5.3.3"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"files": [
|
|
62
|
+
"build",
|
|
63
|
+
"README.md",
|
|
64
|
+
"LICENSE"
|
|
65
|
+
]
|
|
66
|
+
}
|