Sen. John McCain has a message for America: Wake up!

The Vietnam War hero and former Navy pilot issued the plea Monday night during a speech at the US Naval Academy — in which he urged people to “fight against propaganda and crackpot conspiracy theories.”

“We are asleep in our echo chambers, where our views are always affirmed and information that contradicts them is always fake,” McCain said. “We are asleep in our polarized politics, which exaggerates our differences, looks for scapegoats instead of answers, and insists we get all our way all the time from a system of government based on compromise, principled cooperation and restraint. It’s time to wake up.”

Speaking to a group of midshipmen, McCain appeared to take several veiled shots at President Trump — even going so far as to blast his inaugural “America First” message while giving an analogy between isolationism and the rise of fascism following World War I.

His comments about conspiracy theories and propaganda also appeared to be a dig at the commander-in-chief and his supporters, who have coined the term “fake news” and regularly questioned the validity of articles and events reported by left-leaning media outlets such as MSNBC and CNN.

“We have to fight against propaganda and crackpot conspiracy theories,” McCain said.

The 81-year-old went on to talk about some of today’s biggest news stories, including the investigation of Russia’s involvement in the 2016 presidential election and Monday’s indictment of former Trump campaign manager Paul Manafort and his aide Rick Gates.

“I’ve seen these scandals before, and it’s a centipede,” McCain said. “Every few days another shoe drops, and so the latest news today of these indictments, I could have predicted these months ago.”

The Arizona lawmaker also echoed the comments he made two weeks ago in Philadelphia — when he warned about the problems with nationalism and being too selfish as a nation.

“We have to fight isolationism, protectionism, and nativism,” McCain explained. “We have to defeat those who would worsen our divisions … We have to remind our sons and daughters that we became the most powerful nation on Earth by tearing down walls, not building them.”

Giving his World War I analogy, McCain said: “The American example and American leadership are indispensable to securing a peaceful and prosperous future … Our failure to remain engaged in Europe and enforce the hard-won peace of 1918 had made that clear … There could be no more isolationism, no more tired resignation — no more ‘America First.'”

In addition, McCain urged the midshipmen in attendance to become involved in cybersecurity and other related fields following Russia’s reported use of social media in the months leading up to the election.

“I’m very worried about the erosion of confidence of the American people in the election system, because if we lose confidence in the results of our elections — that we don’t believe them — that attacks the very fundamentals of what America was all about and was founded on,” he said. “We have to make sure that we get into this business of cyberwarfare.”

McCain’s visit to Annapolis comes just days after the 50th anniversary of his plane being shot down in Vietnam and his ensuing 5½ years in a POW camp.

The former midshipman recalled arriving at the Naval Academy when he was just 18 years old.

“I wanted to be a fighter pilot. I wanted to shoot down airplanes,” McCain said. “I didn’t give a s–t what else I wanted to be.”

With Post wires