A mysterious feline spirit. Madara was sealed in a shrine until he was accidentally released by Natsume. Because Madara was trapped in a material form for so long, Madara ordinary takes on the shape of a maneki neko (lucky cat), leading Natsume to nickname him Nyanko-sensei. In this form, other people can see him, leading for Natsume having to ask his guardians if he could keep him as a pet. He is a powerful spirit, who protects Natsume from others and teaches him spells on occasion, in return for Natsume's promise to give him the Book of Friends when he dies.
Source from Wikipeida