We present an ab-initio disordered local moment theory for the Gibbs free energy of a magnetic material. Two central objects are calculated: the lattice Fourier transform of the direct local moment -local moment correlation functions in the paramagnetic state and local internal magnetic fields as functions of magnetic order. We identify the potentially most stable magnetic phases from the first, which can include non-collinear and long-period states in complex multi-atom unit cells, and extract higher order correlations among the local moments from the second. We propose that these latter entities produce a picture of effective multi-site magnetic interactions depending on the state and extent of magnetic order and discuss its relation to other approaches. We show how magnetic phase diagrams for temperature, magnetic field, and lattice structure and also magnetocaloric and mechanocaloric effects can be obtained from this approach. The theory accurately predicts the order of transitions and quantifies contributions to first-order and order-order magnetic phase transitions from both purely electronic sources and magnetoelastic effects. Our case study is the apparently frustrated magnetism of the Mn3A class of materials in all its cubic, hexagonal, and tetragonal structures. The theory produces magnetic phases and transition temperatures in good agreement with experiment. We explain the first-order triangular antiferromagnetic to collinear antiferromagnetic transition in cubic Mn3Pt as a magnetovolume driven effect, and its absence for A=Ir and Rh. We also construct the magnetic phase diagram of Mn3Pt and explore its potential as a barocaloric material. Finally, we prepare the groundwork for future fully relativistic studies of the temperature dependence of the magnetism of Mn3A, including Mn3Sn, Mn3Ga, and Mn3Ge. arXiv:1812.08653v2 [cond-mat.mtrl-sci]