Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv780c7f70a54f
diff --git a/v3/@claude-flow/cli/bin/cli.js b/v3/@claude-flow/cli/bin/cli.js
index f67a851c40..85fa7b5ca9 100755
--- a/v3/@claude-flow/cli/bin/cli.js
+++ b/v3/@claude-flow/cli/bin/cli.js
@@ -11,8 +11,12 @@
import { randomUUID } from 'crypto';
// Check if we should run in MCP server mode
-// Conditions: stdin is being piped AND no CLI arguments provided
-const isMCPMode = !process.stdin.isTTY && process.argv.length === 2;
+// Conditions:
+// 1. stdin is being piped AND no CLI arguments provided (auto-detect)
+// 2. stdin is being piped AND args are "mcp start" (explicit, e.g. npx claude-flow@alpha mcp start)
+const cliArgs = process.argv.slice(2);
+const isExplicitMCP = cliArgs.length >= 1 && cliArgs[0] === 'mcp' && (cliArgs.length === 1 || cliArgs[1] === 'start');
+const isMCPMode = !process.stdin.isTTY && (process.argv.length === 2 || isExplicitMCP);
if (isMCPMode) {
// Run MCP server mode