In this work we present a novel distributed MPC method for microgrid energy management based on distributed optimization. In order to cope with uncertainty in prices and renewable energy production, we adopt a robust min-max approach that optimizes at each time step the worst case scenario of the objective function. Combining the advantages of MPC and distributed optimization, the resulting algorithm is suitable for the control of large-scale microgrids in which renewable energy resources are employed. Moreover, since it is based on novel distributed optimization algorithms, the method allows the future power profiles to be computed for each microgrid component without sharing this information with the others. Simulation results for a DC microgrid system model show the effectiveness of the proposed method. The algorithm is tested in two different scenarios: in presence of uncertainties and considering perfect knowledge of the future price and power profiles.