Microgrids can integrate variable renewable energy sources into the energy system by controlling flexible assets locally. However, as the energy system is dynamic, an effective microgrid controller must be able to receive feedback from the system in real-time, plan ahead and take into account the active electricity tariff, to maximize the benefits to the operator. These requirements motivate the use of optimization-based control methods, such as Model Predictive Control to optimally dispatch flexible assets in microgrids. However, the major bottleneck to achieve maximum benefits with these methods is their predictive accuracy. This paper addresses this bottleneck by developing a novel multi-step forecasting method for a Model Predictive Control framework. The presented methods are applied to a real test-bed of a renewable energy community in Austria, where its operational costs and CO2 emissions are benchmarked with those of a rule-based control strategy for Flat, Time-of-Use, Demand Charge and variable energy price tariffs. In addition, the impact of forecast errors and electric battery capacity on energy community operational savings are examined. The key results indicate that the proposed controller can outperform a rule-based dispatch strategy by 24.7% in operational costs and by 8.4% in CO2 emissions through optimal operation of flexibilities if it has perfect foresight. However, if the controller is deployed in a realistic environment, where forecasts for electrical load and PV generation are required, the same savings are reduced to 3.3% for cost and 7.3% for CO2, respectively. In such environments, the proposed controller performs best in highly dynamic tariffs such as Time-of-Use and Real-time pricing rates, achieving real cost savings of up to 6.3%. These results show that the profitability of optimization-based control of microgrids is threatened by forecast errors. This motivates future research on control strategies that compensate for forecast errors in real-world operation and more accurate forecasting methods.