The high transition temperature and low surface resistance of MgB 2 attracts interest in its potential application in superconducting radio frequency accelerating cavities. However, compared to traditional Nb cavities, the viability of MgB 2 at high rf fields is still open to question. Our approach is to study the nonlinear electrodynamics of the material under localized rf magnetic fields. Because of the presence of the small superconducting gap in the band, the nonlinear response of MgB 2 at low temperature is potentially complicated compared to a single-gap s-wave superconductor such as Nb. Understanding the mechanisms of nonlinearity coming from the two-band structure of MgB 2 , as well as extrinsic sources of nonlinearity, is an urgent requirement. A localized and strong rf magnetic field, created by a magnetic write head, is integrated into our nonlinear-Meissner-effect scanning microwave microscope [T. Tai et al., IEEE Trans. Appl. Supercond. 21, 2615(2011. MgB 2 films with thickness 50 nm, fabricated by a hybrid physical-chemical vapor deposition technique on dielectric substrates, are measured at a fixed location and show a strongly temperature-dependent third harmonic response. We propose that several possible mechanisms are responsible for this nonlinear response.