The decomposition of a nonlinear and non-stationary signal into intrinsic modes is challenging, and algorithms, such that of Empirical Mode Decomposition (EMD) used successfully in a broad range of applications, have limitations regarding their sensitivity to noise and sampling. To address these drawbacks a mode decomposition algorithm, which we name Maximal Spectral Overlap Wavelet Transform (MSO-WT), is proposed. MSO-WT relies on the adaptive decomposition of a signal into a series of components using wavelet packets, and the clustering of the components for the synthesis of the modes. The effectiveness of the algorithm is demonstrated using several synthetic signals. In addition, this algorithm is used for the development of a new phase synchronization index, named Multi-Component Mean Phase Coherence (MCMPC) generalizing the Mean Phase Coherence (MPC) index. A comparison between the two indices is performed by applying them for the detection of phase synchronization between two coupled Rossler and Mackey-Glass systems. Finally, the MCMPC index is used for the construction of a brain connectivity network from multichannel electroencephalogram data and the detection of an epileptic seizure.