Minimally invasive percutaneous approaches routinely employ insertion of needles into soft tissue for diagnostic or therapeutic purposes. Lack of targeting accuracy while inserting needles can significantly mitigate the effectiveness of these methods. Robot-assisted needle steering under magnetic resonance imaging (MRI) guidance is a viable option for reaching the target accurately. In this paper, we report the development of an MRI-compatible needle driver for in-bore prostate biopsy. The device easily mounts onto and works together with our previously developed MRI-compatible prostate interventional robot. It is the first robotic device using a standard biopsy gun, which is easily replaceable/detachable in case of multi-sampling biopsy applications. The mechanism enables rotation, translation, and triggering of the biopsy gun to steer the bevel needle through the tissue and to take samples accurately from the target loci. Using the rotational and translational capabilities, the same system can also assist brachytherapy needle placement. Preliminary experiments have shown that the design meets the requirements set by the clinical workflow. System feasibility was verified by multiple users inserting 2 different types of needles under visual feedback into a phantom made of soft plastic. The average targeting errors were 0.92 mm for 18 gauge biopsy and 1.65 mm for 20 gauge brachytherapy needle.