McCain met with Gilani at his home in Islamabad Saturday, Pakistan's The Nation reported.
Relations between Pakistan and the United States have been strained and worsened after U.S. Navy SEALs killed Osama bin Laden in Pakistan in May without notifying Pakistani officials.
"Pakistan is a main ally of the United States in [the] war on terror so it should restore the old traveling system in mutual cooperation," said McCain, R-Ariz.
Gilani said Pakistan wants to improve its relationship with the United States, but wants the United States to expand the partnership to include all areas of bilateral relations, including economic opportunities and energy.
Gilani said he would welcome a visit by Secretary of State Hillary Clinton.
McCain, in a report by the government-supported Associated Press of Pakistan, said the United States considered Pakistan an important country and it wouldn't be in the best interests of Washington to abandon it.