Simultaneous operation of different energy generation and transmission infrastructures is a subject introduced as the concept of energy hub. This subject is highly regarded in microgrids. Integrating different energy sources under the concept of energy hub can improve the system performance as well as its reliability. The present paper is focused on the concept of hydrogen-based micro energy hub (SMEH) with regard to the integrated demand response (IDR) and hydrogen storage system (HSS). The SMEH studied in the present paper consists of different energy sources including the CHP, boiler, wind turbines, electrical energy storage system (ESS), gas storage system (GSS), thermal storage system (TSS), and hydrogen storage system (HSS). Demand response (DR) is introduced for controlling the consumers' heat demand and electrical pattern. Furthermore, the HSS not only can convert the power from renewable energy sources (RESs) into hydrogen (P2H) in the low power price periods, but also can, in turn, supply the hydrogen industry (H2P). The proposed model aims to minimize the energy cost of the whole hydrogen-based system considering the uncertainty of the power price. This optimization is performed by the harmony search (HS) optimization algorithm, which has been improved and developed by means of the local search algorithm. Eventually, the simulation and numerical results confirm the effectiveness of the proposed model.