Using google you will find many open-source toolboxes for solving MPC related optimization problems, for instance ACADO, \muAO-MPC, Forces, ...
However, in order to receive detailed feedback, you should be more specific about what kind of MPC problem (linear or nonlinear, discrete or continuous time, ...) you want to solve and what the computational requirements are.