Hi Jean,
I see no obvious sign of such a marriage on ScotlandsPeople within 5 years either side of 1887. Have you any document that says they did marry? If they were definitely married, what leads you to 1887?
Have you any birth certificates for children from this couple? If so, the birth certificate(s) would normally give a date and place for the parents' marriage.
Go to the online IGI and input the subject's name as Mary Harkness, and the father's name Robert Harkness, the year as 1866 ± 5 years, and the region as British Isles. You will get only three results. One is for a Mary Ann, with the correct mother's first name. That has a very good chance of being "your" Mary Ann, even though the birth year does not match exactly for what is on her death certificate - that is not unusual.
http://www.familysearch.org/Eng/Search/ ... _form=true
If you are happy that is her, then you should return to ScotlandsPeople and purchase that birth certificate to find out the information given there that does not appear on the IGI.
All the best,
AndrewP