The 22-year-old is yet to make a senior appearance for the Red Devils but has impressed at Under-23 level.
O'Hara has also been in the Republic of Ireland senior squad and has picked up experience working with the first team at Old Trafford.
"Obviously, it's going to be difficult for a club coming up from the National League to League Two but they seem to have made a promising start and had a great result against Bradford in the first round of the Carabao Cup," O'Hara told the official United website. "It's exciting to see what happens in the draw for the next round as it could be a big club.
"Speaking to the chairman, they're going in the right direction and have all their players in place, so that they think they can get to where they want to be. So it's very exciting.
"I'm looking forward to it, getting started and hopefully playing in front of crowds, week in and week out. It's about showing everyone what I'm capable of. The people have seen here what I'm capable of and it's proving that on another stage, showing people and the staff at United that I can reach that level and beyond it."
O'Hara played five games at fourth-tier level while on loan to Morecambe in 2016-17.