We investigate the influence of orbital eccentricity and interplanetary magnetic field (IMF) direction on the dimensions of Mercury's magnetosphere using four Earth years of data collected by the MErcury Surface, Space ENvironment, GEochemistry, and Ranging spacecraft. The variations in magnetopause subsolar distance, flank distance, and tail radius are compared to determine the global dimensions and compressibility of the magnetosphere. As Mercury moves from perihelion (aphelion) to aphelion (perihelion) its magnetosphere expands (contracts) globally by 15% on average. After mapping all of the magnetopause crossings to a fixed radial distance from the Sun, we find that IMF cone angle changes lead to reconfigurations of the magnetosphere of comparable magnitude to radial solar distance effects. Furthermore, the magnetosphere is found to expand globally under the quasi-radial IMF, while contracting under the quasi-perpendicular conditions. A new Mercury magnetopause model parameterized by the heliocentric distance and IMF cone angle was constructed. Unlike Earth, the model gives a closed magnetopause for the nightside in most cases, and its flaring decreases with the contraction of the magnetosphere. The results demonstrate the highly variable reconfigurations of Mercury's magnetosphere under its extreme environmental conditions.