The Central Intelligence Agency hasn't seemed very funny lately, probably a lingering effect from all that waterboarding. "Spy," starring Melissa McCarthy as an undervalued CIA staffer who finally gets her chance to shine, almost makes you forget about the agency's ugly side. This harmless action comedy is about as edgy as "Beverly Hills Cop," and almost as enjoyable thanks to its endearing star.

McCarthy plays Susan Cooper, a deskbound assistant to other, more glamorous CIA agents. Equipped with the usual nifty technology, Susan serves as the eyes and ears of Bradley Fine (Jude Law), a rogue in the Roger Moore mold who obeys Susan's commands while karate-chopping his way to glory. One of the film's running jokes is that, for Susan, Langley is just another crummy workplace, with dull gray cubicles and an exasperating mouse problem.

advertisement | advertise on newsday

When Fine is taken out by the gorgeous supervillain Rayna Boyanov (Rose Byrne), Susan volunteers to go undercover and track her down in Paris. Sadly, Susan won't get to pose as an heiress or a jet-setter; she's always the badly dressed tourist or the crazy cat lady. When Susan and Rayna finally meet, the salty McCarthy and the icy-cool Byrne (together again after "Bridesmaids") have fun playing to their respective types.

A more topically minded director like Adam McKay ("The Other Guys," "Anchorman 2") might have sliced more deeply into this material, but writer-director Paul Feig ("Bridesmaids," "The Heat") goes for a breezy, devil-may-care vibe. That isn't a bad thing, and it isn't as easy as it looks. One of Feig's strengths is making the most of his entire cast, which he does with Allison Janney as Susan's humorless boss, Bobby Cannavale as an underworld kingpin and British newcomer Miranda Hart as a nerdy CIA analyst, all in fine form.

One big surprise is action star Jason Statham, spoofing himself as Rick Ford, an impossibly macho CIA agent with an inexplicable loathing for Susan. Statham plays the role just this side of deadpan, and he's terrific. His funniest lines are unprintable, as are McCarthy's comebacks.

"Spy" is an ideal vehicle for McCarthy, who gets to show off her best sides -- crass, volatile, tender -- and even engages in an impressive knife-and-frying-pan battle with an athletic foe. If a lovable underdog like McCarthy's Susan works for the CIA, maybe the agency isn't all bad.