We investigate the transport properties of magnetic Josephson junctions. In order to capture realistic material band structure effects, we develop a numerical method combining density functional theory and Bogoliubov-de Gennes model. We demonstrate the capabilities of this method by studying Nb/Ni/Nb junctions in the clean limit. The supercurrent through the junctions is calculated as a function of the ferromagnetic Ni thickness, magnetization, and crystal orientation. We identify two generic mechanisms for the supercurrent decay with ferromagnet thickness: (i) large exchange splitting may gap out minority or majority carriers leading to the suppression of Andreev reflection in the junction, (ii) loss of synchronization between different modes due to the significant dispersion of the quasiparticle velocity with the transverse momentum. Our results are in good agreement with recent experimental studies of Nb/Ni/Nb junctions. The present approach opens a path for material composition optimization in magnetic Josephson junctions and superconducting magnetic spin valves.