The increasing number of distributed energy resources (DERs), advancing communication and computation technologies, and reliability concerns of the customers have caused an intense interest in the concept of microgrid. Although DERs are the biggest motivation of the microgrids due to their intermittent generation characteristics, they constitute a risk for system reliability. Battery storage systems (BSSs) stand as one of the most effective solutions for this reliability problem. However, the inappropriate use of BSS creates other operational problems in power systems. In order to deal with these concerns explicitly in microgrids, an optimized microgrid central controller (MGCC) is the key factor, which controls the realtime operation of a microgrid. This work proposes a model predictive control (MPC) based MGCC that will provide optimal control of the microgrid, considering economic and operational constraints. The proposed system will minimize the energy cost of the microgrid by utilizing mixed-integer linear programming (MILP) assuming the presence of DERs and BSS as well as the bi-directional grid connection. Moreover, the aging effect of BSS will be considered in the proposed optimization problem which will provide an up-to-date system model. The proposed method is evaluated using real load and photovoltaic (PV) generation data.