We systematically explore the ability of the Community Atmospheric Model version 5 (CAM5) to simulate the Madden-Julian Oscillation (MJO), through an analysis of MJO metrics calculated from a 1100-member perturbed parameter ensemble of 5 year simulations with observed sea surface temperatures. Parameters from the deep convection scheme make the greatest contribution to the variance in MJO simulation quality with a much smaller contribution from parameters in the large-scale cloud, shallow convection, and boundary layer turbulence schemes. Improved MJO variability results from a larger lateral entrainment rate and a reduction in the precipitation efficiency of deep convection that was achieved by a smaller autoconversion of cloud to rainwater and a larger evaporation of convective precipitation. Unfortunately, simulations with an improved MJO also have a significant negative impact on the climatological values of low-level cloud and absorbed shortwave radiation, suggesting that structural in addition to parametric modifications to CAM5's parameterization suite are needed in order to simultaneously well simulate the MJO and mean-state climate.