The goal of the present study was to develop and evaluate an isometric dynamometer for measuring mouse ankle flexor torque after electric stimulation of the nerve. The dynamometer was to be used within an magnetic resonance (MR) apparatus and should require minimal surgical intervention. To quantify the effect of the magnetic field on contractile parameters, measurements were performed both outside and inside the MR apparatus. The effect of magnetic field gradient switching that accompanies rapid MR scanning was tested also. The set-up required no surgical intervention except for chronic implantation of an electrode. The dynamometer has a high mechanical frequency response (270 Hz). Measured muscle strengths were identical outside and inside the MR scanner. However, during fast magnetic field gradient switching, the variability increased and the measured strength decreased slightly (7%). The noise level of the dynamometer (0.02–0.03 N·mm) was low compared with the strength of the dorsal flexors (2 N·mm). Fast gradient switching increased the noise level (0.07 N·mm). The dynamometer had no observable adverse effects on the quality of the MR images of the mouse hind limb. We conclude that the dynamometer enables accurate measurements of mechanical muscle performance during exercise protocols within an MR apparatus under physiological conditions.