The microgrid operation is addressed in this article based on a multicarrier energy hub. Natural gas, electricity, heating, cooling, hydrogen, carbon dioxide, and renewable energies are considered as the energy carriers. The designed microgrid optimizes and utilizes a wide range of resources at the same time including renewables, electrical storage, hybrid storage, heating-cooling storage, electric vehicles (EVs) charging station, power to gas unit, combined cooling-heating-power, and carbon capture-storage. The purpose is to reduce the environmental pollutions and operating costs. The resilience and flexibility of the energy hub is also improved. Vehicle to grid and fully-partial charge models are incorporated for EVs to improve the system resilience and supplying the critical loads following events. Different events are modeled to evaluate the system resilience. The model is expressed as a stochastic mixed integer linear programming problem. Both active and reactive powers are modeled. The microgrid is simulated under four different cases. The results show that the multitype energy storages reduce the annual cost of energy while the integrated charging station can decrease the load shedding.