Susan (Melissa McCarthy), right, infiltrates an arms-dealing ring led by Rayna (Rose Byrne), left. (Larry Horricks/AP)

There are lots of things to like about “Spy,” and more than a few to love.

The James Bond spoof, written by “Bridesmaids” creator and future “Ghostbusters” feminizer Paul Feig, begins with a note-perfect homage to the spy series, with a brassy, belt-y opening number by Ivy Levan and a suave sequence featuring a tuxedo-wearing Jude Law as a cool-as-a-cuke international operative.

But when things with the villain get hairy, Feig cuts to reveal that Law’s character — a CIA agent named Brad Fine — is getting help. Back at Langley, Susan Cooper is working the angles via remote cameras, telling Fine how many bad guys lurk around every corner. Behind every debonair man with a license to kill, it seems, there’s a sensitive, focused, high-functioning woman.

It’s a terrific conceit, part “Austin Powers,” part “Broadcast News.” And as the all-knowing voice inside Law’s pretty little head, Melissa McCarthy plays Susan with a combination of self-deprecating modesty and I-got-this knowingness. Susan — who toils away in the agency’s vermin-infested basement along with her best friend, Nancy (the great British comedienne Miranda Hart), and a slew of other women — is invisible even to Fine, who takes her to a chummy dinner oblivious to the fact that she’s in love with him. She’s the kind of person who goes through life being passed over, dismissed and underestimated — when she’s taken into account at all.

That changes when Susan gets a chance to prove her chops in the field, which is when “Spy” becomes the antic action comedy we have come to expect from the man who last directed McCarthy (alongside Sandra Bullock) in “The Heat.” Feig has become the George Cukor for early 21st century female stars, but instead of urbane dialogue, flattering camera angles and carefully pitched emotion, he gives them swagger, sexual confidence and an armamentarium of shocking profanities.

Feig’s movies aren’t particularly stylish — the visuals in “Spy” are serviceable at best, and the makeup is particularly un-subtle — but they possess a silly, sweet streak that makes them irresistibly infectious. When Susan goes mano a mano with her quarry, a bedroom-eyed Bulgarian heiress played by an admirably deadpan Rose Byrne, the two cook up a fabulous see-saw chemistry, with Byrne lobbing witheringly flawless burns and McCarthy hitting every pitch with a satisfying pop to the cheap seats. Equally on point is Jason Statham as an arrogant CIA agent who spends the entire movie recounting his career of improbable Bond-like stunts, and telling Susan she’s about to foul everything up.

This isn’t to say that “Spy” is perfect — far from it. There are jokes that don’t land and bits that are just lame (and the mice-in-the-CIA bit goes nowhere fast), and it’s at least 10 to 20 minutes too long. But within the confines of its genre — commercial, unambitious action comedy — “Spy” delivers the physical stunts, running gags and stinging one-liners that audiences expect from the form, even if Feig depends once too often on simplistic vulgarity to land a joke.

The real revelation here is McCarthy, who since her breakout performance in “Bridesmaids” has been pigeonholed as a girthy, slightly gross tomboy. In “Spy,” she lets the rest of her flags fly, first donning a series of risibly dowdy disguises, then swanning around in wigs and gowns that turn her into a slinky, seductive siren. Her generously proportioned body might once have been the punch line, used and abused in the interest of ungainly, graceless slapstick.

The relief, then, is palpable when McCarthy seizes the opportunity to be so much more, including but not limited to glamorous, crafty, smart, funny, brave and surpassingly loyal to her female colleagues. As cinema, “Spy” is content to cater to its own conventions, hit the required marks and earn a few laughs along the way. As a cultural bellwether, it does something bigger and more important, without ever italicizing that fact. There’s something cosmic, or at least karmic, about McCarthy going head-to-head this weekend with the dude canoe that is “Entourage.” That pounding in your head isn’t a hangover, bruh. It’s just reality knocking.

R. At area theaters. Contains profanity, violence and some sexual content, including brief graphic nudity. 120 minutes.