Controlling continuum robots with precision is particularly a challenging task due to the complexity of their mathematical models and inaccuracies in modeling approaches. Therefore, most advanced control schemes have shown poor performances, especially in trajectory tracking accuracy. This paper presents a proposed Nonlinear Model Predictive Control (NMPC) scheme to solve the trajectory tracking of a class of continuum robots, namely Cable-Driven Continuum Robot (CDCR). However, since NMPC schemes are often limited by the computational burden associated with the optimization algorithms to be solved at each sampling time, the Particle Swarm Optimization (PSO) algorithm is used to solve the arising optimization problem NMPC, thanks to its simplicity and fast convergence. The proposed NMPC-PSO scheme is applied to the developed kinematic and dynamic models of the considered CDCR. Based on the kinematic and dynamic model, the two proposed controllers have been validated against numerical simulations of two-dimensional CDCR with two bending sections for set-point stabilization and point-to-point trajectory tracking. For both controllers, the performance of tracking accuracy and computation time is analyzed and compared. Moreover, the obtained simulation results are compared to the available literature works. In view of the results obtained on the considered CDCR, the proposed NMPC-PSO scheme can track in real-time the desired trajectory with high accuracy and much less execution time than other advanced control schemes, which makes it an alternative for real-time applications.