moflo 4.6.1 → 4.6.3
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/package.json +1 -1
- package/src/@claude-flow/cli/bin/cli.js +20 -1
- package/src/@claude-flow/cli/dist/src/commands/doctor.js +2 -2
- package/src/@claude-flow/cli/dist/src/init/executor.js +455 -453
- package/src/@claude-flow/cli/dist/src/init/mcp-generator.d.ts +5 -1
- package/src/@claude-flow/cli/dist/src/init/mcp-generator.js +19 -46
- package/src/@claude-flow/cli/dist/src/init/moflo-init.js +549 -549
- package/src/@claude-flow/cli/dist/src/mcp-server.js +23 -1
- package/src/@claude-flow/cli/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP Configuration Generator
|
|
3
3
|
* Creates .mcp.json for Claude Code MCP server integration
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* Note: Claude Code spawns MCP servers as child processes using the
|
|
6
|
+
* command/args from .mcp.json. On all platforms (including Windows),
|
|
7
|
+
* using `npx` directly works correctly. The previous `cmd /c` wrapper
|
|
8
|
+
* on Windows caused MCP servers to fail to start.
|
|
5
9
|
*/
|
|
6
10
|
import type { InitOptions } from './types.js';
|
|
7
11
|
/**
|
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP Configuration Generator
|
|
3
3
|
* Creates .mcp.json for Claude Code MCP server integration
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* Note: Claude Code spawns MCP servers as child processes using the
|
|
6
|
+
* command/args from .mcp.json. On all platforms (including Windows),
|
|
7
|
+
* using `npx` directly works correctly. The previous `cmd /c` wrapper
|
|
8
|
+
* on Windows caused MCP servers to fail to start.
|
|
5
9
|
*/
|
|
6
10
|
/**
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return process.platform === 'win32';
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Generate platform-specific MCP server entry
|
|
14
|
-
* - Windows: uses 'cmd /c npx' directly
|
|
15
|
-
* - Unix: uses 'npx' directly (simple, reliable)
|
|
11
|
+
* Generate MCP server entry
|
|
12
|
+
* Uses `npx` directly on all platforms — Claude Code handles process
|
|
13
|
+
* spawning correctly without needing a cmd.exe wrapper.
|
|
16
14
|
*/
|
|
17
15
|
function createMCPServerEntry(npxArgs, env, additionalProps = {}) {
|
|
18
|
-
if (isWindows()) {
|
|
19
|
-
return {
|
|
20
|
-
command: 'cmd',
|
|
21
|
-
args: ['/c', 'npx', '-y', ...npxArgs],
|
|
22
|
-
env,
|
|
23
|
-
...additionalProps,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
// Unix: direct npx invocation — simple and reliable
|
|
27
16
|
return {
|
|
28
17
|
command: 'npx',
|
|
29
18
|
args: ['-y', ...npxArgs],
|
|
@@ -74,27 +63,14 @@ export function generateMCPJson(options) {
|
|
|
74
63
|
export function generateMCPCommands(options) {
|
|
75
64
|
const commands = [];
|
|
76
65
|
const config = options.mcp;
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
commands.push('claude mcp add claude-flow -- cmd /c npx -y @claude-flow/cli@latest mcp start');
|
|
80
|
-
}
|
|
81
|
-
if (config.ruvSwarm) {
|
|
82
|
-
commands.push('claude mcp add ruv-swarm -- cmd /c npx -y ruv-swarm mcp start');
|
|
83
|
-
}
|
|
84
|
-
if (config.flowNexus) {
|
|
85
|
-
commands.push('claude mcp add flow-nexus -- cmd /c npx -y flow-nexus@latest mcp start');
|
|
86
|
-
}
|
|
66
|
+
if (config.claudeFlow) {
|
|
67
|
+
commands.push('claude mcp add claude-flow -- npx -y @claude-flow/cli@latest mcp start');
|
|
87
68
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
commands.push("claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start");
|
|
94
|
-
}
|
|
95
|
-
if (config.flowNexus) {
|
|
96
|
-
commands.push("claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start");
|
|
97
|
-
}
|
|
69
|
+
if (config.ruvSwarm) {
|
|
70
|
+
commands.push('claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start');
|
|
71
|
+
}
|
|
72
|
+
if (config.flowNexus) {
|
|
73
|
+
commands.push('claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start');
|
|
98
74
|
}
|
|
99
75
|
return commands;
|
|
100
76
|
}
|
|
@@ -102,14 +78,11 @@ export function generateMCPCommands(options) {
|
|
|
102
78
|
* Get platform-specific setup instructions
|
|
103
79
|
*/
|
|
104
80
|
export function getPlatformInstructions() {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
note: 'MCP configuration uses cmd /c wrapper for npx compatibility.',
|
|
109
|
-
};
|
|
110
|
-
}
|
|
81
|
+
const platform = process.platform === 'win32'
|
|
82
|
+
? 'Windows'
|
|
83
|
+
: process.platform === 'darwin' ? 'macOS' : 'Linux';
|
|
111
84
|
return {
|
|
112
|
-
platform
|
|
85
|
+
platform,
|
|
113
86
|
note: 'MCP configuration uses npx directly.',
|
|
114
87
|
};
|
|
115
88
|
}
|