The 81-year-old politician was admitted to hospital in Maryland last week for treatment for the infection, and is also "responding positively" to ongoing treatment for brain cancer.
His office said the veteran would not return to Washington until January.
Mr McCain's daughter Meghan tweeted: "My father is doing well and we are all looking forward to spending Christmas together in Arizona."
He will undergo physical therapy and rehabilitation at the Mayo Clinic in Arizona.
In a statement, Dr Mark Gilbert, chief of neuro-oncology at the National Institutes of Health's National Cancer Institute, said the senator has "responded well" to treatment and "continues to improve".
He added: "An evaluation of his underlying cancer shows he is responding positively to ongoing treatment."
:: Devastating diagnosis: McCain's impact on US politics
Mr McCain, the 2008 Republican presidential nominee, was diagnosed with a brain tumour in July, after doctors found a blood clot over his left eye during a check-up.
Without him, the Republicans - who have a 52-48 majority in the Senate - would only be able to afford one defection for the tax bill to be passed.
No Democrats or independents support the legislation, although it is expected to comfortably pass the House of Representatives.
The bill, which would cut corporate and individual taxes, has been criticised for largely benefiting the wealthy.
President Donald Trump insisted Mr McCain would return to Washington if his vote was needed to secure the bill.
He said: "But the word is that John will come back if we need his vote. And it's too bad. He's going through a very tough time, there's no question about it.
"But he will come back if we need his vote."
A vote on the bill is expected in the House on Tuesday, and the Senate on Wednesday.
If approved, it would then go to the White House for Mr Trump's signature and would become his first major legislative accomplishment since taking office 11 months ago.