The invention discloses a snakelike mechanical arm, wherein a rigid rod is taken as a central strut, a flexible rope is adopted for driving, a power supply and a driver are arranged on a snakelike arm base, and the snakelike mechanical arm has the advantages of compact structure, strong flexibility and large rigidity. Different actuators or sensors are arranged on a tail end of the snakelike mechanical arm so as to complete different operation tasks, such as detection of non-structural narrow spaces of cabins, carriages and the like, as well as gluing, detection, chip removal, redundancy pickup and the like of inner cavities of airplanes.