In this paper, we consider the steady MHD equations with inhomogeneous boundary conditions for the velocity and the tangential component of the magnetic field. Using a new construction of the magnetic lifting, we obtain existence of weak solutions under sharp assumption on boundary data for the magnetic field.