Two-dimensional (2D) materials have been a research hot topic in the passed decades due to their unique and fascinating properties. Among them, mechanical properties play an important role in their application. However, there lacks an effective tool for high-throughput calculating, analyzing and visualizing the mechanical properties of 2D materials. In this work, we present themech2dpackage, a highly automated toolkit for calculating and analyzing the second-order elastic constants (SOECs) tensor and relevant properties of 2D materials by considering their symmetry. In themech2d, the SOECs can be fitted by both the strain–energy and stress–strain approaches, where the energy or strain can be calculated by a first-principles engine, such as VASP. As a key feature, themech2dpackage can automatically submit and collect the tasks from a local or remote machine with robust fault-tolerant ability, making it suitable for high-throughput calculation. The present code has been validated by several common 2D materials, including graphene, black phosphorene,GeSe2and so on.