The pump itself should be taken off, and left completely outside the MRI room. It should not go anywhere near the equipment as strong magnetic fields will likely damage it. This would also apply to the transmitter and the sensor if you wear a CGM.
The infusion site itself is okay to wear as long as its not one with a stainless steel cannula.
As far as bolusing in advance, you can safely be disconnected from your insulin pump for around an hour or so without requiring any additional bolus. Some people prefer to give themselves a bit of a bolus before they disconnect, but that is a matter of personal preference and what works for you. I usually don't need to do this, and just test and correct once I put my pump back on.
The length of time the MRI takes can vary on a number of things, including what you are having the MRI for. I've been in for around 45 minutes for some scans on my shoulder before.