The ability of MHC molecules to present a broad spectrum of peptide antigens for T cell recognition requires a compromise between high affinity and broad specificity. Three-dimensional atomic structures of several class I and class II MHC molecules reveal a unique structural solution to this problem: Tight binding to the peptide main chain is supplemented by more or less restrictive interactions with peptide side chains. In spite of these contacts, peptide side-chain and conformational variability ensures that the resulting peptide-MHC complex presents an antigenically unique surface to T cell receptors. Extension of this understanding to other peptide-MHC complexes, including agonist/antagonist peptides and the identification of antigenic peptides within protein sequences, however, requires a detailed analysis of the interactions that determine both peptide-MHC binding affinity and the conformations of bound peptides. While many of these interactions can be modeled by homology with known structures, their specificity can depend sensitively on subtle and long-range structural effects. Structurally and immunologically important distinctions are also found between the class I and class II peptide-binding strategies. Taken together, these interactions ultimately determine the ability of an individual to respond successfully to immune challenges.