McDonald has made 24 appearances for St Johnstone this season after the former Kilmarnock and Aberdeen midfielder joined from Morecambe last summer.
Former Bradford youngster Brown also pitched up at McDiarmid Park last summer and the 19-year-old has made three first-team appearances to date.
Saints boss Tommy Wright is happy to have secured the futures of McDonald and Brown, and will now look to do the same with other members of his squad.
"Gary has been excellent since coming to the club and Scott is a younger player that has already featured and has a good, long-term future at club," Wright told the club's official website.
"It's important to tie down our talented younger players.
"I'm delighted that Gary has agreed to stay and we are currently working hard to re-sign as many of the squad as we can.
"That's a process that can take a little bit of time but fans can be assured that we're being proactive in that area."