We have investigated the stability of several magnetic configurations of Fe adatoms deposited on W(001) and W(110) surfaces. We used a tight binding model and the real-space recursion technique to investigate several cluster configurations such as dimers, chains and islands. We have determined the variation of the magnetic moments and of the magnetic order as a function of the interplanar Fe-W distance, considered here as a parameter. We show that there is a competition between the Fe-Fe direct interaction favoring parallel (P) moments, and the coupling via the W substrate favoring antiparallel (AP) moments. The AP solution on the (001) open surface and the P solution on the (110) closed surface are found to be the most stable states.