@wplaunchify/ml-mcp-server 2.7.17 → 2.7.18
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/launch.mjs +19 -55
- package/package.json +1 -1
package/launch.mjs
CHANGED
|
@@ -1,64 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* MCP entrypoint:
|
|
4
|
-
*
|
|
3
|
+
* MCP entrypoint: run ml-mcp-server-core from this package (no second npx, no registry wait).
|
|
4
|
+
* Claude Desktop / Cursor spawn: npx -y --prefer-online @wplaunchify/ml-mcp-server@latest
|
|
5
|
+
* npx installs the package; this script starts build/server.js with inherited stdio.
|
|
5
6
|
*/
|
|
6
7
|
import { spawn } from 'node:child_process';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
import { dirname, join } from 'path';
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
const REGISTRY_URL = 'https://registry.npmjs.org/@wplaunchify%2fml-mcp-server/latest';
|
|
11
|
+
const core = join(dirname(fileURLToPath(import.meta.url)), 'build', 'server.js');
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
if (!res.ok) {
|
|
17
|
-
throw new Error(`npm registry HTTP ${res.status}`);
|
|
18
|
-
}
|
|
19
|
-
const data = await res.json();
|
|
20
|
-
if (!data || !data.version) {
|
|
21
|
-
throw new Error('npm registry returned no version');
|
|
22
|
-
}
|
|
23
|
-
return data.version;
|
|
24
|
-
}
|
|
13
|
+
const child = spawn(process.execPath, [core], {
|
|
14
|
+
stdio: 'inherit',
|
|
15
|
+
env: process.env,
|
|
16
|
+
});
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'--prefer-online',
|
|
31
|
-
`--package=${PACKAGE}@${version}`,
|
|
32
|
-
'ml-mcp-server-core',
|
|
33
|
-
];
|
|
34
|
-
const child = spawn('npx', npxArgs, {
|
|
35
|
-
stdio: 'inherit',
|
|
36
|
-
env: process.env,
|
|
37
|
-
shell: isWin,
|
|
38
|
-
});
|
|
39
|
-
child.on('error', (err) => {
|
|
40
|
-
console.error('[ml-mcp-server] Could not start MCP server:', err.message);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
});
|
|
43
|
-
child.on('exit', (code, signal) => {
|
|
44
|
-
if (signal) {
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
process.exit(code ?? 0);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
18
|
+
child.on('error', (err) => {
|
|
19
|
+
console.error('[ml-mcp-server] Could not start:', err.message);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
});
|
|
50
22
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
version = await getLatestVersion();
|
|
55
|
-
} catch (err) {
|
|
56
|
-
console.error(
|
|
57
|
-
'[ml-mcp-server] Registry check failed; falling back to @latest:',
|
|
58
|
-
err.message
|
|
59
|
-
);
|
|
23
|
+
child.on('exit', (code, signal) => {
|
|
24
|
+
if (signal) {
|
|
25
|
+
process.exit(1);
|
|
60
26
|
}
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
main();
|
|
27
|
+
process.exit(code ?? 0);
|
|
28
|
+
});
|
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.18",
|
|
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",
|