MHC variation sculpts individualized microbial communities that control susceptibility to enteric infection.