Worried you may not be getting enough magnesium in your diet? If you have a high-fiber diet, you’re probably getting plenty of magnesium, too. Magnesium is a mineral found in whole grains, nuts, beans and dark-green vegetables. It is important in more than 300 chemical reactions that help keep the body working properly.