As ice sheets grow or decay, the net flux of freshwater into the ocean changes and the bedrock adjusts due to isostatic adjustments, leading to variations in the bottom topography and the oceanic boundaries. This process was particularly intense during the last deglaciation due to the high rates of ice-sheet melting. It is, therefore, necessary to consider transient ocean bathymetry and coastlines when attempting to simulate the last deglaciation with Earth System Models (ESMs). However, in most standard ESMs the land-sea mask is fixed throughout simulations because the generation of a new ocean model bathymetry implies several levels of manual corrections, a procedure that is hardly doable very often for long runs. This is one of the main technical problems towards simulating a complete glacial cycle with general circulation models. For the first time, we present a tool allowing for an automatic computation of bathymetry and land-sea mask changes in the Max Planck Institute Earth System Model (MPI-ESM). The strategy applied is described in detail and the algorithms are tested in a long-term simulation demonstrating the reliable behaviour. Our approach guarantees the conservation of mass and tracers at global and regional scales. The modules presented in this paper are a promising tool to be used with the MPI-ESM to allow for transient simulations of the last deglaciation considering interactive bathymetry and land-sea mask.