MRI tests are generally safe and painless, but some people may feel claustrophobic inside the MRI machine. In these cases, the healthcare provider may prescribe a sedative to help the patient relax. Additionally, people with certain metal implants, such as pacemakers or cochlear implants, may not be eligible for an MRI test.