We investigate the influence of the barrier thickness of Co$_{40}$Fe$_{40}$B$_{20}$ based magnetic tunnel junctions on the laser-induced tunnel magneto-Seebeck effect. Varying the barrier thickness from 1nm to 3nm, we find a distinct maximum in the tunnel magneto-Seebeck effect for 2.6nm barrier thickness. This maximum is independently measured for two barrier materials, namely MgAl$_2$O$_4$ and MgO. Additionally, samples with an MgAl$_2$O$_4$ barrier exhibit a high thermovoltage of more than 350$mu$V in comparison to 90$mu$V for the MTJs with MgO barrier when heated with the maximum laser power of 150mW. Our results allow for the fabrication of improved stacks when dealing with temperature differences across magnetic tunnel junctions for future applications in spin caloritronics, the emerging research field that combines spintronics and themoelectrics.