WASHINGTON, May 25 (Reuters) - U.S. President Joe Biden and top congressional Republican Kevin McCarthy are closing in on a deal that would raise the government's $31.4 trillion debt ceiling for two years while capping spending on most items, a U.S. official told Reuters.