The major histocompatibility complex (mhc) tells you who you can donate organs to?

Among other things. The physiologic function of mhc proteins is regulation of immune response. Organ transplants are an artificial situation, however, you are correct in that matching the hla types of donor and recipient are critical in most transplants.