A major histocompatibility complex, or MHC, is a molecule on the outside of immune cells such as white blood cells. It is coded for by a large gene family in all vertebrates.

The function of is MHC molecules to sense foreign antigens, and hence the presence of 'foreign' proteins. They bind peptide fragments from pathogens onto their cell surface. Once there, the fragments are recognized by T-cells. Adaptive immunity depends on this reaction.