The optimal operation of a solid oxide fuel cell stack is addressed in this paper. Real-time optimization, performed at a slow time scale via constraint adaptation, is used to account for uncertainty and degradation eﬀects, while model-predictive control is performed at a faster time scale to reject process disturbances and to safely adapt the system to the specified output constraints following changes in cell power demand. To ensure that these constraints are strictly honored, a novel adaptation algorithm that uses the built-in constraint handling of quadratic programming is implemented within the model-predictive controller. An additional feature of this algorithm - its ability to adapt the feasibility region in view of uncertainty - is shown as well. Simulation results illustrate the efficacy of this approach in the solid oxide fuel cell system.