Just magnesium chloride is ok, but the optimal recipe is #3 in the article below.
Do-It-Yourself Magnesium Supplements for the Reef Aquarium by Randy Holmes-Farley - Reefkeeping.com
3. A certain mixture of magnesium chloride and magnesium sulfate has no net effect on seawater's major anions (chloride and sulfate). All that is necessary for such a recipe is to add these two ingredients in such a ratio that they add chloride and sulfate in the ratio naturally present in seawater (which is 7.1 to 1 on a weight basis and 9.6 to 1 on a per ion basis).
To perfect such a recipe, it's imperative to know the amounts of sulfate in Epsom salts (39%), the amount of chloride in magnesium chloride hexahydrate (34.9%), and their bulk densities, because most aquarists will use a volume based measurement (
1.05 g/cm3 for Epsom salts and
0.85 g/cm3 for magnesium chloride hexahydrate solids). Taking all these factors into account, the desired volume ratio is 10:1,
MAG flake to Epsom salts, as a supplement; for instance, 10 cups
MAG flake and 1 cup Epsom salts.