New statistical methodology is needed to formalize the natural direct effect (NDE), natural indirect effect (NIE), and controlled direct effects (CDEs) of a mixture of exposures on an outcome through an intermediate variable. We implement Bayesian kernel machine regression (BKMR) to allow for all possible interactions and nonlinear effects of the co-exposures on the mediator, and the co-exposures and mediator on the outcome. From the posterior predictive distributions of the mediator and the outcome, we simulate counterfactual outcomes to obtain posterior samples, estimates, and credible intervals (CI) of the NDE, NIE, and CDE. We applied this methodology to quantify the contribution of birth length as a mediator between in utero co-exposure of arsenic, manganese and lead, and children’s neurodevelopment, in a prospective birth cohort in rural Bangladesh. If birth length were fixed to its 75th percentile value of 48cm, the effect of the metal mixture on neurodevelopment decreases, suggesting that nutritional interventions to help increase birth length could potentially block some of the harmful effects of the metal mixture on neurodevelopment (CDE: -0.02, 95% CI: -0.22, 0.17).