The 26-year-old made 92 league appearances for Boro after joining from Wigan in January 2015.
The ex-Brentford man, who has featured 14 times this season, could make his debut against Millwall on Saturday.
"I was attracted by the history and the size of the club but I can see the project and what the club is trying to do now. There's a lot of excitement around the place and the crowds are phenomenal.
"I can feel the vibe about the place and I can't wait to get going."