High-fidelity deterministic transport codes require highly accurate multigroup cross sections (MGXS). Monte Carlo is increasingly cited as a reactor-agnostic approach to MGXS generation since it is unconstrained by the engineering-based approximations that limit the applicability of deterministic MGXS generation tools. This paper introduces a new framework that uses the OpenMC Monte Carlo code to generate MGXS for use in multigroup transport codes. The openmc.mgxs module is built atop OpenMC’s Python application programming interface to process tally data output by the OpenMC executable. This paper validates the module to generate MGXS that enable the multigroup OpenMOC transport code to compute eigenvalues to within 50 pcm and fission rates to within 1% of reference solutions for two heterogeneous pressurized water reactor benchmarks.