The gut microbiota and immune surveillance are important for gastrointestinal (GI) function and health. Mucosal-associated invariant T (MAIT) cells are an abundant population of innate-like T cells associated with GI mucosa and activated by a diverse range of bacteria and yeast strains. The T cell antigen receptor (TCR) of MAIT recognizes antigens bound to MR1, an MHC class I-like–related molecule, which folds into a stable complex with β2 microglobulin (β2m). Noticing that MR1β2m yields were enhanced in RPMI medium, which contains vitamins isolated from bacteria and plants, Kjer-Nielsen et al. identified 6-formyl pterin (6-FP), a photodegradation product of folic acid (vitamin B9) as a molecule in RPMI medium that promoted the formation of MR1β2m. Crystallographic analysis revealed that the antigen-binding cleft of the MR1β2m complex is structurally distinct from the peptide- and lipid-binding antigen-presenting MHC-I and -II molecules HLA-A2 and CD1d. Despite increasing the abundance of MR1 at the cell surface in lymphoid CR1 cells, 6-FP failed to activate either primary MAIT cells or Jurkat cells transduced with a MAIT TCR, whereas supernatant from Salmonella typhimurium cultures activated both cell types. Using supernatant from S. typhimurium cultures grown in M9 minimal medium to exclude competing vitamin complex ligands, they identified derivatives of riboflavin (vitamin B2) that both bound MR1 and activated MAIT cells but not other types of T cells. Although similar to 6-FP, these compounds contain an extra ribityl moiety that may permit direct contact with the MAIT TCR. Notably, these riboflavin metabolites are produced by biosynthetic pathways present only in bacteria and yeast strains that activate MAIT cells. Thus, microbially produced vitamins are recognized as antigens, enabling the immune system to respond to microbial infection in the gut.