We present a study of the overdensity of X-ray-selected active galactic nuclei (AGN) in 33 galaxy clusters in the XMM-LSS field (The XMM-Newton Large Scale Structure Survey), up to redshift z = 1.05 and further divided into a lower (0.14 ≤ z ≤ 0.35) and a higher redshift (0.43 ≤ z ≤ 1.05) subsample. Previous studies have shown that the presence of X-ray-selected AGN in rich galaxy clusters is suppressed, since their number is significantly lower than what is expected from the high galaxy overdensities in the area. In the current study we have investigated the occurrence of X-ray-selected AGN in low (⟨ Lx,bol ⟩ = 2.7 × 1043 erg/s) and moderate (⟨ Lx,bol ⟩ = 2.4 × 1044 erg/s) X-ray luminosity galaxy clusters in an attempt to trace back the relation between high-density environments and nuclear activity. Owing to the wide contiguous XMM-LSS survey area, we were able to extend the study to the cluster outskirts. We therefore determined the projected overdensity of X-ray point-like sources around each cluster out to 6r500 radius, within δr500 = 1 annulus, with respect to the field expectations based on the X-ray source log N − log S of the XMM-LSS field. To provide robust statistical results we also conducted a consistent stacking analysis separately for the two z ranges. We investigated whether the observed X-ray overdensities are to be expected thanks to the obvious enhancement of galaxy numbers in the cluster environment by also estimating the corresponding optical galaxy overdensities, and we assessed the possible enhancement or suppression of AGN activity in clusters. We find a positive X-ray projected overdensity in both redshift ranges at the first radial bins, which however has the same amplitude as that of optical galaxies. Therefore, no suppression (or enhancement) of X-ray AGN activity with respect to the field is found, in sharp contrast to previous results based on rich galaxy clusters, implying that the mechanisms responsible for the suppression are not as effective in lower density environments. After a drop to roughly the background level between 2 and 3r500, the X-ray overdensity exhibits a rise at larger radii, significantly greater than the corresponding optical overdensity. The radial distance of this overdensity “bump”, corresponding to ~1.5−3 Mpc, depends on the richness of the clusters, as well as on the overall X-ray overdensity profile. Finally, using the redshift information, photometric or spectroscopic, of the optical counterparts, we derive the spatial overdensity profile of the clusters. We find that the agreement between X-ray and optical overdensities in the first radial bins is also suggested in the 3-dimensional analysis. However, we argue that the X-ray overdensity “bump” at larger radial distance is at least partially a result of flux boosting by gravitational lensing of background quasi-stellar objects, confirming previous results. For high-redshift clusters, the enhancement of X-ray AGN activity in their outskirts appears to be intrinsic. We argue that a spatial analysis is crucial for disentangling irrelevant phenomena affecting the projected analysis, but we are still not able to report statistically significant results on the spatial overdensity of AGN in clusters or their outskirts because we lack the necessary numbers.