Issue when apply MPC and dirichletbc together

Thanks. Can I use dolfinx_MPC to apply MPC and assemble matrices? Then, once the Jacobian matrices and residual are obtained, then manually apply the Dirichlet conditions. Is it feasible?