SEN. ERIC LESSER of Longmeadow knows what’s going to happen this season on Veep, but he’s keeping it to himself.

Lesser has been working since 2011 as a consultant for the HBO political satire starring Julia Louis-Dreyfus as vice president turned train-wreck-in-chief. Even with a comedy, HBO wants to keep it real, and Lesser was hired to make sure the politics doesn’t veer too far from reality.

“My role is modest. Sometimes I read through scripts and see what is realistic, what’s too outlandish, and here’s how a staffer would respond in real-life,” Lesser explained, adding he is barred from talking about this season, the show’s seventh and final run, in which Louis-Dreyfus’s character is entering her second term as president.

People familiar with 34-year-old Lesser tend to know he’s involved with the show by this point. “People will joke, “oh are you gonna send this to Veep? I say ‘yeah, I’ll protect everyone’s identity, but yes, this will be inspiration for the show,”‘ he said.

Lesser began his involvement in politics as then-candidate Barack Obama’s ground logistics coordinator for the 2008 campaign, traveling to 47 states organizing events. After the election, David Axelrod tapped the young politico to serve as his special assistant, where he served from 2009 to 2011, sharing a wall with the Oval Office. While there, Lesser helped start the annual White House Seder, and saw the unfolding of the Affordable Care Act.

State Senator Eric Lesser points to a map of Obama campaign stops in 2008 as he explains his role advising Veep writers.

He left the White House to attend Harvard Law School. It was there, as he stood in line to register for classes, that he got a call from a friend who worked for HBO, asking him if he wanted to help with a new show called Veep.

“It’s a comedy about the vice presidency, she told me, and they’re looking for someone to help with accuracy,” Lesser said. “Like what would a bus tour look like? Where would they go? If there was a political flop or mishap, how would staff respond?”

That was the kind of experience he got to see day to day anyway. HBO has retained Lesser, along with Laura Bush’s former chief, Anita McBride; political scientist Norm Ornstein; Jeremy Bash, who was senior advisor to former secretary of defense Leon Panetta during the bin Laden raid; and others.

The characters on the show are what Lesser describes as an “amalgamation” of DC archetypes. In the early seasons, there’s Dan, a young man on the rise who becomes the vice president’s communications director; Jonah, a former political advisor who bites off more than he can chew; and, of course, Amy, the chief of staff who is a workaholic and can’t stand the dramedy around her.

Lesser believes his consulting gig aids him in his day job on Beacon Hill and representing his constituents in Western Mass. “It helps break down the artifice,” he said. “Comedy and humor helps build connections with people.”

Lesser’s work as a script consultant has been a lucrative side gig. Though it earned him between $10,000 and $20,000 last year during the show’s hiatus, in previous years he was paid between $60,000 to $100,000, according to his ethics disclosures.

Lesser had no previous experience with Hollywood. “The writers are talented. You tell them a small experience and they just spin it into an unbelievable episode,” he said.

So what exactly are his favorite Selena Meyer moments?

“There’s the election episode where Selena finds out she’s going to be president and was on the floor of the bathroom with Gary,” Lesser said, describing the season three episode where Meyer, then vice president, finds out POTUS has resigned, and she’s going to be the leader of the free world. Her bodyguard Gary becomes so excited his nose bleeds. But there’s no toilet paper left in the bathroom, so she rifles through a bag, offering him tampons before discovering tissues.

Lesser is excited for people to see season seven, especially with Louis-Dreyfus, whom he’s met several times, on the mend.

“This season, after what she went through, and the perseverance she showed — I just feel so blessed to be a small part of a project that she’s part of,” he said.