Does Unarmored Defense work with a spell like mage armor?

Unarmored Defense doesn’t work with mage armor. You might be asking yourself, “Why don’t they work together? Mage armor specifies that it works on a creature who isn’t wearing armor.” It’s true that the target of mage armor must be unarmored, but mage armor gives you a new way to calculate your AC (13 + your Dexterity modifier) and is therefore incompatible with Unarmored Defense or any other feature that provides an AC calculation.