We show theoretically that a thermoelectric heat engine, operating exclusively due to quantum-mechanical interference, can reach optimal linear-response performance. A chiral edge state implementation of a close-to-optimal heat engine is proposed in an electronic Mach-Zehnder interferometer with a mesoscopic capacitor coupled to one arm. We demonstrate that the maximum power and corresponding efficiency can reach 90% and 83%, respectively, of the theoretical maximum. The proposed heat engine can be realized with existing experimental techniques and has a performance robust against moderate dephasing.