We describe the phase-contrast imaging instrument at the Matter in Extreme Conditions (MEC) endstation of the Linac Coherent Light Source. The instrument can image phenomena with a spatial resolution of a few hundreds of nanometers and at the same time reveal the atomic structure through X-ray diffraction, with a temporal resolution better than 100 fs. It was specifically designed for studies relevant to high-energy-density science and can monitor, e.g., shock fronts, phase transitions, or void collapses. This versatile instrument was commissioned last year and is now available to the MEC user community.