Luke Kirby bears an uncanny resemblance to Lenny Bruce, the controversial, groundbreaking comedian he plays on “The Marvelous Mrs. Maisel.”

The Canadian-born Kirby didn’t campaign for the role, but was familiar with Bruce’s work when he was tapped, in his words, to be “kind of like a fairy godmother” to aspiring standup comedienne Miriam “Midge” Maisel (Emmy winning series star Rachel Brosnahan) in 1959 New York City.

“There was a copy of [Bruce’s autobiography] ‘How to Talk Dirty and Influence People’ in my grandparents’ attic, which must have belonged to my Uncle Peter,” says Kirby, 40. “So I knew that and I knew [the 1974 Bruce biopic] ‘Lenny.’ And when I was 16 I saw a Nat Hentoff interview on the CBC that [Bruce] did near the end [of his life] and I thought, ‘Maybe I could play Lenny Bruce.’ Time went on and it never happened, then when you least expect it . . .”

Kirby’s Lenny Bruce has appeared intermittently in both seasons of “Mrs. Maisel,” bantering with and counseling Midge and performing snippets of his legendary standup routines through the cigarette-smoke-fog of Manhattan nightclubs.

(Bruce died from a drug overdose in August 1966 at the age of 40.)

To prepare for his role, Kirby memorized Bruce’s routines word-for-word; in Season 2, he performs the famous “glue-sniffing” routine Bruce did on “The Steve Allen Show” in 1959 (one of the comic’s rare TV appearances). “I auditioned [for “Mrs. Maisel”] with the airplane glue bit, so I had a reference for it,” says Kirby, alluding to archival footage of Bruce’s appearance with Steve Allen. “There’s not a lot of visual on Bruce, with him actually moving, so [the footage] was good for mirroring him and seeing his physicality. He couldn’t hook into the television scene. He tried to do a kind of topical pilot where he just reviewed jazz records and talked about the news — that didn’t work — and he did that one episode (also in 1959) of ‘Playboy’s Penthouse’ with Hugh Hefner which is really uncomfortable and strange, but kind of amazing to watch.

“It’s exhausting trying to replicate it,” he says of Bruce’s onstage riffing. “Honestly, it’s a high thrill to get to do it. He’s so frenetic [with his] rhythm — he’ll jump around and sometimes they don’t catch that in the [routines’] transcripts and I’ll try to get all the little deviations in there.”

Kirby also references “The Almost Unpublished Lenny Bruce: From the Private Collection of Kitty Bruce,” by Bruce’s daughter, Kitty Bruce. “That’s just great . . . it’s so full of photos and good for osmosis,” he says. “I think there are some really special little reveals in Bruce’s own book; I think he’s telling us more about himself than we really know, so my biggest talisman are his words. I figured I needed all the help I can get and as it turns out Lenny Bruce was the most help. I think the best thing to do is get out of the way and let him do the talking.”

Kirby says his biggest concern in accepting the role was how Kitty Bruce would react.

“I figured I was in the firing line with anybody who’s a fan of his . . . but the person I was most worried about was Kitty,” he says. “She’s the one person I would hate to upset.”

Kitty Bruce told The Post that she’s very pleased with how Kirby has portrayed her father.

“It’s obvious that Luke has taken this role very seriously,” she says via e-mail. “He has worked very hard to capture Lenny Bruce in nuance and comedic timing. Even comics today will tell you that timing is the most difficult thing to conquer and Luke took the time to soak up my father’s standup routines. Luke comes to this very prepared. He’s really good at it.”

And, she says, she’s happy that “The Marvelous Mrs. Maisel” has included her father in its storyline.

“My father has not gotten this much attention since he died,” she says. “I’m excited to think that because of Amazon’s ‘Marvelous Mrs. Maisel’ show a whole generation is getting a chance to hear about my father and hear his comedy, more than 50 years after his death! That’s wonderful.”