The MHD dynamo effect is an intrinsic and fundamental feature of reversed-field pinch (RFP) plasmas. It plays an important role in the tokamak as well (commonly as referred to as the "flux pumping" mechanism) in particular for the hybrid scenario with central safety factor close to one. In this contribution, we review results based on the above-mentioned nonlinear 3D MHD theory and simulations, and related experiments. Such results allow to identify the underlying physics of the MHD dynamo effect common to tokamak and RFP configurations: a helical core displacement modulates parallel current density along flux tubes, which requires a helical electrostatic potential to build up, giving rise to a helical MHD dynamo flow. Similarities between the MHD dynamo at play in the reversed-field pinch and tokamak configuration will be discussed, with the aim of providing a common theoretical framework for the two configurations. Both the quasi-periodic sawtoothing regime and in the stationary helical regime (obtained either with application of magnetic perturbations or at high plasma pressure will be considered as result of the nonlinear 3D MHD codes SpeCyl and PIXIE3D.