Capsule endoscopy is a promising technique for diagnosing diseases in the small intestines. Here we propose a miniature swimming mechanism that uses MRIs magnetic fields for both propulsion and wireless energy delivery. Our method uses both the static and radio frequency (RF) magnetic field inherently available in MRI to generate propulsion force. The propulsion force is produced by a swimming tail containing waving beam consisting of three coils in a row. Alternating current in the coils acting on the static magnetic field of the MRI will generate waving movement to produce a propulsion force. RF magnetic field will provide power to generate the alternating currents in the coils. We developed a theoretical model to predict sinusoidal waves produced by the waving beam using the Euler-Bernoulli beam equation and multiple-input multiple-output system were solved using antenna design theory. This numerical model predicted that the maximal propulsion from a 10 mm long tail can produce a velocity of 7.9 mm/s force of 5.5 mN when placed in a 3T static magnetic field. A validation study with a single coil demonstrated that the theoretical and numerical model predicts well the proposed swimming mechanism and it is useful for the fabrication of swimming tails.