“prayer to Saint Mary Magdalene”
I think you mean “prayer of”. You don’t pray to anyone but God.
You'll find it in Shakespeare AND in the King James' Bible.
We 'pray' -- that is, humbly ask -- those who are righteous and stand among the elders and martyrs offering the prayers (in the other sense) of the faithful, to add their prayers to ours and present them before the Throne of Grace.
A lawyer includes a "prayer for relief" on behalf of his client when he files a "pleading" with the court, but his client isn't praying to him in the worshipping sense, nor is he praying to the judge.
sure does not sound like it is to God
Prayers of intercession to saints are no different than you asking your still living friends and family to pray for you.