Advisers to President Trump have discussed the possibility of giving Mayor Eric Adams of New York City a position in the administration as a way to clear the field in November’s mayoral election and damage the chances of the Democratic front-runner, Zohran Mamdani, according to three people with knowledge of the discussions.

The talks have also involved finding a possible place in the administration for the Republican candidate, Curtis Sliwa.

The goal, the people said, would be to give former Gov. Andrew M. Cuomo a better chance of defeating Mr. Mamdani in November’s general election.