If you really want to add magnesium, you can use Epsom Salts. I don't because according to George Fix and several others, malt already contains sufficient magnesium for brewing purposes.
When brewing pale ales (which I do 90% of the time) I add some gypsum for the Ca and SO4, and a touch of CaCl2 to boost the chloride. If I'm brewing a lager, I use enough CaCl2 to get the Ca up to 50 ppm, and forget the gypsum.
There are only 10 types of people in this world. Those that understand binary, and those that don't.