As U.S. Sen. John McCain recovers from recent brain cancer treatment and surgery, the Arizona Republican has finished a memoir and been receiving visitors at his Sedona ranch, including from one of his daughters.

Meghan McCain tweeted Friday that she was heading to her father’s side.

"Going home to Arizona to be with my family," she tweeted. "Thank you all again for your prayers, patience, understanding and compassion during this time. It means the world to me and my entire family."

Previous visitors included former Vice President Joe Biden last Sunday, and longtime friends U.S. Sen. Lindsey Graham and former U.S. Sen. Joseph Lieberman two weeks ago.

McCain, 81, had hoped to return to the Senate, where he's served for more than 30 years. He has been unable to do so after cancer treatment and surgery for an intestinal infection last month.

Despite that, he's finished work on a new book being released May 22, "The Restless Wave." And he continued to advocate for a return to the days when partisans could disagree without demonizing each other.

"I'd like to see us recover our sense that we're more alike than different," McCain said in audio excerpts from his book, NPR reported.

McCain was a Vietnamese prisoner of war who served nearly 30 years in the U.S. Navy. He has limited use of his arms due to torture as a POW.

The Senate's self-styled "maverick" has amplified his call for more civil politics since his diagnosis of glioblastoma last July. It's the same rare and aggressive brain cancer that felled his friend, Democratic Sen. Edward Kennedy, at age 77 in 2009, and former Vice President Joe Biden's son Beau at 46 in 2015.

McCain “knows the odds” and even said he might not live to see his book published, in his excerpt reading on NPR.

“I don't know how much longer I'll be here. … I hate to leave it. But I don't have a complaint. Not one. It's been quite a ride,” McCain said. “I made a small place for myself in the story of America and the history of my times."

“I don't know how much longer I'll be here. … I hate to leave it. But I don't have a complaint. Not one. It's been quite a ride.” — U.S. Sen. John McCain, R-Ariz.

Meghan McCain remains hopeful.

“He’s made this really incredible comeback,” she told Politico in February. “I think it’s a very high likelihood he’ll come back to D.C. at some point.”

The Associated Press contributed to this report.