Protection is dependent on MR1, IFN-γ and GM-CSF, but not IL-17A, TNF or perforin, and enhanced protection is detected earlier after infection of mice antigen-primed to boost MAIT cell numbers before infection. Here, IL17A is linked to infection.