The shadow chancellor told the BBC Jeremy Corbyn had shown leadership by insisting the referendum result must be honoured and the UK should leave.
But he said Labour would not back a "kamikaze" exit which hurt the economy.
Some shadow ministers have suggested they would quit if forced to vote for kick-starting official EU exit talks.
Dozens of Labour MPs who support remaining in the EU could be willing to defy the leadership if it whips them into voting for Brexit in the event of a Commons vote which could take place in the coming weeks.
The government has said it will notify the EU of its decision to leave, beginning two years of talks about the terms of exit, by the end of March.
Whether Parliament is asked to approve the Article 50 decision hinges on a Supreme Court ruling, due on Tuesday, into whether MPs and peers are required to have their say.
The Labour leadership have been accused of "dithering" over their approach and are under pressure to clarify whether they will oppose the government's plan of leaving the single market and the customs union and restricting EU migration.
Mr McDonnell said the debate was polarised between those who wanted to overturn the referendum result and, on the other hand, those who backed a so-called hard Brexit and saw the UK's future outside the EU as a virtual tax haven.
Labour, he suggested, stood between these two poles and supported a negotiated settlement with the EU to protect jobs, wages and living standards.
"Jeremy Corbyn has taken a rather courageous position in that he recognises that you have to bring the country together at some stage and it will be over a traditional British compromise," he told the BBC's Andrew Marr show.
"Somewhere along the line there will be a sensible compromise and it will be Labour that is driving that compromise."
Asked whether Labour MPs would be whipped to support the Article 50 process, he said the opposition had made it clear all along the referendum vote must be honoured.
But he said Labour would seek to amend any government plans to guarantee the fullest scrutiny in Parliament and enable MPs from all parties to "influence the negotiations".
Speaking on Sky News, Mr Corbyn said he would "ask" Labour MPs to respect the result while asked explicitly whether Labour wanted to stay in the single market, shadow home secretary Diane Abbott told the BBC's Sunday Politics that "in terms of jobs and the economy, of course we should be".
Nick Clegg, the former Lib Dem leader who is now the party's Brexit spokesman, said Labour had suffered a "catastrophic loss of nerve" over Europe.
"This absolute lack of clarity from Labour on the biggest issue of our times - dithering helplessly in the middle of the road - is only going to make their fate even worse."
While he expected ministers to win any vote on Article 50, he told Andrew Marr he expected Theresa May to run into trouble if she "digs her heels in" in during the talks.
The Lib Dems are pushing for the deal negotiated by Mrs May to be put to a referendum, saying the government had no mandate to "yank" the UK out of the single market.
"Whether we like it or not the single market, the biggest destination of our goods and services, is a market place of rules," he added.
"So even if we are out of it, we will have to abide by those rules. Once I think that becomes clear, the British public will start having some doubts."
The Conservatives, which have promised Parliament a vote on the final deal, said Labour remained "hopelessly divided and confused".
"They can't agree over whether we should leave the single market and have said they will also find new ways of frustrating the process of leaving," said Tory MP Maria Caulfield.

Media playback is unsupported on your device
21 December 2014 Last updated at 18:39 GMT
Thieves broke into the family's home in Bangor just days after the burial of eight year old Chloe who suffered from a rare condition.
Christmas presents were also stolen when the robbers  gained entry to the house in the Sinclair Avenue area on Friday night.  BBC Newsline's Martin Cassidy reports.
Labour would back a "sensible British compromise" over Brexit, John McDonnell has said, amid calls for the party to clarify its position.
[NEXT_CONCEPT]
A young mother has appealed for the return of a laptop containing the last photographs of her terminally ill child.