To achieve zero carbon emissions, increasing the scale of renewable energy implementation is imperative. Hydrogen is considered the prospective solution for sustainable energy due to its dual nature as a carbon-neutral fuel and an efficient storage medium for renewable energy sources. So, in this work, a standalone new hybrid energy system powered by solar energy for yearly power and freshwater production for building demand in New Borg El-Arab, Egypt. The system comprises photovoltaic (PV) panels, a water electrolyzer, multi-effect mechanical vapor compression desalination (MED-MVC), and fuel cells with hydrogen storage. A complete mathematical system model is built and solved by MATLAB/Simulink to study the daily, monthly, and yearly performance and sizing of the different system components based on the location climate conditions. The results indicate that PV panels of an area of 1824 m2, in conjunction with an electrolyzer, 863 fuel cells, and a storage tank capacity of 3013.4 m3can satisfy the annual building requirements of 255.17 MWh electricity, 766.5 m3 hot water and 876 m3 cold water. The maximum hydrogen storage lies between September and October, with maximum consumption between February and March. The average annual efficiency of PV, electrolyzer, fuel cell, electrolyzer output, fuel cell output, and overall hybrid system is 20.7%, 68.2%, 34.6%, 13.4%, 4.4%, and 16.5%, respectively, and the performance ratio (PR) of MED-MVC is 2.61. The system proves its capability to supply the building with electrical and water requirements with a levelized cost of energy (LCOE) equal to 0.712 $/kWh. Additionally, This system shows the potential to include other activities in remote areas or islands besides its contribution to achieving SDGs 6, 7, and 13.