In this paper, we propose a cavity-coupled perfect absorber (CCPA) consisting of a bottom gold layer, a SiO2 layer, and multilayer MIM (Metal-Insulator-Metal) nanowires. By coupling the Fabry-Pérot (F-P) cavity mode with the magnetic plasmons (MPs) resonance mode in multilayer MIM structure, the MPs resonance in the multilayer MIM structure is enhanced, and leading to increased absorption of the structure. By designing and optimizing the parameters, near-perfect absorption in the mid-infrared wavelengths can be achieved. The positions of the two absorption peaks can be adjusted by changing the width of the nanowires and the thickness of the SiO2 layer, resulting in the formant excitation at any position in the mid-infrared. The full-width at half-maximum (FWHM) of the short-wave peak is only 0.076 µm, and the FWHM of the long-wave peak is only 0.46 µm. The long-wave absorption peak maintains high efficiency and stability even at large incident angles, exhibiting "omnidirectional" characteristics. The tunable mid-infrared emission peak can be matched to the characteristic spectra of gases, making it suitable for infrared radiation sources in gas detection.