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

rUvd889110b876d
diff --git a/v3/@claude-flow/cli/src/mcp-server.ts b/v3/@claude-flow/cli/src/mcp-server.ts
index 0c435b5064..51fca8c19c 100644
--- a/v3/@claude-flow/cli/src/mcp-server.ts
+++ b/v3/@claude-flow/cli/src/mcp-server.ts
@@ -701,15 +701,28 @@ export function createMCPServerManager(
* Singleton server manager instance
*/
let serverManager: MCPServerManager | null = null;
+let currentTransport: string | undefined = undefined;
/**
* Get or create server manager singleton
+ *
+ * FIX for issue #942: Recreate singleton if transport type changes
+ * Previously, once created with stdio (default), HTTP options were ignored
*/
export function getServerManager(
options?: MCPServerOptions
): MCPServerManager {
+ const requestedTransport = options?.transport;
+
+ // Recreate if transport type changes (fixes HTTP transport not working)
+ if (serverManager && requestedTransport && requestedTransport !== currentTransport) {
+ serverManager = new MCPServerManager(options);
+ currentTransport = requestedTransport;
+ }
+
if (!serverManager) {
serverManager = new MCPServerManager(options);
+ currentTransport = options?.transport;
}
return serverManager;
}