We study an optimal boundary control problem for the two-dimensional stationary micropolar fluids system with variable density. We control the system by considering boundary controls, for the velocity vector and angular velocity of rotation of particles, on parts of the boundary of the ow domain. On
the remaining part of the boundary, we consider mixed boundary conditions for the vector velocity (Dirichlet and Navier conditions) and Dirichlet boundary conditions for the angular velocity. We analyze the existence of a weak solution obtaining the fluid density as a scalar function of the stream function. We prove the existence of an optimal solution and, by using the Lagrange multipliers theorem, we state first-order optimality conditions. We also derive, through a penalty method, some optimality conditions satisfied by the optimal controls.