Using density functional theory calculations we have examined the effects of cluster shape and a neutral O vacancy on the energetics and stability of Nb monomers and clusters on the MgO(001) surface. The relative stability of different monolayer structures is also examined. As found in other cases of metal adsorbates on MgO(001), our results indicate that an O site is the preferred adsorption site for a Nb atom. In addition, O-vacancy sites tend to increase the binding energy of small clusters and thus act as nucleation sites, while the effect of a nearby O vacancy on the binding energy of a Nb cluster is much weaker. In particular, we find that the binding energy for a Nb monomer at an O site (O-vacancy site) is 1.5 eV (2.2 eV) while the corresponding activation barriers for Nb monomer diffusion are 0.58 eV (0.80 eV). We also find that, in the absence of O vacancies, the preferred planar structure for tetramers and pentamers is an isotropic (100)-like structure. In contrast, the presence of an O vacancy transforms the isotropic tetramer into an anisotropic (110)-like structure. In addition, due to strain effects as well as strong Nb-Nb interactions, for large clusters (e.g. a complete monolayer) the anisotropic (110) structure is favored over the (100) structure. These results appear to explain recent experimental observations for the dependence of thin-film orientation on deposition conditions. However, we also find that for small (100)-like and (110)-like clusters, three-dimensional (rather than planar) structures are energetically preferred due to the strong Nb-Nb interaction. These results suggest that the pathway to form a coherent (100) or (110) structure during the growth of Nb films on Mg(001) may be relatively complex.