diff --git a/v3/@claude-flow/cli/src/mcp-server.ts b/v3/@claude-flow/cli/src/mcp-server.ts index 5b1d30bf09..63b29e6d9f 100644 --- a/v3/@claude-flow/cli/src/mcp-server.ts +++ b/v3/@claude-flow/cli/src/mcp-server.ts @@ -530,6 +530,11 @@ export class MCPServerManager extends EventEmitter { * Wait for server to be ready */ private async waitForReady(timeout = 10000): Promise { + // For stdio transport, we're ready immediately (in-process) + if (this.options.transport === 'stdio') { + return; + } + const startTime = Date.now(); while (Date.now() - startTime < timeout) { @@ -540,11 +545,6 @@ export class MCPServerManager extends EventEmitter { await this.sleep(100); } - // For stdio, just check if process is running - if (this.options.transport === 'stdio' && this.process && !this.process.killed) { - return; - } - throw new Error('Server failed to start within timeout'); }