In this paper, a novel surgical robotic platform intended to assist surgeons in cervical spine surgery is presented. The purpose of this surgery is to treat the cervical spine instabilities. The surgical procedure requires drilling into specific region of the vertebrae in order to attach spinal implants and thus ensure a normal spacing between each vertebra concerned. In this context, the proposed robotic platform allows to control and restrict the surgeon's movements to a specific drilling direction set by the surgeon. The current platform is composed of a collaborative robot with seven degrees-of-freedom (DoF) equipped with a drilling tool and directly comanipulated by the surgeon. A motion capture system, as an exteroceptive sensor device, provides the robot controller with the movement data of the vertebra to be drilled. Robot Operating System (ROS) framework is used to enable real-time communication between the collaborative robot and the visual exteroceptive device. In addition, an implemented compliance control program allows to enhance the safety aspect of the robotic platform. Indeed, the collaborative robot follows the patient's movements while constraining the tool movements to an optimal trajectory as well as a limited drilling depth selected by the surgeon. The collaborative robot's elbow movements are also restricted by exploiting the null-space in order to avoid collisions with other equipment or the medical team members. Experimental drilling trials have been performed by an orthopedic surgeon to validate the usefulness and different functionalities of the developed robotic platform, and provide that a collaborative robot can comply with a spine surgery procedure. These preliminary tests were performed in a lumbar spine model for which the use of a robotic device is most frequent due to a lower complexity compared to the cervical spine.