  Young giant planets are the best targets for characterization with direct
imaging. The Medium Resolution Spectrometer (MRS) of the Mid-Infrared
Instrument (MIRI) of the recently launched James Webb Space Telescope (JWST)
will give access to the first spectroscopic data for direct imaging above 5
$\mu$m with unprecedented sensitivity at a spectral resolution up to 3700. This
will provide a valuable complement to near-infrared data from ground-based
instruments for characterizing these objects. We aim to evaluate the
performance of MIRI/MRS to detect molecules in the atmosphere of exoplanets and
to constrain atmospheric parameters using Exo-REM atmospheric models. The
molecular mapping technique, based on cross-correlation with synthetic models,
has been introduced recently. This promising detection and characterization
method is tested on simulated MIRI/MRS data. Directly imaged planets can be
detected with MIRI/MRS, and we are able to detect molecules (H$_2$O, CO,
NH$_3$, CH$_4$, HCN, PH$_3$, CO$_2$) at various angular separation depending on
the strength of the molecular features and brightness of the target. We find
that the stellar spectral type has a weak impact on the detection level. This
method is globally most efficient for planets with temperatures below 1500 K,
for bright targets and angular separation greater than 1$''$. Our parametric
study allows us to anticipate the ability to characterize planets that would be
detected in the future. The MIRI/MRS will give access to molecular species not
yet detected in exoplanetary atmospheres. The detection of molecules as
indicators of the temperature of the planets will make it possible to
discriminate between the various hypotheses of the preceding studies, and the
derived molecular abundance ratios should bring new constraints on planetary
formation scenarios.
