The development of compact fiber-based light sources emitting over a wide wavelength range in the mid-infrared and their application to the detection of greenhouse gases and volatile organic compounds still remain of critical interest. In the present work, we make use of several dedicated infrared fibers for implementing a mid-infrared optical device pumped by a thulium doped-fiber laser around 1.965 μm that simultaneously enables a first nonlinear stage of frequency conversion and supercontinuum generation and a second linear stage of gas absorption spectroscopy. As a proof-of-principle, we carry out mid-infrared supercontinuum absorption spectroscopy of methane around 7.7 μm by means of a hollow-core fiber-based gas cell combined to a commercial Fourier-transform infrared spectrometer. Our all-fiber configuration operating in the femtosecond regime at megahertz repetition rate allows the detection of methane concentrations as low as 20 ppm.