Cardiac electrophysiology is an effective treatment for atrial fibrillation, in which a long, steerable catheter is inserted into the heart chamber to conduct radio frequency ablation. Magnetic resonance imaging (MRI) can provide enhanced intraoperative monitoring of the ablation progress as well as the localization of catheter position. However, accurate and real-time tracking of the catheter shape and its efficient manipulation under MRI remains challenging. In this article, we designed a shape tracking system that integrates a multicore fiber Bragg grating (FBG) fiber and tracking coils with a standard cardiac catheter. Both the shape and positional tracking of the bendable section could be achieved. A learning-based modeling method is developed for cardiac catheters, which uses FBG-reconstructed three-dimensional curvatures for model initialization. The proposed modeling method was implemented on an MRI-guided robotic platform to achieve feedback control of a cardiac catheter. The shape tracking performance was experimentally verified, demonstrating 2.33° average error for each sensing segment and 1.53 mm positional accuracy at the catheter tip. The feedback control performance was tested by autonomous targeting and path following (average deviation of 0.62 mm) tasks. The overall performance of the integrated robotic system was validated by a pulmonary vein isolation simulator with ex-vivo tissue ablation, which employed a left atrial phantom with pulsatile liquid flow. Catheter tracking and feedback control tests were conducted in an MRI scanner, demonstrating the capability of the proposed system under MRI.