"The winds of change are now blowing, and they will not be confined to the Arab world," the senior Republican told reporters at the end of a three-day visit to the military-dominated nation.
"Governments that shun evolutionary reforms now will eventually face revolutionary change later."
McCain was in Myanmar to assess the new political landscape after the junta handed power to a nominally civilian but army-backed government in March following the country's first election in 20 years.
The November vote, won by the military's political proxies, was marred by widespread complaints of cheating and the exclusion of pro-democracy leader Aung San Suu Kyi, who was released from house arrest shortly afterwards.
McCain urged the government to ensure the safety of Suu Kyi, who said this week she hoped to soon conduct a political tour around the country that will be a key test of her freedom following her release.
"Aung San Suu Kyi's last attempt to travel freely was marred by violence, and the new government's ability and willingness to prevent a similar outcome this time will be an important test of their desire for change," McCain said.
In 2003 Suu Kyi's convoy was attacked in an ambush apparently organised by a regime frightened by her popularity.
She was arrested along with many party activists and placed under house arrest for a third time. The dissident has spent most of the past two decades in detention.
On Thursday McCain, who described Suu Kyi as "a personal hero", met the Nobel Peace Prize winner and pledged to support efforts to foster democracy.
His visit comes as President Barack Obama, who beat McCain in the 2008 White House race, pursues greater engagement with Myanmar.
McCain, who held talks with regime figures in the capital Naypyidaw on Wednesday, said it was "clear" that the new government wanted a better relationship with the United States.
But he said it was too soon to lift economic sanctions, calling for the release of the country's more than 2,000 political prisoners.
Foreign Minister Wunna Maung Lwin, however, told McCain there are no political prisoners in Myanmar, according to state media.
"Those serving their prison terms in Myanmar's jails are just law offenders," he was quoted as saying in the New Light of Myanmar newspaper.
McCain also urged Myanmar to "cease any military cooperation with the government of North Korea."
US diplomatic memos released last year by the website WikiLeaks said Washington has suspected for years that Myanmar ran a secret nuclear programme supported by Pyongyang.
According to the New Light, Vice President Tin Aung Myint Oo told McCain that Myanmar "does not have enough economic strength" to develop atomic arms and has halted a peaceful nuclear research programme supported by Russia as the international community "may misunderstand."
Copyright AFP (Agence France-Presse), 2011