Technologies like bio-electrochemical systems (BESs) can play a significant role in simultaneously treating waste materials and energy recovery. In this research, three kinds of BESs, including single-chamber (SCMEC) and dual-chamber (DCMEC) microbial electrolysis cells and microbial fuel cells (MFC), have been examined as wastewater treatment pathways in urban areas. The mathematical modeling of the mentioned technologies is carried out, and the models are implemented using the Python programming language. The results show that the hydrogen production rate in SCMEC is less than in DCMEC because of hydrogenotrophic bacteria activities, which are reported as about 0.86 m3 and 0.56 m3 of H2 gas per m3 of wastewater, respectively. Also, the model analysis shows that applied potential and anode surface area directly affect hydrogen production rates SCMEC and DCMEC. The calculated electric energy output was 0.033 kWh per m3 of wastewater for the MFC. Two real case studies in Montreal have been considered to investigate the potential of using the mentioned systems on an urban scale. The first district, including residential buildings, has a total daily wastewater generation of 3,000 m3/day, and 75 m3/day is assumed for the second one with a smaller non-residential building project. The model is estimated that 141 kg and 230 kg of hydrogen can be generated via SMEC and DMEC, respectively, and through the second scenario, 2.5 kWh energy can be extracted from wastewater via MFC. In the next stages, the results shown by considering the recovered energy via BESs, WWTPs consume energy to treat the same amount of wastewater compared with BESs. Also, DCMEC and SCMEC have been compared with water electrolysis (WE) technologies for hydrogen production. So, the comparisons expose that for generating one kg of hydrogen gas, DMEC is more efficient than SMEC and WE. In addition, the feasibility of using the generated hydrogen and power via microbial systems as fuel in green cars has been investigated as a final step.