X-ray fluorescence probe for detection of foreign material inclusions on the inner surface of superconducting cavities has been developed and tested. The setup detects trace element content such as a few micrograms of impurities responsible for thermal breakdown phenomena limiting the cavity performance. The setup has been customized for the geometry of 1.3 GHz TESLA-type niobium cavities and focuses on the surface of equator area at around 103 mm from the centre axis of the cavities with around 20 mm detection spot. More precise localization of inclusions can be reconstructed by means of angular or lateral displacement of the cavity. Preliminary tests confirmed a very low detection limit for elements laying in the high efficiency spectrum zone (from 5 to 10 keV), and a high angular resolution allowing an accurate localization of defects within the equator surface.