Former Rep. Anthony Weiner is laying the groundwork for a political comeback, possibly as a startling addition to this year’s mayoral race, sources said yesterday.

Political insiders were abuzz at news that Weiner and his wife, Huma Abedin, had granted a lengthy magazine interview for the first time since his resignation in an embarrassing sexting scandal in 2011.

“The magazine piece is step one of a two-step process for him to run citywide this year,” said one Democratic Party source.

“He’s looking at public advocate and comptroller, but he really thinks he can use this to get back in and run for mayor.”

Weiner issued a terse “no comment” when asked about his plans.

Weiner has $4.3 million left in his campaign account, including $248,710 that would be matched 6-to-1 under the public-financing system.

A second source said Weiner has been contacting former staffers to prepare for his re-entry into politics.

Weiner’s entry into the Democratic primary for mayor would make it more difficult for any of the five candidates now in the race to get at least 40 percent of the vote and avoid a runoff.