The nature of multi-energy systems requires the integration of interdisciplinary methodologies and complementary tools in a coherent and systematic manner. Therefore, it is imperative to develop an efficient experimental environment to effectively implement the interaction between different tools for structural and parametric optimization (synthesis) of multi-energy systems and analysis of their operation. Due to the inherent complexity of the energy system optimization model, solving the synthesis problem often leads to significant challenges in terms of required computational resources and runtime. Known synthesis approaches do not fully address these challenges. In this context, we propose a subject-oriented environment for the multi-energy system synthesis in a reasonable time considering the available computational resources. The basis of the environment is a service-oriented application. The modeling and optimization of the studied systems is performed by means of scientific workflows. The execution of the specialized tools for modeling and optimization is done through web services. The pre-selection of these tools, depending on the level of model detail of the systems under study, and the data validation are performed on the specially developed testbeds. Such testbeds are constructed as system workflows. This is one of the distinguishing features of our approach. The application of the proposed environment is demonstrated through a case study on the synthesis of a microgrid (a special case of a multi-energy system). As a result of the study, an optimal microgrid configuration was proposed. It is based on the cogeneration of heat and electricity generation using natural gas.