The Church of St Mary on the Rock or St Mary's Collegiate Church, was a secular college of priests based on the seaward side of St Andrews Cathedral, St Andrews, just beyond the precinct walls. It is known by a variety of other names, such as St Mary of the Culdees, Kirkheugh and Church of St Mary of Kilrymont.
Although not founded as a collegiate church until the 1240s, Scotland's first, it represented a corporate continuation of the association of clergy known as the Culdees or Céli Dé, "vassals of God". The church lasted for several centuries, but did not long outlast the Scottish Reformation, and today little of the original structure has survived.
Wikipedia https://en.wikipedia.org/wiki/Church_of_St_Mary_on_the_Rock
Address 12 Shorehead, Saint Andrews KY16 9RG, United Kingdom
Coordinates 56°20'23.397" N -2°47'6.199" E