Q:

Does drinking coffee interfere with magnesium absorption?

I heard often that coffee deplete magnesium in your body, both in ads for magnesium supplements, on so called "wellness" websites but also on some scientific papers.
Some sources claim that it's because coffee decrease absorption of magnesium and other that also coffee is a diuretic, so you lose magnesium while urinating.
Here are examples:

LiveStrong

When you drink coffee, your intestinal absorption of magnesium decreases. Although coffee does not directly deplete magnesium from your body, the decreased absorption of magnesium can cause your body to gradually lose magnesium, potentially resulting in a magnesium deficiency. The more coffee you drink, the less magnesium your intestines can absorb. This becomes more important as you get older, as magnesium absorption typically decreases with age.

The multifaceted and widespread pathology of magnesium deficiency in Med. Hypothesis.

Mg levels are decreased by excess ethanol, salt, phosphoric acid (sodas) and coffee intake, by profuse sweating [...]

But I stumbled upon other claims, that coffee might provide you with more magnesium than you will lose after drinking it, so you might even end up with a little more magnesium. Mostly I heard it from Polish Youtube Channel, Pod Mikroskopem. The presenter, Patryk, has an education in some medical sciences. 
He provides his sources to this video:

R. Preedy Victor: Caffeine: Chemistry, Analysis, Function and Effects.  Food and Nutritional Components, 2012.
Orey C. Kensington Books, 2012.
Zand J.: Smart Medicine for Healthier Living. Avery Publishing Group, 1999.
Świątkowska K.: Kawa kontra magnez (...) (dostęp 21.09.2018)
Sarobo C.: Int J Exp Pathol. 2012, 93(6):429-37.
Ming Z.: Can J Physiol Pharmacol. 2010, 88(11):1115-21.
Robert A.F.: Am J Physiol Renal Physiol. 2015, 15; 308(12): 1409–1420.

I can not find any strong statement that coffee cause magnesium depletion, like research focused on relation between coffee and magnesium level while stumbling upon claims that it might even increase magnesium level. Also some studies mentions that:

Instant coffees and coffee substitutes are rich in K, Mg and P (>100 mg/100 g dw)
  https://www.sciencedirect.com/science/article/pii/S0308814611010880

And:

Coffee is a better source of potassium than tea, has appreciable amounts of magnesium, and may contribute significantly to manganese intakes in some instances
  https://www.ncbi.nlm.nih.gov/pubmed/6650450

A:

The Recommended Dietary Allowance for magnesium for adult males is 400 mg (Office of Dietary Supplements at NIH.gov). One cup of coffee has 10 mg of magnesium (USDA.gov), which does not really make it a good source.
In some papers, they are claims like: 

...Mg levels are decreased by excess ethanol, salt, phosphoric acid
  (sodas) and coffee intake...(Medical Hypotheses, 2001)

Some diagnostic guidelines, such as the one in this review article Challenges in the Diagnosis of Magnesium Status (Nutrients, 2018) suggest that coffee consumption is a minor criteria in assessment of magnesium status. The article links to a small 1994 study, according to which coffee consumption may result in minor net loss of magnesium via the urine.
Here's another small study that says that magnesium loss in urine can be due to increased diuresis triggered by caffeine:

...caffeine-induced urinary loss of calcium and magnesium is largely
  attributable to a reduction in calcium and magnesium renal
  reabsorption...

This means that some magnesium loss can be expected mainly in caffeine-naive users who haven't developed tolerance to caffeine's diuretic effect (as opposed to regular coffee drinkers who usually have). 
Several comprehensive articles about magnesium do not mention any interaction between coffee consumption and magnesium (Linus Pauling Institute, Office of Dietary Supplements, MedlinePlus, Drugs.com).
In conclusion, there does not seem to be enough evidence to worry that the intake of usual amounts of coffee would significantly affect magnesium status in your body. 

