We develop a framework for first-principles calculations of the transport properties of magnetic materials at finite temperatures within the coherent potential approximation. First, we calculate the grand potential by the tight-binding linearized muffin-tin orbital method and apply it to the Kubo formula to obtain the temperature dependence of the conductivities. Next, we demonstrate the computation for the magnetic moments M(T), longitudinal and transverse electrical conductivities, σxx(T), σxy(T), Seebeck coefficients Sxx(T), and anomalous Nernst coefficients Nxy(T) of Co2MnAl of both L21 and B2 structures. It is found that σxx(T) of L21 and B2 structures exhibit slow relaxation with temperature compared with most transition metal alloys, which reflects a transition of the system from a half-metallic to metallic system with increasing temperature. The σxy(T = 0) of the B2 structure is much smaller than that of the L21 structure, while σxx(T) of the B2 structure exhibits slower relaxation with temperature than the L21 structure. The Sxx(T) and Nxy(T) exhibit nonmonotonic variation in the low temperature region and the values above room temperature are in agreement with the experimental data.