In this contribution, initial results of a research project on modelling and simulation as a service (MSaaS) within the context of optimal operation of distribution grids by exploiting flexibility are summarized. Based on a brief description of service-oriented architecture (SOA), definitions and key aspects of MSaaS as well as open conceptual and technical challenges are outlined. Some specific aspects and challenges are then related to a possible application: a service that predicts the flexibility that a power-to-heat system can offer is imple-mented as an instance of MSaaS. The calculations are based on the current state of the system and a model defined in the equation-based, object-oriented language Modelica, as well as historical data when available. Thereby, an accurate and reliable representation of the flexiblity becomes available that facilitates its use for system balancing, energy market participation and grid operations. This functionality is exposed through a representational state transfer (REST)-based service interface, designed to allow for the straightforward inte-gration with existing systems and other virtual resources. The service architecture and initial results of the implementation are described.