def run_dev_server(redirect_output=True):
    """Run both main and tools servers for development with maximum parallelism"""
    
    try:
        # Use ThreadPoolExecutor to run both servers in parallel
        with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
            # Submit both server start tasks
            main_future = executor.submit(
                _start_server,
                run_main_server,
                "main",
                redirect_output
            )
            
            tools_future = executor.submit(
                _start_server,
                run_tools_server,
                "tools", 
                redirect_output
            )
            
            # Wait for both to complete with a timeout
            try:
                main_result = main_future.result(timeout=150)
                tools_result = tools_future.result(timeout=150)
                
                if not main_result or not tools_result:
                    # Clean up if either server failed
                    print("\nOne or both servers failed to start. Stopping all servers...")
                    stop_dev_server()
                    raise RuntimeError("Failed to start servers - check above logs for details")
                
                # Add a small delay to ensure servers are fully initialized
                time.sleep(0.5)


                return
                
            except concurrent.futures.TimeoutError:
                print("\nTimeout occurred while starting servers")
                stop_dev_server()
                raise RuntimeError("Timeout waiting for servers to start")
    except Exception as e:
        print("\nUnexpected error in run_dev_server:")
        print("=" * 60)
        traceback.print_exc()
        print("=" * 60)
        raise
Run both main and tools servers for development with maximum parallelism
src/upsonic/server/__init__.py