MacGillivray joined the Saddlers last summer from Harrogate Town and spent most of this season as back-up for first-choice stopper Richard O’Donnell, before starting the final two games of the campaign.
With O’Donnell’s future at the Banks’s Stadium uncertain, the 22-year-old could now become a strong contender for the number one jersey next season.
“I have been pleased with his development over the past 12 months,” said Walsall boss Dean Smith. “He works hard and has worked well under [goalkeeping coach] Neil Cutler.
“He’s been a steady performer for the reserves and I expect him to continue getting better.
“He was given his chance in the final two games of the season and now I want to see him competing to be first-choice between the posts.”
MacGillivray added: “This is a massive boost for me. I am delighted to get another year and hopefully I can stake my claims.
“The progress I have made since I have been at the club has been frightening, to be honest. Neil Cutler has worked wonders with me and put so much effort into my development in all aspects of my game.”
Meanwhile, attacking midfielder Levi Rowley has signed his first professional contract with the Saddlers.
The teenager has put pen to paper on a one-year deal with a further year’s option having impressed during his two-year scholarship.