Hanna sells a combined checker for both magnesium and calcium (
https://www.hannainst.com/hi96752-calcium-and-magnesium-portable-photometer.html), but you'll have to dilute your sample, so that it is range of the detector. I've attached some literature on the different methods for determination of calcium and magnesium in water. This Hanna checker is not specifically for saltwater, but interference by sodium and chloride should not be a problem from my reading of the method used (interference by other trace metals can occur, but should not be problematic either since their concentrations are low relative to the concentration of calcium and magnesium). If you know your calcium concentration already, then you might be able to use their freshwater magnesium checker (
https://www.hannainst.com/hi719-magnesium-hardness.html) by subtracting the hardness from calcium (there's an equation in the attached book for the correction). FYI, I have not used either of these checkers.