We investigate the impact of environment on the internal mass distribution of galaxies using the Middle Ages Galaxy Properties with Integral field spectroscopy (MAGPI) survey. We use 2D resolved stellar kinematics to construct Jeans dynamical models for galaxies at mean redshift $z \sim 0.3$, corresponding to a lookback time of $3-4$ Gyr. The internal mass distribution for each galaxy is parameterised by the combined mass density slope $\gamma$ (baryons $+$ dark matter), which is the logarithmic change of density with radius. We use a MAGPI sample of 28 galaxies from low-to-mid density environments and compare to density slopes derived from galaxies in the high density Frontier Fields clusters in the redshift range $0.29 Comment: Accepted for publication in MNRAS