claude-flow 2.7.4 → 2.7.5

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.
@@ -1,6 +1,17 @@
1
1
  // mcp.js - MCP server management commands
2
2
  import { printSuccess, printError, printWarning } from '../utils.js';
3
3
 
4
+ // Module-level state to track stdio mode
5
+ let isStdioMode = false;
6
+
7
+ // Smart logging helpers that respect stdio mode
8
+ // In stdio mode: route to stderr to keep stdout clean for JSON-RPC
9
+ // In HTTP mode: route to stdout for normal behavior
10
+ const log = (...args) => (isStdioMode ? console.error(...args) : console.log(...args));
11
+ const success = (msg) => (isStdioMode ? console.error(`✅ ${msg}`) : printSuccess(msg));
12
+ const error = (msg) => (isStdioMode ? console.error(`❌ ${msg}`) : printError(msg));
13
+ const warning = (msg) => (isStdioMode ? console.error(`⚠️ ${msg}`) : printWarning(msg));
14
+
4
15
  export async function mcpCommand(subArgs, flags) {
5
16
  const mcpCmd = subArgs[0];
6
17
 
@@ -35,12 +46,12 @@ export async function mcpCommand(subArgs, flags) {
35
46
  }
36
47
 
37
48
  async function showMcpStatus(subArgs, flags) {
38
- printSuccess('MCP Server Status:');
39
- console.log('🌐 Status: Stopped (orchestrator not running)');
40
- console.log('🔧 Configuration: Default settings');
41
- console.log('🔌 Connections: 0 active');
42
- console.log('📡 Tools: Ready to load');
43
- console.log('🔐 Authentication: Not configured');
49
+ success('MCP Server Status:');
50
+ log('🌐 Status: Stopped (orchestrator not running)');
51
+ log('🔧 Configuration: Default settings');
52
+ log('🔌 Connections: 0 active');
53
+ log('📡 Tools: Ready to load');
54
+ log('🔐 Authentication: Not configured');
44
55
  }
45
56
 
46
57
  async function startMcpServer(subArgs, flags) {
@@ -48,16 +59,19 @@ async function startMcpServer(subArgs, flags) {
48
59
  const daemon = subArgs.includes('--daemon') || flags.daemon;
49
60
  const stdio = subArgs.includes('--stdio') || flags.stdio || true; // Default to stdio mode
50
61
 
62
+ // Set module-level stdio flag for all helper functions
63
+ isStdioMode = stdio;
64
+
51
65
  if (stdio) {
52
66
  // Start MCP server in stdio mode (like ruv-swarm)
53
- printSuccess('Starting Claude Flow MCP server in stdio mode...');
67
+ success('Starting Claude Flow MCP server in stdio mode...');
54
68
 
55
69
  if (autoOrchestrator) {
56
- console.log('🚀 Auto-starting orchestrator...');
57
- console.log('🧠 Neural network capabilities: ENABLED');
58
- console.log('🔧 WASM SIMD optimization: ACTIVE');
59
- console.log('📊 Performance monitoring: ENABLED');
60
- console.log('🐝 Swarm coordination: READY');
70
+ log('🚀 Auto-starting orchestrator...');
71
+ log('🧠 Neural network capabilities: ENABLED');
72
+ log('🔧 WASM SIMD optimization: ACTIVE');
73
+ log('📊 Performance monitoring: ENABLED');
74
+ log('🐝 Swarm coordination: READY');
61
75
  }
62
76
 
63
77
  // Import and start the MCP server
@@ -76,9 +90,9 @@ async function startMcpServer(subArgs, flags) {
76
90
  // Check if the file exists, and log the path for debugging
77
91
  const fs = await import('fs');
78
92
  if (!fs.existsSync(mcpServerPath)) {
79
- console.error(`MCP server file not found at: ${mcpServerPath}`);
80
- console.error(`Current directory: ${process.cwd()}`);
81
- console.error(`Script directory: ${__dirname}`);
93
+ error(`MCP server file not found at: ${mcpServerPath}`);
94
+ error(`Current directory: ${process.cwd()}`);
95
+ error(`Script directory: ${__dirname}`);
82
96
  throw new Error(`MCP server file not found: ${mcpServerPath}`);
83
97
  }
84
98
 
@@ -95,198 +109,198 @@ async function startMcpServer(subArgs, flags) {
95
109
 
96
110
  serverProcess.on('exit', (code) => {
97
111
  if (code !== 0) {
98
- console.error(`MCP server exited with code ${code}`);
112
+ error(`MCP server exited with code ${code}`);
99
113
  }
100
114
  });
101
115
 
102
116
  // Keep the process alive
103
117
  await new Promise(() => {}); // Never resolves, keeps server running
104
- } catch (error) {
105
- console.error('Failed to start MCP server:', error.message);
118
+ } catch (err) {
119
+ error('Failed to start MCP server: ' + err.message);
106
120
 
107
121
  // Fallback to status display
108
- console.log('🚀 MCP server would start with:');
109
- console.log(' Protocol: stdio');
110
- console.log(' Tools: 87 Claude-Flow integration tools');
111
- console.log(' Orchestrator: ' + (autoOrchestrator ? 'AUTO-STARTED' : 'Manual'));
112
- console.log(' Mode: ' + (daemon ? 'DAEMON' : 'Interactive'));
122
+ log('🚀 MCP server would start with:');
123
+ log(' Protocol: stdio');
124
+ log(' Tools: 87 Claude-Flow integration tools');
125
+ log(' Orchestrator: ' + (autoOrchestrator ? 'AUTO-STARTED' : 'Manual'));
126
+ log(' Mode: ' + (daemon ? 'DAEMON' : 'Interactive'));
113
127
  }
114
128
  } else {
115
129
  // HTTP mode (for future implementation)
116
130
  const port = getFlag(subArgs, '--port') || flags.port || 3000;
117
131
  const host = getFlag(subArgs, '--host') || flags.host || 'localhost';
118
132
 
119
- printSuccess(`Starting Claude Flow MCP server on ${host}:${port}...`);
120
- console.log('🚀 HTTP mode not yet implemented, use --stdio for full functionality');
133
+ success(`Starting Claude Flow MCP server on ${host}:${port}...`);
134
+ log('🚀 HTTP mode not yet implemented, use --stdio for full functionality');
121
135
  }
122
136
  }
123
137
 
124
138
  async function stopMcpServer(subArgs, flags) {
125
- printSuccess('Stopping MCP server...');
126
- console.log('🛑 Server would be gracefully shut down');
127
- console.log('📝 Active connections would be closed');
128
- console.log('💾 State would be persisted');
139
+ success('Stopping MCP server...');
140
+ log('🛑 Server would be gracefully shut down');
141
+ log('📝 Active connections would be closed');
142
+ log('💾 State would be persisted');
129
143
  }
130
144
 
131
145
  async function listMcpTools(subArgs, flags) {
132
146
  const verbose = subArgs.includes('--verbose') || subArgs.includes('-v') || flags.verbose;
133
147
  const category = getFlag(subArgs, '--category') || flags.category;
134
148
 
135
- printSuccess('Claude-Flow MCP Tools & Resources (87 total):');
149
+ success('Claude-Flow MCP Tools & Resources (87 total):');
136
150
 
137
151
  if (!category || category === 'swarm') {
138
- console.log('\n🐝 SWARM COORDINATION (12 tools):');
139
- console.log(' • swarm_init Initialize swarm with topology');
140
- console.log(' • agent_spawn Create specialized AI agents');
141
- console.log(' • task_orchestrate Orchestrate complex workflows');
142
- console.log(' • swarm_status Monitor swarm health/performance');
143
- console.log(' • agent_list List active agents & capabilities');
144
- console.log(' • agent_metrics Agent performance metrics');
145
- console.log(' • swarm_monitor Real-time swarm monitoring');
146
- console.log(' • topology_optimize Auto-optimize swarm topology');
147
- console.log(' • load_balance Distribute tasks efficiently');
148
- console.log(' • coordination_sync Sync agent coordination');
149
- console.log(' • swarm_scale Auto-scale agent count');
150
- console.log(' • swarm_destroy Gracefully shutdown swarm');
152
+ log('\n🐝 SWARM COORDINATION (12 tools):');
153
+ log(' • swarm_init Initialize swarm with topology');
154
+ log(' • agent_spawn Create specialized AI agents');
155
+ log(' • task_orchestrate Orchestrate complex workflows');
156
+ log(' • swarm_status Monitor swarm health/performance');
157
+ log(' • agent_list List active agents & capabilities');
158
+ log(' • agent_metrics Agent performance metrics');
159
+ log(' • swarm_monitor Real-time swarm monitoring');
160
+ log(' • topology_optimize Auto-optimize swarm topology');
161
+ log(' • load_balance Distribute tasks efficiently');
162
+ log(' • coordination_sync Sync agent coordination');
163
+ log(' • swarm_scale Auto-scale agent count');
164
+ log(' • swarm_destroy Gracefully shutdown swarm');
151
165
  }
152
166
 
153
167
  if (!category || category === 'neural') {
154
- console.log('\n🧠 NEURAL NETWORKS & AI (15 tools):');
155
- console.log(' • neural_status Check neural network status');
156
- console.log(' • neural_train Train neural patterns');
157
- console.log(' • neural_patterns Analyze cognitive patterns');
158
- console.log(' • neural_predict Make AI predictions');
159
- console.log(' • model_load Load pre-trained models');
160
- console.log(' • model_save Save trained models');
161
- console.log(' • wasm_optimize WASM SIMD optimization');
162
- console.log(' • inference_run Run neural inference');
163
- console.log(' • pattern_recognize Pattern recognition');
164
- console.log(' • cognitive_analyze Cognitive behavior analysis');
165
- console.log(' • learning_adapt Adaptive learning');
166
- console.log(' • neural_compress Compress neural models');
167
- console.log(' • ensemble_create Create model ensembles');
168
- console.log(' • transfer_learn Transfer learning');
169
- console.log(' • neural_explain AI explainability');
168
+ log('\n🧠 NEURAL NETWORKS & AI (15 tools):');
169
+ log(' • neural_status Check neural network status');
170
+ log(' • neural_train Train neural patterns');
171
+ log(' • neural_patterns Analyze cognitive patterns');
172
+ log(' • neural_predict Make AI predictions');
173
+ log(' • model_load Load pre-trained models');
174
+ log(' • model_save Save trained models');
175
+ log(' • wasm_optimize WASM SIMD optimization');
176
+ log(' • inference_run Run neural inference');
177
+ log(' • pattern_recognize Pattern recognition');
178
+ log(' • cognitive_analyze Cognitive behavior analysis');
179
+ log(' • learning_adapt Adaptive learning');
180
+ log(' • neural_compress Compress neural models');
181
+ log(' • ensemble_create Create model ensembles');
182
+ log(' • transfer_learn Transfer learning');
183
+ log(' • neural_explain AI explainability');
170
184
  }
171
185
 
172
186
  if (!category || category === 'memory') {
173
- console.log('\n💾 MEMORY & PERSISTENCE (12 tools):');
174
- console.log(' • memory_usage Store/retrieve persistent data');
175
- console.log(' • memory_search Search memory with patterns');
176
- console.log(' • memory_persist Cross-session persistence');
177
- console.log(' • memory_namespace Namespace management');
178
- console.log(' • memory_backup Backup memory stores');
179
- console.log(' • memory_restore Restore from backups');
180
- console.log(' • memory_compress Compress memory data');
181
- console.log(' • memory_sync Sync across instances');
182
- console.log(' • cache_manage Manage coordination cache');
183
- console.log(' • state_snapshot Create state snapshots');
184
- console.log(' • context_restore Restore execution context');
185
- console.log(' • memory_analytics Analyze memory usage');
187
+ log('\n💾 MEMORY & PERSISTENCE (12 tools):');
188
+ log(' • memory_usage Store/retrieve persistent data');
189
+ log(' • memory_search Search memory with patterns');
190
+ log(' • memory_persist Cross-session persistence');
191
+ log(' • memory_namespace Namespace management');
192
+ log(' • memory_backup Backup memory stores');
193
+ log(' • memory_restore Restore from backups');
194
+ log(' • memory_compress Compress memory data');
195
+ log(' • memory_sync Sync across instances');
196
+ log(' • cache_manage Manage coordination cache');
197
+ log(' • state_snapshot Create state snapshots');
198
+ log(' • context_restore Restore execution context');
199
+ log(' • memory_analytics Analyze memory usage');
186
200
  }
187
201
 
188
202
  if (!category || category === 'analysis') {
189
- console.log('\n📊 ANALYSIS & MONITORING (13 tools):');
190
- console.log(' • task_status Check task execution status');
191
- console.log(' • task_results Get task completion results');
192
- console.log(' • benchmark_run Performance benchmarks');
193
- console.log(' • bottleneck_analyze Identify bottlenecks');
194
- console.log(' • performance_report Generate performance reports');
195
- console.log(' • token_usage Analyze token consumption');
196
- console.log(' • metrics_collect Collect system metrics');
197
- console.log(' • trend_analysis Analyze performance trends');
198
- console.log(' • cost_analysis Cost and resource analysis');
199
- console.log(' • quality_assess Quality assessment');
200
- console.log(' • error_analysis Error pattern analysis');
201
- console.log(' • usage_stats Usage statistics');
202
- console.log(' • health_check System health monitoring');
203
+ log('\n📊 ANALYSIS & MONITORING (13 tools):');
204
+ log(' • task_status Check task execution status');
205
+ log(' • task_results Get task completion results');
206
+ log(' • benchmark_run Performance benchmarks');
207
+ log(' • bottleneck_analyze Identify bottlenecks');
208
+ log(' • performance_report Generate performance reports');
209
+ log(' • token_usage Analyze token consumption');
210
+ log(' • metrics_collect Collect system metrics');
211
+ log(' • trend_analysis Analyze performance trends');
212
+ log(' • cost_analysis Cost and resource analysis');
213
+ log(' • quality_assess Quality assessment');
214
+ log(' • error_analysis Error pattern analysis');
215
+ log(' • usage_stats Usage statistics');
216
+ log(' • health_check System health monitoring');
203
217
  }
204
218
 
205
219
  if (!category || category === 'workflow') {
206
- console.log('\n🔧 WORKFLOW & AUTOMATION (11 tools):');
207
- console.log(' • workflow_create Create custom workflows');
208
- console.log(' • workflow_execute Execute predefined workflows');
209
- console.log(' • workflow_export Export workflow definitions');
210
- console.log(' • sparc_mode Run SPARC development modes');
211
- console.log(' • automation_setup Setup automation rules');
212
- console.log(' • pipeline_create Create CI/CD pipelines');
213
- console.log(' • scheduler_manage Manage task scheduling');
214
- console.log(' • trigger_setup Setup event triggers');
215
- console.log(' • workflow_template Manage workflow templates');
216
- console.log(' • batch_process Batch processing');
217
- console.log(' • parallel_execute Execute tasks in parallel');
220
+ log('\n🔧 WORKFLOW & AUTOMATION (11 tools):');
221
+ log(' • workflow_create Create custom workflows');
222
+ log(' • workflow_execute Execute predefined workflows');
223
+ log(' • workflow_export Export workflow definitions');
224
+ log(' • sparc_mode Run SPARC development modes');
225
+ log(' • automation_setup Setup automation rules');
226
+ log(' • pipeline_create Create CI/CD pipelines');
227
+ log(' • scheduler_manage Manage task scheduling');
228
+ log(' • trigger_setup Setup event triggers');
229
+ log(' • workflow_template Manage workflow templates');
230
+ log(' • batch_process Batch processing');
231
+ log(' • parallel_execute Execute tasks in parallel');
218
232
  }
219
233
 
220
234
  if (!category || category === 'github') {
221
- console.log('\n🐙 GITHUB INTEGRATION (8 tools):');
222
- console.log(' • github_repo_analyze Repository analysis');
223
- console.log(' • github_pr_manage Pull request management');
224
- console.log(' • github_issue_track Issue tracking & triage');
225
- console.log(' • github_release_coord Release coordination');
226
- console.log(' • github_workflow_auto Workflow automation');
227
- console.log(' • github_code_review Automated code review');
228
- console.log(' • github_sync_coord Multi-repo sync coordination');
229
- console.log(' • github_metrics Repository metrics');
235
+ log('\n🐙 GITHUB INTEGRATION (8 tools):');
236
+ log(' • github_repo_analyze Repository analysis');
237
+ log(' • github_pr_manage Pull request management');
238
+ log(' • github_issue_track Issue tracking & triage');
239
+ log(' • github_release_coord Release coordination');
240
+ log(' • github_workflow_auto Workflow automation');
241
+ log(' • github_code_review Automated code review');
242
+ log(' • github_sync_coord Multi-repo sync coordination');
243
+ log(' • github_metrics Repository metrics');
230
244
  }
231
245
 
232
246
  if (!category || category === 'daa') {
233
- console.log('\n🤖 DAA (Dynamic Agent Architecture) (8 tools):');
234
- console.log(' • daa_agent_create Create dynamic agents');
235
- console.log(' • daa_capability_match Match capabilities to tasks');
236
- console.log(' • daa_resource_alloc Resource allocation');
237
- console.log(' • daa_lifecycle_manage Agent lifecycle management');
238
- console.log(' • daa_communication Inter-agent communication');
239
- console.log(' • daa_consensus Consensus mechanisms');
240
- console.log(' • daa_fault_tolerance Fault tolerance & recovery');
241
- console.log(' • daa_optimization Performance optimization');
247
+ log('\n🤖 DAA (Dynamic Agent Architecture) (8 tools):');
248
+ log(' • daa_agent_create Create dynamic agents');
249
+ log(' • daa_capability_match Match capabilities to tasks');
250
+ log(' • daa_resource_alloc Resource allocation');
251
+ log(' • daa_lifecycle_manage Agent lifecycle management');
252
+ log(' • daa_communication Inter-agent communication');
253
+ log(' • daa_consensus Consensus mechanisms');
254
+ log(' • daa_fault_tolerance Fault tolerance & recovery');
255
+ log(' • daa_optimization Performance optimization');
242
256
  }
243
257
 
244
258
  if (!category || category === 'system') {
245
- console.log('\n⚙️ SYSTEM & UTILITIES (8 tools):');
246
- console.log(' • terminal_execute Execute terminal commands');
247
- console.log(' • config_manage Configuration management');
248
- console.log(' • features_detect Feature detection');
249
- console.log(' • security_scan Security scanning');
250
- console.log(' • backup_create Create system backups');
251
- console.log(' • restore_system System restoration');
252
- console.log(' • log_analysis Log analysis & insights');
253
- console.log(' • diagnostic_run System diagnostics');
259
+ log('\n⚙️ SYSTEM & UTILITIES (8 tools):');
260
+ log(' • terminal_execute Execute terminal commands');
261
+ log(' • config_manage Configuration management');
262
+ log(' • features_detect Feature detection');
263
+ log(' • security_scan Security scanning');
264
+ log(' • backup_create Create system backups');
265
+ log(' • restore_system System restoration');
266
+ log(' • log_analysis Log analysis & insights');
267
+ log(' • diagnostic_run System diagnostics');
254
268
  }
255
269
 
256
270
  if (verbose) {
257
- console.log('\n📋 DETAILED TOOL INFORMATION:');
258
- console.log(' 🔥 HIGH-PRIORITY TOOLS:');
259
- console.log(
271
+ log('\n📋 DETAILED TOOL INFORMATION:');
272
+ log(' 🔥 HIGH-PRIORITY TOOLS:');
273
+ log(
260
274
  ' swarm_init: Initialize coordination with 4 topologies (hierarchical, mesh, ring, star)',
261
275
  );
262
- console.log(
276
+ log(
263
277
  ' agent_spawn: 8 agent types (researcher, coder, analyst, architect, tester, coordinator, reviewer, optimizer)',
264
278
  );
265
- console.log(' neural_train: Train 27 neural models with WASM SIMD acceleration');
266
- console.log(
279
+ log(' neural_train: Train 27 neural models with WASM SIMD acceleration');
280
+ log(
267
281
  ' memory_usage: 5 operations (store, retrieve, list, delete, search) with TTL & namespacing',
268
282
  );
269
- console.log(' performance_report: Real-time metrics with 24h/7d/30d timeframes');
270
-
271
- console.log('\n ⚡ PERFORMANCE FEATURES:');
272
- console.log(' • 2.8-4.4x speed improvement with parallel execution');
273
- console.log(' • 32.3% token reduction through optimization');
274
- console.log(' • 84.8% SWE-Bench solve rate with swarm coordination');
275
- console.log(' • WASM neural processing with SIMD optimization');
276
- console.log(' • Cross-session memory persistence');
277
-
278
- console.log('\n 🔗 INTEGRATION CAPABILITIES:');
279
- console.log(' • Full ruv-swarm feature parity (rebranded)');
280
- console.log(' • Claude Code native tool integration');
281
- console.log(' • GitHub Actions workflow automation');
282
- console.log(' • SPARC methodology with 17 modes');
283
- console.log(' • MCP protocol compatibility');
283
+ log(' performance_report: Real-time metrics with 24h/7d/30d timeframes');
284
+
285
+ log('\n ⚡ PERFORMANCE FEATURES:');
286
+ log(' • 2.8-4.4x speed improvement with parallel execution');
287
+ log(' • 32.3% token reduction through optimization');
288
+ log(' • 84.8% SWE-Bench solve rate with swarm coordination');
289
+ log(' • WASM neural processing with SIMD optimization');
290
+ log(' • Cross-session memory persistence');
291
+
292
+ log('\n 🔗 INTEGRATION CAPABILITIES:');
293
+ log(' • Full ruv-swarm feature parity (rebranded)');
294
+ log(' • Claude Code native tool integration');
295
+ log(' • GitHub Actions workflow automation');
296
+ log(' • SPARC methodology with 17 modes');
297
+ log(' • MCP protocol compatibility');
284
298
  }
285
299
 
286
- console.log('\n📡 Status: 87 tools & resources available when server is running');
287
- console.log('🎯 Categories: swarm, neural, memory, analysis, workflow, github, daa, system');
288
- console.log('🔗 Compatibility: ruv-swarm + DAA + Claude-Flow unified platform');
289
- console.log('\n💡 Usage: claude-flow mcp tools --category=<category> --verbose');
300
+ log('\n📡 Status: 87 tools & resources available when server is running');
301
+ log('🎯 Categories: swarm, neural, memory, analysis, workflow, github, daa, system');
302
+ log('🔗 Compatibility: ruv-swarm + DAA + Claude-Flow unified platform');
303
+ log('\n💡 Usage: claude-flow mcp tools --category=<category> --verbose');
290
304
  }
291
305
 
292
306
  async function manageMcpAuth(subArgs, flags) {
@@ -294,79 +308,79 @@ async function manageMcpAuth(subArgs, flags) {
294
308
 
295
309
  switch (authCmd) {
296
310
  case 'setup':
297
- printSuccess('Setting up MCP authentication...');
298
- console.log('🔐 Authentication configuration:');
299
- console.log(' Type: API Key based');
300
- console.log(' Scope: Claude-Flow tools');
301
- console.log(' Security: TLS encrypted');
311
+ success('Setting up MCP authentication...');
312
+ log('🔐 Authentication configuration:');
313
+ log(' Type: API Key based');
314
+ log(' Scope: Claude-Flow tools');
315
+ log(' Security: TLS encrypted');
302
316
  break;
303
317
 
304
318
  case 'status':
305
- printSuccess('MCP Authentication Status:');
306
- console.log('🔐 Status: Not configured');
307
- console.log('🔑 API Keys: 0 active');
308
- console.log('🛡️ Security: Default settings');
319
+ success('MCP Authentication Status:');
320
+ log('🔐 Status: Not configured');
321
+ log('🔑 API Keys: 0 active');
322
+ log('🛡️ Security: Default settings');
309
323
  break;
310
324
 
311
325
  case 'rotate':
312
- printSuccess('Rotating MCP authentication keys...');
313
- console.log('🔄 New API keys would be generated');
314
- console.log('♻️ Old keys would be deprecated gracefully');
326
+ success('Rotating MCP authentication keys...');
327
+ log('🔄 New API keys would be generated');
328
+ log('♻️ Old keys would be deprecated gracefully');
315
329
  break;
316
330
 
317
331
  default:
318
- console.log('Auth commands: setup, status, rotate');
319
- console.log('Examples:');
320
- console.log(' claude-flow mcp auth setup');
321
- console.log(' claude-flow mcp auth status');
332
+ log('Auth commands: setup, status, rotate');
333
+ log('Examples:');
334
+ log(' claude-flow mcp auth setup');
335
+ log(' claude-flow mcp auth status');
322
336
  }
323
337
  }
324
338
 
325
339
  async function showMcpConfig(subArgs, flags) {
326
- printSuccess('Claude-Flow MCP Server Configuration:');
327
- console.log('\n📋 Server Settings:');
328
- console.log(' Host: localhost');
329
- console.log(' Port: 3000');
330
- console.log(' Protocol: HTTP/STDIO');
331
- console.log(' Timeout: 30000ms');
332
- console.log(' Auto-Orchestrator: Enabled');
333
-
334
- console.log('\n🔧 Tool Configuration:');
335
- console.log(' Available Tools: 87 total');
336
- console.log(' Categories: 8 (swarm, neural, memory, analysis, workflow, github, daa, system)');
337
- console.log(' Authentication: API Key + OAuth');
338
- console.log(' Rate Limiting: 1000 req/min');
339
- console.log(' WASM Support: Enabled with SIMD');
340
-
341
- console.log('\n🧠 Neural Network Settings:');
342
- console.log(' Models: 27 pre-trained models available');
343
- console.log(' Training: Real-time adaptive learning');
344
- console.log(' Inference: WASM optimized');
345
- console.log(' Pattern Recognition: Enabled');
346
-
347
- console.log('\n🐝 Swarm Configuration:');
348
- console.log(' Max Agents: 10 per swarm');
349
- console.log(' Topologies: hierarchical, mesh, ring, star');
350
- console.log(' Coordination: Real-time with hooks');
351
- console.log(' Memory: Cross-session persistence');
352
-
353
- console.log('\n🔐 Security Settings:');
354
- console.log(' TLS: Enabled in production');
355
- console.log(' CORS: Configured for Claude Code');
356
- console.log(' API Key Rotation: 30 days');
357
- console.log(' Audit Logging: Enabled');
358
-
359
- console.log('\n🔗 Integration Settings:');
360
- console.log(' ruv-swarm Compatibility: 100%');
361
- console.log(' DAA Integration: Enabled');
362
- console.log(' GitHub Actions: Connected');
363
- console.log(' SPARC Modes: 17 available');
364
-
365
- console.log('\n📁 Configuration Files:');
366
- console.log(' Main Config: ./mcp_config/claude-flow.json');
367
- console.log(' Neural Models: ./models/');
368
- console.log(' Memory Store: ./memory/');
369
- console.log(' Logs: ./logs/mcp/');
340
+ success('Claude-Flow MCP Server Configuration:');
341
+ log('\n📋 Server Settings:');
342
+ log(' Host: localhost');
343
+ log(' Port: 3000');
344
+ log(' Protocol: HTTP/STDIO');
345
+ log(' Timeout: 30000ms');
346
+ log(' Auto-Orchestrator: Enabled');
347
+
348
+ log('\n🔧 Tool Configuration:');
349
+ log(' Available Tools: 87 total');
350
+ log(' Categories: 8 (swarm, neural, memory, analysis, workflow, github, daa, system)');
351
+ log(' Authentication: API Key + OAuth');
352
+ log(' Rate Limiting: 1000 req/min');
353
+ log(' WASM Support: Enabled with SIMD');
354
+
355
+ log('\n🧠 Neural Network Settings:');
356
+ log(' Models: 27 pre-trained models available');
357
+ log(' Training: Real-time adaptive learning');
358
+ log(' Inference: WASM optimized');
359
+ log(' Pattern Recognition: Enabled');
360
+
361
+ log('\n🐝 Swarm Configuration:');
362
+ log(' Max Agents: 10 per swarm');
363
+ log(' Topologies: hierarchical, mesh, ring, star');
364
+ log(' Coordination: Real-time with hooks');
365
+ log(' Memory: Cross-session persistence');
366
+
367
+ log('\n🔐 Security Settings:');
368
+ log(' TLS: Enabled in production');
369
+ log(' CORS: Configured for Claude Code');
370
+ log(' API Key Rotation: 30 days');
371
+ log(' Audit Logging: Enabled');
372
+
373
+ log('\n🔗 Integration Settings:');
374
+ log(' ruv-swarm Compatibility: 100%');
375
+ log(' DAA Integration: Enabled');
376
+ log(' GitHub Actions: Connected');
377
+ log(' SPARC Modes: 17 available');
378
+
379
+ log('\n📁 Configuration Files:');
380
+ log(' Main Config: ./mcp_config/claude-flow.json');
381
+ log(' Neural Models: ./models/');
382
+ log(' Memory Store: ./memory/');
383
+ log(' Logs: ./logs/mcp/');
370
384
  }
371
385
 
372
386
  function getFlag(args, flagName) {
@@ -375,49 +389,47 @@ function getFlag(args, flagName) {
375
389
  }
376
390
 
377
391
  function showMcpHelp() {
378
- console.log('🔧 Claude-Flow MCP Server Commands:');
379
- console.log();
380
- console.log('COMMANDS:');
381
- console.log(' status Show MCP server status');
382
- console.log(' start [options] Start MCP server with orchestrator');
383
- console.log(' stop Stop MCP server gracefully');
384
- console.log(' tools [options] List available tools & resources');
385
- console.log(' auth <setup|status|rotate> Manage authentication');
386
- console.log(' config Show comprehensive configuration');
387
- console.log();
388
- console.log('START OPTIONS:');
389
- console.log(' --port <port> Server port (default: 3000)');
390
- console.log(' --host <host> Server host (default: localhost)');
391
- console.log(' --auto-orchestrator Auto-start orchestrator with neural/WASM');
392
- console.log(' --daemon Run in background daemon mode');
393
- console.log(' --enable-neural Enable neural network features');
394
- console.log(' --enable-wasm Enable WASM SIMD optimization');
395
- console.log();
396
- console.log('TOOLS OPTIONS:');
397
- console.log(
398
- ' --category <cat> Filter by category (swarm, neural, memory, etc.)',
399
- );
400
- console.log(' --verbose, -v Show detailed tool information');
401
- console.log(' --examples Show usage examples');
402
- console.log();
403
- console.log('CATEGORIES:');
404
- console.log(' swarm 🐝 Swarm coordination (12 tools)');
405
- console.log(' neural 🧠 Neural networks & AI (15 tools)');
406
- console.log(' memory 💾 Memory & persistence (12 tools)');
407
- console.log(' analysis 📊 Analysis & monitoring (13 tools)');
408
- console.log(' workflow 🔧 Workflow & automation (11 tools)');
409
- console.log(' github 🐙 GitHub integration (8 tools)');
410
- console.log(' daa 🤖 Dynamic Agent Architecture (8 tools)');
411
- console.log(' system ⚙️ System & utilities (8 tools)');
412
- console.log();
413
- console.log('EXAMPLES:');
414
- console.log(' claude-flow mcp status');
415
- console.log(' claude-flow mcp start --auto-orchestrator --daemon');
416
- console.log(' claude-flow mcp tools --category=neural --verbose');
417
- console.log(' claude-flow mcp tools --category=swarm');
418
- console.log(' claude-flow mcp config');
419
- console.log(' claude-flow mcp auth setup');
420
- console.log();
421
- console.log('🎯 Total: 87 tools & resources available');
422
- console.log('🔗 Full ruv-swarm + DAA + Claude-Flow integration');
392
+ log('🔧 Claude-Flow MCP Server Commands:');
393
+ log();
394
+ log('COMMANDS:');
395
+ log(' status Show MCP server status');
396
+ log(' start [options] Start MCP server with orchestrator');
397
+ log(' stop Stop MCP server gracefully');
398
+ log(' tools [options] List available tools & resources');
399
+ log(' auth <setup|status|rotate> Manage authentication');
400
+ log(' config Show comprehensive configuration');
401
+ log();
402
+ log('START OPTIONS:');
403
+ log(' --port <port> Server port (default: 3000)');
404
+ log(' --host <host> Server host (default: localhost)');
405
+ log(' --auto-orchestrator Auto-start orchestrator with neural/WASM');
406
+ log(' --daemon Run in background daemon mode');
407
+ log(' --enable-neural Enable neural network features');
408
+ log(' --enable-wasm Enable WASM SIMD optimization');
409
+ log();
410
+ log('TOOLS OPTIONS:');
411
+ log(' --category <cat> Filter by category (swarm, neural, memory, etc.)');
412
+ log(' --verbose, -v Show detailed tool information');
413
+ log(' --examples Show usage examples');
414
+ log();
415
+ log('CATEGORIES:');
416
+ log(' swarm 🐝 Swarm coordination (12 tools)');
417
+ log(' neural 🧠 Neural networks & AI (15 tools)');
418
+ log(' memory 💾 Memory & persistence (12 tools)');
419
+ log(' analysis 📊 Analysis & monitoring (13 tools)');
420
+ log(' workflow 🔧 Workflow & automation (11 tools)');
421
+ log(' github 🐙 GitHub integration (8 tools)');
422
+ log(' daa 🤖 Dynamic Agent Architecture (8 tools)');
423
+ log(' system ⚙️ System & utilities (8 tools)');
424
+ log();
425
+ log('EXAMPLES:');
426
+ log(' claude-flow mcp status');
427
+ log(' claude-flow mcp start --auto-orchestrator --daemon');
428
+ log(' claude-flow mcp tools --category=neural --verbose');
429
+ log(' claude-flow mcp tools --category=swarm');
430
+ log(' claude-flow mcp config');
431
+ log(' claude-flow mcp auth setup');
432
+ log();
433
+ log('🎯 Total: 87 tools & resources available');
434
+ log('🔗 Full ruv-swarm + DAA + Claude-Flow integration');
423
435
  }