But the claim was dismissed by opponents who insist Labour will “sell the union down the river” to win power.
A snap election is expected this Autumn and there had been a mounting prospect of a pact between the two parties after McDonnell himself recently said Labour would not block referendum if the Scots people wanted it.
The Scottish Government is currently passing laws at Holyrood to pave the way for a referendum next year in response to the Brexit chaos.
But Mr McDonnell said warned yesterday: “There’s no deal.”
The Shadow Chancellor said he was setting out his opinion when he told an Edinburgh festival audience last month Labour at Westminster would not block another referendum if Scots voted for it.
“That was my view as I expressed it,” he told the BBC’s Andrew Marr Show.
“That’s not doing a deal - that’s just my position. We’re not doing any deals with anyone. When we get into the next election I believe we will have a majority. When we get into the next election I believe we will have a majority.
“But if we’re a minority, we will have a minority government, we will not do coalitions - we’ve said no deals whatsoever.”
The Scottish Government needs a transfer of power from Westminster - which controls the constitution - to hold a repeat of the 2014 vote on independence.
But he added: “I don’t think there should be another referendum. I think Scotland should stay united within the UK. It would not be a priority for us.
“It may be for some folk, but we’ve got to deal with climate change and austerity etc...
“It certainly wouldn’t be in the early years of a Labour Government. And there would have to be a proper mandate in Scotland - the Scottish people would have to decide.”
The pro-independence SNP and Greens majority at the Scottish Parliament has already passed motion calling for an independence referendum to be staged to provide Scots with an alternative to the chaos of Brexit.
However, senior Scottish Labour figures in Scotland say the mandate secured by both parties in the 2016 Holyrood did not explicitly set out demands for a second referendum, after Scots had been told the 2014 vote was a “once in a generation” event.
This could hint that it would take a clear majority for pro-independence parties would be required in the 2021 Scottish Parliament elections.
But the Conservatives in Scotland warned Labour would do a deal
“One of the very few consistencies of the Labour party is its quest for the keys to Number 10,” a Tory spokesman said.
“Labour has repeatedly demonstrated it will happily trade the union down the river for the chance of entering Downing Street.
“The Scottish Conservative party is the only party that can stop the SNP and stop Indyref2.”
Current polling suggests that Scotland is split down the middle on the issue of independence, with the most recent YouGov survey placing support remaining in the UK at 51%, while 49% backed remaining in the UK. The SNP is also poised for a sweeping victory in a snap election north of the border, possibly taking more than 50 of Scotland’s 59 seats.
Nicola Sturgeon has said she will seek a section 30 order, allowing the transfer from Westminster to the Scottish Parliament, to test the ground for a second referendum, but it has been ruled out by Boris Johnson.
SNP Deputy Westminster leader Kirsty Blackman said: “As the chaos at Westminster continues, it is increasingly unsustainable for dishonest Tory politicians, with no mandate in Scotland, to stand in the way of democracy.
“The people of Scotland must have the opportunity to determine their own future - and in any coming election stopping Brexit and ensuring Scotland has the right to choose a better future with independence will be right at the centre of the SNP campaign.”