McDonald was selected unopposed as the SNP candidate for the Glasgow South constituency in October 2014. At the 2015 UK general election, he was elected with 54.9% of the vote, defeating the Labour incumbent Tom Harris during an SNP landslide across Scotland. His total represented the largest number of actual SNP votes in the city, and the largest majority.
