Converts Mg-protoporphyrin IX to Mg-protoporphyrin IX methylester using S-adenosyl-L-methionine as a cofactor. Mg-protoporphyrin IX + S-adenosyl-L-methionine = Mg-protoporphyrin IX 13-monomethyl ester + S-adenosyl-L-homocysteine Porphyrin-containing compound metabolism; chlorophyll biosynthesis (light-independent). Belongs to the class I-like SAM-binding methyltransferase superfamily. Magnesium protoporphyrin O-methyltransferase family.