The Magnetic Flux Eruption (MFE) code is a single-fluid magnetohydrodynamics (MHD) code that has been used as a specialized and robust tool for investigating the evolution of magnetic fields in the Sun’s interior and corona. It has been applied to model the subsurface rise of twisted active-region flux tubes, their emergence into the solar atmosphere, and the initiation and evolution of coronal mass ejections (CMEs). We describe recent developments of the MFE code, including numerical enhancements and the implementation of the Yin–Yang grid, which enables full-sphere simulations. We then present new results from several applications of the code: (1) an MHD simulation of a twisted coronal flux rope with prominence condensation, leading to a CME and associated prominence eruption; and (2) a solar wind simulation with a dipolar magnetic flux distribution at the solar surface, representative of solar-minimum conditions. The latter simulation reveals striking dynamic features produced by continuous 3D reconnection in the heliospheric current sheet, which could be observable in future white-light coronagraph observations from polar vantage points. We will also discuss the development of a new  high-order/resolution code for arbitrary orthogonal geometry with applications in planetary magnetospheres.