A cardiac rhythm management system includes a first implantable medical device configured to monitor a patient's heart rhythm and provide therapy if appropriate, and a second implantable medical device that is configured to monitor the patient's heart rhythm and provide therapy if appropriate. The first implantable medical device is configured to detect a magnetic field indicative of an MRI machine and, upon detecting a magnetic field indicative of an MRI machine, is further configured to communicate the presence of the magnetic field indicative of the MRI machine to the second implantable medical device. The second implantable medical device may then enter an MRI-safe mode.