The article presents a client-server library for the interaction with the KUKA LBR iiwa collaborative robot via a remote personal computer (PC) in a medical-oriented collaborative robotic system (CRS). An intuitive high-level library implemented in the MathWorks MATLAB software framework includes a server for the KUKA iiwa controller, and a client-based application. The library has more than 30 functions for such operations as calculating forward and inverse kinematics, robot control in Cartesian space, path planning, graphical output, and feedback. The developed software runs on a remote computer connected to the controller of the robot via the TCP/IP protocol. The paper presents the requirements to the software related to the systems and strategies used to control the CRS, and the safety of collaborative human-robot interaction (HRI). The article also presents the description of the technical implementation of the library, its architecture, the scheme of “robot – remote PC” communication, software methods used for interaction with the robot, as well as data flow diagrams (DFDs) for the executable code. As an example of controlling the robot using the developed library, we show the results of a practical experiment: the calculation of the robot’s inverse kinematics and the path coordinates on a given trajectory.