An apparatus for the motor rehabilitation of the upper and lower limbs is disclosed, which is compact, portable, lightweight, and easy to transport. The apparatus has an adapter for the distal end of the patient's limb, a robotic arm, a gear system, two motors, and virtual and/or augmented reality software to interact with the patient. A management and control system makes possible the execution of movements and exercises in the three-dimensional space so that patients with neurological, musculoskeletal, muscular, rheumatic, motor and/or cognitive diseases or injuries and patients in post-surgical recovery may exercise and recover the movements of their upper and/or lower limbs. The equipment may also be used for the purpose of training and physical fitness.