According to the necessity of cost‐effectiveness, improving efficiency, and decreasing emissions to supply the various demands, the concept of energy hubs (EHs) has emerged in recent years. This paper aims to ensure the optimal operation of an EH to meet electrical, thermal, and hydrogen demands, considering the issues of pollutant emission and operating costs. In the proposed structure for the EH, an solid oxid fuel cell (SOFC) converter with ammonia fuel is used, and thus a combined hydrogen, heat, and power (CHHP) system is formed. Moreover, a basic EH structure is also examined and compared to show the capability of the presented structure. The proposed economic‐environmental framework for the operation of the EH is multi‐objective as a stochastic mixed‐integer linear programming (MILP). Also, in addition to modelling the uncertainty of renewable sources production as stochastic scenarios, demand response programs (DRPs) have been implemented for electrical and thermal demands. The ε‐constraint method is used to solve the multi‐objective problem, and the fuzzy technique is applied to select the best solution among the Pareto solutions. The simulation results of the proposed EH compared to the basic EH show that the operation cost and emission are decreased by 15.14% and 5.9%, respectively, in the presence of ammonia and DRP.