We present the results of the simultaneous deep XMM and Chandra observations of the bright Seyfert 1.9 galaxy MCG-5-23-16, which is thought to have one of the best known examples of a relativistically broadened iron K-alpha line. The time averaged spectral analysis shows that the iron K-shell complex is best modeled with an unresolved narrow emission component (FWHM < 5000 km/s, EW ~ 60 eV) plus a broad component. This latter component has FWHM ~ 44000 km/s and EW ~ 50 eV. Its profile is well described by an emission line originating from an accretion disk viewed with an inclination angle ~ 40^circ and with the emission arising from within a few tens of gravitational radii of the central black hole. The time-resolved spectral analysis of the XMM EPIC-pn spectrum shows that both the narrow and broad components of the Fe K emission line appear to be constant in time within the errors. We detected a narrow sporadic absorption line at 7.7 keV which appears to be variable on a time-scale of 20 ksec. If associated with Fe XXVI Ly-alpha this absorption is indicative of a possibly variable, high ionization, high velocity outflow. The variability of this absorption feature appears to rule out a local (z=0) origin. The analysis of the XMM RGS spectrum reveals that the soft X-ray emission of MCG-5-23-16 is likely dominated by several emission lines superimposed on an unabsorbed scattered power-law continuum. The lack of strong Fe L shell emission together with the detection of a strong forbidden line in the O VII triplet is consistent with a scenario where the soft X-ray emission lines are produced in a plasma photoionized by the nuclear emission.