Grasslands are environments characterized by an elevated biodiversity in plant species, which dynamically evolves over time as a function of management practices, soil properties, and climate conditions. Climate change can locally affect grassland growth and floristic composition and, in turn, the quality and quantity of provided ecosystem services. We show how the use of the plant community model CoSMo allows to explicitly account for the dynamics of floristic composition as response to environmental variables. This, in turn, allows quantifying climate change impacts on grasslands growth and composition and evaluating alternative strategies to improve adaptation in the mid-term. As a case study, we focused on mountain areas in the northern Apennines (Italy), where temporary alfalfa (Medicago sativa L.)-dominated grasslands are sown for the production of Parmesan cheese. Five sites and four alternative climate scenarios (RCP4.5 and RCP8.5 projections as provided by the HadGEM2 and GISS general circulation models) were considered, to explore a wide range of agro-environmental conditions. Results showed that the observed dynamics of floristic composition and biomass accumulation were successfully simulated, with a mean absolute error lower than 10% for floristic composition and less than 1 t ha−1 for total biomass. Climate change impacts were globally negative, with a clear decrease of forage production as compared to the baseline (from -3.6% to -14.3% according to the climate scenario). The biodiversity of the plant community also declined (12.5% average decrease in the inverse Simpson index) due to the increase in alfalfa dominance. The latter, however, led to preserve the forage crude protein content (+0.9% on average). Guidelines for optimizing grassland productivity and forage protein under future climate were defined, mainly focused on reducing the alfalfa field duration, sowing grass-legume mixtures, and delaying the last cut of the season. These practices can be easily adopted under operational farming conditions to support the adaptation of temporary grasslands to climate change. According to our knowledge, this is one of the first study of climate change impact that uses a plant community model to explicitly considers phytocoenosis dynamics, biodiversity, and their effect on forage production (quantity and quality). Considering the role of grasslands as providers of key ecosystem services ‒ especially in marginal areas ‒ we believe that our modelling approach can support the identification of effective adaptation strategies to address future climate challenges.