Yes, you can. The two spells create different magical effects, with Mage Armor raising natural AC and Armor of Agathys granting temporary hit points, so they do not conflict with each other.