Depends. MRI itself is safe, but they often add "contrast" which is known to cause cancer (I'm not clear on if there is more than one choice for contrast though, or if they all cause cancer). Of course contrast is mostly used when they looking at a something - likely a tumor that might or might not be cancer to decide how to treat it - in that case does it matter that your long term cancer prospects go up when without it your short term prospects are not good.