The defender, who was part of the squad that secured promotion through the League Two playoffs last season, joined the club from Preston North End in 2012.
The 22-year-old Northern Ireland international told the club's website: "I'm delighted to sign on again here. It was a hard one to get done because I was obviously away with Northern Ireland in South America, and I've been away on holiday the past couple of weeks. I'm really happy to get it done now though.
"We've got an unbelievable set of lads here and a great manager, so it was a no-brainer for me to sign on again. Last season couldn't have gone any better really, and the situation I was in last pre-season is completely different to the one I'm in now.
"I'm going to have to get my head down now and work hard to make sure I'm in the team come the start of the campaign."
McLaughlin made 47 appearances for the club in all competitions last season.