Hello.
Whether Xanax will help you or not will depend up on your previous experiences with it. You might have tried Xanax in other situations. If you could go through the claustrophobic event successfully with Xanax, chances are more that it will help you even with the MRI. You might have to try a slightly higher dose if needed.
Another option is that of an injectable sedative, other than Xanax. Precaution: Do not use Xanax in combination with other sedatives.
SO, if you have experienced success with Xanax earlier, you can go ahead with Xanax for the MRI. What can also help is someone to talk you through the process if necessary and permitted, and a knowledge that MRI is a safe and non-invasive investigatory technique. When MRI was not there, the same investigation was not possible without having to perform surgery.
Hope this helps.
Best Regards
Abhijeet Deshmukh, MD
(This post is for the purpose of providing medical information and is not a substitute for a face-to-face consultation with a doctor. This post is not intended to give or rule out a diagnosis, create a doctor-patient relationship or replace an existing one. I am not able to diagnose medical conditions online. Please consult with your doctor or a qualified healthcare provider for diagnosis and treatment options)