GO:0015095:   magnesium ion transmembrane transporter activity
Enables the transfer of magnesium (Mg) ions from one side of a membrane to the other.