We developed a Python package capable of finding the lowest-energy magnetic state of a given structure and to estimate its critical temperature from a Monte Carlo simulation of its effective Hamiltonian. In this paper, we introduce the code and present the results of tests performed on known materials: α-Fe2O3 (hematite), Ca3MnCoO6 and Ni3TeO6. After checking the calculation parameters for convergence, we computed the linear response value of U for DFT+U and then the single-point energies of a number of collinear magnetic configurations. The magnetic ground state has been correctly predicted for α-Fe2O3 and Ni3TeO6, while for Ca3MnCoO6 the DFT calculations did not reproduce the experimental low-spin states on Co atoms. For α-Fe2O3 and Ni3TeO6 we were able to estimate the Néel temperature and the computed values of 911 K and 31 K are both in good agreement with experiment (955 K and 52 K). Program summaryProgram title: AutomagCPC library link to program files:https://doi.org/10.17632/3b86n3rb8d.1Developer's repository link:https://github.com/michelegalasso/automagLicensing provisions: GNU General Public License 3Programming language: Python3Nature of problem: The first-principles study of the magnetic properties of a given material is a long and error-prone task, which is usually done by hand. Often scientists need to find the most stable magnetic state of a given structure, or at least its collinear approximation, and to get an estimate of the critical temperature of the magnetically ordered to paramagnetic phase transition.Solution method: An automated search for the most stable magnetic state of a given structure and for the calculation of its critical temperature, which frees the users from repetitive work and keeps their attention on the physics of the problem. The code has a block structure which starts with convergence tests and ends with critical temperature calculation, allowing the users to skip anything that is not needed for their particular problem.