José Mourinho has agreed to a two-year contract to return to Real Madrid, sources have told ESPN Brazil.