Aware of the limitations of current port systems for traffic management and the problems pointing towards vessel safety, Siport21 has developed SafePort, which is the first tool that provides a decision platform to manage vessels operations based on machine learning & artificial intelligence algorithms that enables Port Authorities and Terminal Operators to have real-time information and prediction of reliable and accurate 48-hour forecast of ship operating conditions. The platform integrates data from various sources (servers, storage and communication systems) and functionalities such as complex simulations widely used in the Internet of Things (IoT) field to provide a virtual reality environment aimed at analysing both access to the terminal and the operations carried out in it. SafePort builds up a significant step towards a Digital Twin of the port facility regarding nautical operations, to be integrated in global Management Systems. In order to analyse the safety of the operations, the tool integrates environmental information (waves, current/tide, ocean-meteorological forecast, wind), ship stopover planning (terminal, ships, loading/unloading, equipment) and technical predictions based on execution of navigation, manoeuvring and moored ship simulations. The outcome obtained from these simulations are multiple potential scenarios, which allow to manage and respond to emergency situations, detecting them in advance through a preanalysis of a great variety of scenarios, which in turn allow to establish contingency and response plans to emergency situations that provide preventive or corrective measures to avert such situations from occurring. It will allow a substantial improvement in port services, since they will be able to plan and carry out their activity in a safer, more efficient and sustainable way, thereby ensuring the future competitiveness of ports.