When President Barack Obama visited David L. Cohen’s West Mount Airy home for a Democratic fundraiser in 2013, it was far from his first time being hosted by the longtime Philadelphia power broker.

“I have been here so much,” Obama said, “the only thing I haven’t done in this house is have [Passover] seder dinner.”

Cohen, who announced Thursday that he would step back from his operational roles as an executive vice president of Comcast, has also feted the likes of Hillary Clinton and Joe Biden. On the day Biden announced his 2020 presidential campaign this year, he dashed to Cohen’s house for a fundraiser.

In the years since Cohen gained prominence as then-Philadelphia Mayor Ed Rendell’s right-hand man in the 1990s, he has soared to the heights of business and become one of the most influential lobbyists in America. He’s risen from a City Hall local operator to an undisputed player in Pennsylvania and national politics, helping Democrats win the White House and also raising money for Republicans when it aligned with Comcast’s interests.

But as Cohen became a force outside Philadelphia, he appeared to lose some of his magic touch in his own backyard. That may have more to do with the leftward movement in city politics than any diminution of his abilities.

Cohen recently said Philadelphia has “one of the most anti-business city governments in America” in a scathing interview with 6ABC. Cohen also doesn’t have as strong relationship with Mayor Jim Kenney as he had with previous mayors, according to sources.

Led by Cohen, the Greater Philadelphia Chamber of Commerce sued the city over a law supported by the Kenney administration that aims to close the gender pay gap. (The law was upheld in federal court, but the chamber has appealed the ruling.) And this fall, a political action committee controlled by the chamber failed with a last-minute text message blitz aimed at stopping Working Families Party candidate Kendra Brooks from scoring her historic win for local progressives in her campaign for City Council.

“In his time, he was a genius,” one Comcast source said. Referring to the slow shift in City Hall from the business-friendly Rendell days to the progressive politics that have gained steam in recent elections, the source added: “It’s a different era.”

The picture at the state and national level is far different. Since Cohen joined Comcast in 2002, it has transformed from a cable company into a media conglomerate. During that time, Cohen has overseen a dramatic expansion of its presence in Washington. Before 2002, the company had never spent more than $1 million on federal lobbying. By the time the company merged with NBCUniversal in 2011, its federal lobbying expenditures hit a peak of $19.3 million. Since then, the company has continued to spend more than $14 million a year lobbying Congress and federal agencies.

» READ MORE: David L. Cohen is quite influential without being a ‘lobbyist’

“There is, I’m pretty sure, no door that he could not open; I’m sure there is no one that would not appreciate the opportunity to talk to him,” said Blair Levin, a former chief of staff at the FCC. Levin said Cohen showed a diplomatic savvy that reflected his time working alongside Rendell as mayor and governor.

“Money alone can’t buy the kinds of things that David was really good at — the relationship side, the ability to understand where other people are coming from, to build alliances,” Levin said.

Much of Cohen’s influence comes from his ability to collect and direct money. Known as a shrewd tactician, he built alliances in both parties. Cohen and his wife were listed among the “bundlers” who helped raise the most money for Obama’s 2012 reelection campaign and Clinton’s 2016 campaign.

But Cohen also bucked his party and raised money for Pennsylvania Republicans like U.S. Sen. Pat Toomey and former Gov. Tom Corbett.

Stephen A. Cozen, a Cohen friend and the chairman of the Philadelphia law firm Cozen O’Connor, said Thursday that Cohen supported those Republican candidates “on the basis of what’s best for Comcast — what’s likely best for Comcast.”

“I’m not sure he can divorce himself totally from that,” Cozen said. “But I think, if he was given his druthers and not obliged to think in terms of what’s best for Comcast, he might have made different decisions.”

And in New York this weekend, where political insiders are gathering for the annual Pennsylvania Society retreat of cocktail parties and dinners, Cohen is scheduled to co-host a fundraiser for Toomey on Friday night — and also is expected to appear at a fundraiser Saturday afternoon for Biden.

Such is the dual political reality that Cohen lives.

In leaving his role at Comcast, Cohen didn’t say he was retreating from public or political life. In a brief statement, he even cited his desire to dedicate more time to “civic and charitable activities that I have.” And he’s still a go-to leader and fundraiser for major city events, like the Democratic National Convention at the Wells Fargo Center in 2016.

“As I look toward my 65th birthday next year, I recognized that I needed to focus on Comcast’s next 10 years — who was going to be by Brian [Roberts'] side as he continues to lead our company into the future — and on my own personal life, which has candidly taken a back seat to my professional life,” Cohen said in an email to staff. “So I’ve decided that it’s time for this transition.”

Cohen declined an interview request Thursday.

But a Comcast source said that while Cohen was not forced out, one factor in his departure is likely that he and CEO Roberts have been at odds in recent years over how to manage the company’s image in its hometown.

“It’s about how Comcast is perceived in Philadelphia,” the source said.

A Comcast spokesperson denied any rift between Cohen and Roberts and said there was no such concern about perception.

The business community suffered a setback in November when Brooks won an at-large Council seat. A friend said Cohen “had a hand” in the effort to defeat Brooks, which centered on branding her as an anti-business radical. Political insiders were puzzled by the chamber PAC’s strategy, which included the last-minute text message blitz aimed at boosting GOP candidates in order to stop her.

“That was crazy, ill-advised, and a waste of money,” the source said. “The fact that we were in such a position that we couldn’t do anything indicates it just wasn’t working.”

Some Democrats said it would be a mistake to pin all of that failure on Cohen.

Council races aside, Cohen has less sway with Kenney than he had with his predecessors.

“It’s not like the mayor is calling him on a regular basis before making big decisions,” an administration source said, adding that they have a working relationship but not a close one.

Rendell said Cohen’s opposition to progressive priorities like the gender pay equity bill is motivated by a desire to make Philadelphia more business-friendly. He said Cohen believes the city missed opportunities like recruiting Amazon’s second headquarters because of a hostile environment.

“Those are things that David strongly believes in,” Rendell said.

Rendell and other friends said they expected Cohen to spend more time on his other leadership roles with the chamber, the University of Pennsylvania’s board of trustees, and the effort to elect Biden.

“David is a doer," Cozen said. "He doesn’t sleep a lot of hours. He just does. And I can’t possibly see that changing.” He added that he’d received calls Thursday from people asking whether Cohen might run for office.

“He’s never said that to me. He’s never suggested that to me,” Cozen said. “I think David’s highest and best use is not on the throne, but sitting behind it. Hopefully he’ll continue to do that.”

-Staff writer Jonathan Tamari contributed to this article.