An optical sensor for uranyl has been prepared based on a gold-plated D-shaped plastic optical fiber (POF) combined with a receptor consisting of a bifunctional synthetic molecule, 11-mercaptoundecylphosphonic acid (MUPA), with a phosphonic group for complexing the considered ion, and a sulfide moiety through which the molecule is fixed at the gold resonant surface as a molecular layer in an easy and reproducible way. The sensor is characterized by evaluating the response in function of the uranyl concentration in aqueous solutions of different compositions and real-life samples, such as tap water and seawater. The mechanism of the uranyl/MUPA interaction was investigated. Two different kinds of interactions of uranyl with the MUPA layer on gold from water are observed: a strong one and a weak one. In the presence of competing metal ions as Ca2+ and Mg2+, only the strong interaction takes place, with a high affinity constant (around 107 M−1), while a somewhat lower constant (i.e., around 106 M−1) is obtained in the presence of Mg2+ which forms stronger complexes with MUPA than Ca2+. Due to the high affinity and the good selectivity of the recognition element MUPA, a detection limit of a few μg L−1 is reached directly in natural water samples without any time-consuming sample pretreatment, making it possible for rapid, in situ controls of uranyl by the proposed sensor.