Aims. We study the close environment of nearby Cepheids using high spatial resolution observations in the mid-infrared with the VLTI/MIDI instrument, a two-beam interferometric recombiner. Methods. We obtained spectra and visibilities for the classical Cepheids X Sgr and T Mon. We fitted the MIDI measurements, supplemented by B, V, J, H, K literature photometry, with the numerical transfer code DUSTY to determine the dust shell parameters. We used a typical dust composition for circumstellar environments. Results. We detect an extended dusty environment in the spectra and visibilities for both stars, although T Mon might suffer from thermal background contamination. We attribute this to the presence of a circumstellar envelope (CSE) surrounding the Cepheids. This is optically thin for X Sgr (tau(0.55microns) = 0.008), while it appears to be thicker for T Mon (tau(0.55micron) = 0.15). They are located at about 15-20 stellar radii. Following our previous work, we derived a likely period-excess relation in the VISIR PAH1 filter, f(8.6micron)[%]= 0.81(+/-0.04)P[day]. We argue that the impact of CSEs on the mid-IR period-luminosity (P-L) relation cannot be negligible because they can bias the Cepheid brightness by up to about 30 %. For the K-band P-L relation, the CSE contribution seems to be lower (< 5 %), but the sample needs to be enlarged to firmly conclude that the impact of the CSEs is negligible in this band.