  We describe the design and performance of the Medium Resolution Spectrometer
(MRS) for the JWST-MIRI instrument. The MRS incorporates four coaxial spectral
channels in a compact opto-mechanical layout that generates spectral images
over fields of view up to 7.7 X 7.7 arcseconds in extent and at spectral
resolving powers ranging from 1,300 to 3,700. Each channel includes an
all-reflective integral field unit (IFU): an 'image slicer' that reformats the
input field for presentation to a grating spectrometer. Two 1024 X 1024 focal
plane arrays record the output spectral images with an instantaneous spectral
coverage of approximately one third of the full wavelength range of each
channel. The full 5 to 28.5 micron spectrum is then obtained by making three
exposures using gratings and pass-band-determining filters that are selected
using just two three-position mechanisms. The expected on-orbit optical
performance is presented, based on testing of the MIRI Flight Model and
including spectral and spatial coverage and resolution. The point spread
function of the reconstructed images is shown to be diffraction limited and the
optical transmission is shown to be consistent with the design expectations.
