Animals can be an author’s best friend. Talking animals, to be precise. Since the dawn of folklore, anthropomorphic beasties have been reliable go-to guys when a story simply wouldn’t be as much fun with plain old human protagonists. And so it is that Josh Lieb, in “Ratscalibur,” layers on the fur — and the claws, and the skinny pink tails — to transform the archetypal “unassuming kid fulfills prophecy and saves the kingdom” plot into a witty mash-up of favorite fantasy motifs.

The book recasts Arthurian legend with rodents — rat knights, squirrel sorcerers, guinea pig guards, and so on. But rather than create an entirely imaginary world populated by sword-wielding woodland creatures, à la Brian Jacques’s classic Redwall saga (a series that, in both page count and body count, is truly the “Game of Thrones” of talking animal tales), Lieb sets his adventure here on Earth, right under the unknowing noses of us humans. He trades castles and dungeons for urban alleys and sewers, enchanted forests for city parks. And it’s in this change of venue that the book comes alive. Lieb’s obvious delight in laying out the vermin-world analogues of sword-and-sorcery staples is infectious. Readers will smile to see Popsicle-stick lances, peanut-shell helmets and, of course, the title sword, which is actually a spork — a spork that must be pulled from a scone. (Pun lovers will find no shortage of reasons to enjoy this book.)

Despite the Arthurian trappings, the plot of “Ratscalibur” owes less to “The Once and Future King” than it does to “The Lord of the Rings.” The rodent mage Gondorff the Gray, for instance, is an obvious tribute to Tolkien’s quintessential wizard, Gandalf. And the scheming Salaman is, in turn, modeled after the villainous Saruman (or possibly the Ring trilogy’s other archfiend, Sauron — distinctive naming was not Tolkien’s forte). Lieb’s sewer rat berserkers call to mind Middle-earth’s orcs, and Ratscalibur glows when danger is near, just like Bilbo Baggins’s sword, Sting. Lieb even gives a nod to Tolkien’s favorite deus ex machina — escape via giant bird. For readers in the know, these homage bits can act as either Easter eggs or spoilers, but either way, they fit perfectly with the book’s mix of parody and genuine adventure.

Lieb, a “Tonight Show” producer and former “Daily Show” writer, takes a tone here that is much less arch than in his previous novel, “I Am a Genius of Unspeakable Evil and I Want to Be Your Class President.” There’s an earnest sweetness at the heart of “Ratscalibur,” and the author’s reverence for the stories that inspired him is apparent, giving the book a retro feel. Tom Lintern’s gorgeous line-drawn illustrations, which call to mind the work of Zena Bernstein or Garth Williams, add to the old-school appeal.