Multi-energy systems (MESs) are designed to convert, store, and distribute energy to diverse end-users, including those in the industrial, commercial, residential, and agricultural sectors. This study proposes an integrated optimal planning optimization model for the techno-economic assessment of an MES integrated with power-to-gas (P2G) to meet electricity, heating, and cooling requirements while enabling sustainable energy solutions. The goal of the system optimal planning is to appropriately size the MES components to minimize the total planning costs. This includes not only the investment and operation costs but also the emissions cost and the cost of energy not supplied (ENS). The study implements P2G, electricity demand response (E-DRP), and thermal demand response (T-DRP), with four distinct operational scenarios considered for optimal planning, to evaluate the benefits of adopting MESs. A comprehensive validation study is presented based on a case study farm in Nigeria, with an MES investment model developed to assess feasibility. The results show that the integration of P2G with E-DRP and T-DRP gives the best operational scenario and planning cost for this farming application integration, leading to potential savings of up to USD 2.77 million annually from the proposed MES adoption.