Involved in the biosynthesis of the compatible solute mannosylglucosylglycerate through a phosphorylating pathway. Catalyzes the dephosphorylation of mannosylglucosyl-3-phosphoglycerate (MGPG) to mannosylglucosylglycerate (MGG). Can also dephosphorylate UDP-glucose, ADP-glucose, GDP-mannose, glucosyl-3-phosphoglycerate (GPG), mannosyl-3-phosphoglycerate (MPG), ADP, GDP and UDP. (2R)-2-O-[alpha-D-mannopyranosyl-(1->2)-alpha-D-glucopyranosyl]-3-phospho-glycerate + H2O = (2R)-2-O-[alpha-D-mannopyranosyl-(1->2)-alpha-D-glucopyranosyl]-glycerate + phosphate Divalent cations are not required for activity, but the presence of Mn(2+), Mg(2+) or Ca(2+) stimulates activity. Optimum temperature is 80 degrees Celsius. MggB could be only partially purified, because it completely loses activity after hydrophobic interaction chromatography or size-exclusion chromatography. Belongs to the 5'-nucleotidase family.