In a new memoir, Sen. John McCain, R-Ariz., offers a harsh assessment of President Donald Trump’s leadership, asserting that his “reality show facsimile of toughness” seems to matter more to him than the nation’s values.

In the book, McCain, who is battling brain cancer and says he feels freer to speak out because he isn’t seeking re-election, writes that he has sometimes heatedly disagreed with all six of the presidents who have held office during his 36 years on Capitol Hill.

McCain takes particular aim at Trump, a real estate developer and former reality TV star, writing that he “has declined to distinguish the actions of our government from the crimes of despotic ones.”

“The appearance of toughness, or a reality show facsimile of toughness, seems to matter more than any of our values,” McCain says.

The assessment is included in excerpts of McCain’s forthcoming book, “The Restless Wave,” published on Monday by Apple News.

The book, co-written by Mark Slater, McCain’s longtime aide and writing collaborator, is slated for publication on May 22.

In the excerpts published Monday, McCain laments the decline of civility and bipartisanship in Washington, writing that “whether we think each other right or wrong on the issues of the day, we owe each other respect.”

The book’s publication comes as McCain faces an uncertain future.

In July, doctors diagnosed the six-term senator and former Republican presidential nominee with glioblastoma, an aggressive form of brain cancer that took the lives of Sen. Edward M. Kennedy, D-Mass., and Beau Biden, son of former Vice President Joe Biden.

McCain, 81, returned to Congress and maintained a relatively regular congressional schedule through the fall as he underwent chemotherapy and radiation treatments. By December, however, he had returned to Arizona to continue his treatments and go to physical rehabilitation.

Last week, he was discharged from the hospital after spending more than a week there for surgery related to an intestinal infection.

And over the weekend, Ben Domenech, a writer who recently married McCain’s daughter Meghan, tweeted that “John hugged me tonight. He asked me to take care of Meghan. I said I would.” The tweet has since been deleted.

In his forthcoming book, McCain calls himself “a champion of compromise in the governance of a country of 325 million opinionated, quarrelsome, vociferous souls.”

“There is no other way to govern an open society, or more precisely, to govern it effectively,” the senator writes.

He proceeds to offer some “unsolicited advice” to voters.

“If a candidate for Congress pledges to ride his white horse to Washington and lay waste to all the scoundrels living off your taxes, to never work or socialize or compromise with any of them, and then somehow get them to bow to your will and the superiority of your ideas, don’t vote for that guy,” McCain writes. “It sounds exciting, but it’s an empty boast and a commitment to more gridlock.”