Finally, a Melissa McCarthy vehicle that is not absolutely toxic. And no, I’m not counting her other two outings with writer-director Paul Feig, Bridesmaids and The Heat, both of which are hilarious in their own right. I’m referring to crap like Identity Thief and Tammy, which somehow misstepped despite the direction of her husband, Ben Falcone, and the fact that she co-wrote the screenplay. It’s becoming apparent that the only person who knows how to use McCarthy in a lead role without embarrassing or shaming her for one reason or another is Feig, so it’s good news that he’s also working with her on the Ghostbusters remake.

Spy is set apart from other McCarthy films because she is undoubtedly its star. She is given the space to be the shrinking violet, sweet-natured woman we know from Gilmore Girls and Mike & Molly, while also tapping into the gut-bustingly crass and brutal tornado from the aforementioned Feig films. She is always the funniest person on screen, despite the presence of a very capable supporting cast, all of whom know when to step aside and allow her to get the best lines. Many contemporary comedies try to aim for an ensemble approach in order to allow for more improvisation between the leads, but they often fall flat or devolve into people shouting over each other like the insufferable Horrible Bosses 2. Spy is McCarthy’s show and she knows it.

Unless you’re watching a Preston Sturges film, plot considerations in comedies are usually beside the point, but Feig – who gets the sole writing credit – doesn’t do a bad job at making an actual spy movie within the parody of the spy movie he’s created. McCarthy is Susan Cooper, a desk-bound CIA analyst whose main task is to guide agents in the field, specifically Bradley Fine (Jude Law), as they conduct their clandestine operations. Fine is dispatched when a reconnaissance mission goes sour and the identities of all current agents are compromised, leaving Cooper as the only person who can save them all and stop a nuclear device from getting into the wrong hands. Cooper happens to have all the training of her fellow agents, but is consistently underestimated because she’s chubby and too shy to speak up for herself. Unlike her fellow agents, all of whom receive suave and sexy secret identities, Cooper is saddled with one stereotypically awful cover story after another, most of which include the fact that she is a single mother of multiple, schlubby children or a cavalcade of cats.

Despite the fact that this is a comedy directed by Feig, who cut his teeth in television, it is certainly one of the more cinematic films the director has gotten together. Spy is a send-up of the genre mentioned in its title, and it features several car chases, scenes of hand-to-hand combat, and gunfighting. Most of this is capably framed and staged, never with any particular inventiveness or innovation, but at least you can always tell what’s going on, a luxury audiences are not often afforded in straightforward action films. And whoever worked on the costumes ought to be commended, because he or she has finally figured out how to dress McCarthy in a flattering way. Cooper is eventually allowed to shed her dowdy duds in favor of some seriously sexy dresses and makeup, providing her the confidence boost to break out both her combat skills and a wellspring of profanity.

Holding McCarthy up is Feig-regular Rose Byrne, who continues to prove that beautiful people can also be funny if you let them, as well as Peter Serafinowicz, Bobby Cannavale, and Miranda Hart. The two standouts are a bone-dry Allison Janney and an unhinged, ruined version of himself, Jason Statham. Statham gets some of the best lines in the film, the majority of which involve him berating Cooper for not being as outrageously capable and invincible as him. In the confines of these carefully scripted and paced scenes between him and McCarthy, Statham truly shines as the comedic actor we never knew he could be.

Spy is far from perfect. Its plot is workmanlike and ultimately forgettable, and like many of today’s comedies, is about fifteen minutes too long. But it is also one of the funniest mainstream movies of the year, which is saying something when Trainwreck and Ant-Man came out in the same season.