If you need to have a SS component in contact with a Mg component, you will need to address the galvanic corrosion potential. Coatings can be used to minimize the problem, but a great deal of attention must be paid to details like anode to cathode ratio, coating damage, etc.