For as long as he can remember, Takashi has been cursed by the ability to see spirits, a power inherited from his grandmother Reiko. Upon her death, Reiko bequeaths to her grandson her Book of Friends, a book containing the names of spirits Reiko had bullied into servitude. The Book of Friends is a highly prized item in the spirit world, and spirits hound Takashi constantly. Whereas Reiko formed the contracts, however, Takashi spends his time dissolving the contracts and releasing the various spirits that come to him for help. But that doesn't mean there aren't malicious spirits trying to kill him. Which is where Madara (called Nyanko-sensei by Natsume) comes in; Madara serves as Natsume's bodyguard and spiritual advisor of sorts, even though he is motivated by his own desire to possess the Book of Friends. He later on begins to become more attached to Takashi.
This story has the part which was created by referencing Wikipedia, so the licence of GFDL is applied to this story.