The 18-year-old has been offered a deal at Bootham Crescent until the end of the season following his release from Peterborough.
McDonald will not be eligible to play for the Minstermen until the New Year's Day home game against Morecambe after the January transfer window has opened.
York boss Nigel Worthington told the club's official website: "During a conversation with Barry Fry, Barry recommended this young player to me and told me that he was worth a close look.
"We had him in for a few days in the week prior to Christmas. He showed good pace, touch and awareness and I'm pleased to get him on board."
McDonald left Peterborough in controversial circumstances in November when he was released by mutual consent, seven months after signing a four-year deal. Posh have since refused to comment further on the matter.