Magnesium-ion batteries have the potential to replace commercially available Li-ion batteries in the future due to their lower cost and sustainability. On the other hand, magnesium ions are dendrite-free and offer greater energy density and volumetric capacity due to their divalent nature. Conventional electrode materials face challenges in capturing magnesium ions. We assessed the feasibility of using Co-anti MXene (CoB/CoP) monolayers as electrode materials for Mg-ion batteries using density functional theory. The adsorption energy of CoB for Mg atoms is -2.88 eV in a vacuum (-4.46 and -4.55 eV for diglyme and triglyme effects calculated using the Vaspsol method), respectively. As predicted by