Macavity is a fictional character who is described in a poem in Old Possum's Book of Practical Cats, by T. S. Eliot. He also appears in Cats, the Andrew Lloyd Webber musical.
The name Macavity is a quadruple pun by T. S. Eliot, the author of the poem, on Macheath — a supervillain who appears both in John Gay's The Beggar's Opera, its sequel Polly and roughly 200 years later as Mack the Knife in The Threepenny Opera written by Bertolt Brecht and Kurt Weill in 1928, macuahuitl — the Aztec obsidian sword, and Moriarty — the surname of a supervillain-scientist from the Sherlock Holmes stories by Arthur Conan Doyle. Lastly, the word 'cavity' implies a hole or void or absence of something, and he is described in the poem as being "not there" at the time or location of any crime.
Beginning:
Macavity's a Mystery Cat: he's called the Hidden Paw -
For he's the master criminal who can defy the Law.
He's the bafflement of Scotland Yard, the Flying Squad's despair:
For when they reach the scene of crime – Macavity's not there!
End:
And they say that all the Cats whose wicked deeds are widely known
(I might mention Mungojerrie, I might mention Griddlebone)
Are nothing more than agents for the Cat who all the time
Just controls their operations: the Napoleon of Crime!
The poem Macavity the Mystery Cat is the best known of Eliot's Old Possum's Book of Practical Cats, the only book Eliot wrote for a younger audience. The poem is considered particularly suitable reading for 11- and 12-year-olds.