Cloud platforms rapidly develop and supply many cloud-based services with various functions but varying Quality of Service (QoS) attributes. In the context of cloud computing, a major concern is how to incorporate disparate cloud services to maximize QoS value, which is underpinned by meeting the local QoS requirements of users. To deal with multiple QoS parameters in service composition, we propose a new mechanism using the Capuchin Search Algorithm (CapSA) that provides solutions to satisfy connectivity constraints. The CapSA algorithm mimics the dynamic behavior of capuchin monkeys in the forest to solve global and local optimization problems. The CapSA was selected for its simplicity, reduced computational complexity, and exploration/exploitation balance. The approach takes the form of an optimization problem to minimize energy consumption and total cost. Compared with other approaches, the proposed algorithm improves the efficiency of cloud service composition by convergent rapidly and obtaining better compositions.