In this paper, the designing problem of two flexible AC transmission systems (FACTS)-based stabilizers are formulated for a cuckoo optimization algorithm (COA) with an objective function that includes the damping factor and the damping ratio of oscillations. This new optimization algorithm has a strong ability to find the most optimistic results for dynamic stability improvement. Also, its performance in 20 times run is the same as in 1 time run. Single machine infinite bus (SMIB) system has been considered to examine the operation of proposed COA based static synchronous series compensator (SSSC) and static synchronous compensator (STATCOM) controllers. Sudden change in the input power of generator is considered as a disturbance. The effectiveness of the proposed COA based SSSC and STATCOM controller for damping of low frequency oscillations is tested on a weakly connected power system with a disturbance and different loading conditions and their results are compared with each other. The eigenvalue analysis and time domain simulation results are presented to show the effectiveness of these FACTS-based stabilizers. The results obtained revealed the effectiveness of SSSC in comparison with STATCOM in damping power system oscillation and the results confirmed the effectiveness of the COA method for controller parameter optimization.