As Politico reported, Dr. Lee was invited to Capitol Hill last month to meet with about a dozen members of Congress to discuss the matter. But all but one of the lawmakers she briefed are Democrats. While some Republicans have raised concerns, they do so mostly in private. Others scoff at the question, dismissing it as outrageous character assassination.

Few questions irritate White House aides more than inquiries about the president’s mental well-being, and they argue that Mr. Trump’s opponents are trying to use those questions to achieve what they could not at the ballot box.

“This shouldn’t be dignified with a response,” said Kellyanne Conway, the White House counselor.

“The partisans on Capitol Hill consulting with psychologists should reorient their spare time: support the president’s positive agenda of middle class tax cuts, rebuilding infrastructure and the military, investing in our work force,” Ms. Conway said later in an email. “The never-ending attempt to nullify an election is tiresome; if they were truly ‘worried about the country,’ they’d get to work to help it.”

Thomas J. Barrack, a friend of Mr. Trump’s, was quoted in Michael Wolff’s new book, “Fire and Fury: Inside the Trump White House,” as telling a friend that the president was “not only crazy but stupid.” In interviews, Mr. Barrack denied that and insisted that many people miss Mr. Trump’s actual brilliance.

“Potus has learned over time that Socratic testing and a lack of predictability is a worthy weapon in both negotiations and in keeping his team well honed, unentitled and on alert,” he said, using the initials for president of the United States. “He has no truck with political correctness, self-promotion or personal hubris of his team. This may cause him to appear at times to be overly realistic, blunt or to be politically insensitive even to his own subordinates. However, that is not the case.”

Still, in private, advisers to the president have at times expressed concerns. In private conversations over the last year, people who were new to Mr. Trump in the White House, which was most of the West Wing staff, have tried to process the president’s speaking style, his temper, his disinterest in formal briefings, his obsession with physical appearances and his concern about the theatrics and excitement of his job.

In conversations with friends, Jared Kushner, the president’s son-in-law and senior adviser, has said Mr. Trump is “crazy but he’s a genius.” Other advisers speak about the president as a volatile personality who has to be managed carefully. While Mr. Wolff’s book generated enormous attention, news accounts over the past year have reported the president’s mood swings and unpredictable behavior.