This paper provides a new definition of the Ricci flow on closed manifolds admitting harmonic spinors. It is shown that Perelman’s Ricci flow entropy can be expressed in terms of the energy of harmonic spinors in all dimensions, and in four dimensions, in terms of the energy of Seiberg–Witten monopoles. Consequently, Ricci flow is the gradient flow of these energies. The proof relies on a weighted version of the monopole equations, introduced here. Further, a sharp parabolic Hitchin–Thorpe inequality for simply-connected, spin 4-manifolds is proven. From this, it follows that the normalized Ricci flow on any exotic K3 surface must become singular.