It sounds like he may be exhibiting play aggression, a behavioral problem my brother Dougie had when he joined our family, after having lived on his own in the wild.
Practicing for hunting and fighting, he’d played roughly in his feral days, and he continued to do so with our family.
Mom taught him to play more civilly, and now when he becomes too boisterous, she quietly reminds him, “Gently, gently,” and he licks her hands.
To train your cat, make sure he always associates your hands with tender petting. Never use your hands to roughhouse.
Instead, use toys that keep your hands away from his teeth and claws. My favorite is the feather-on-the-fishing-pole toy, but I also like dangling toys and wand toys.
Let your cat play by himself sometimes by providing him with battery-operated toys, scratching posts, and treats hidden around your home. Entertain him by placing a bird feeder outside his favorite window.
Tire your kitty by encouraging him to run around the house after a toy on a string. Toss ping pong balls or treats, or have him chase a laser pointer.
Any time your cat gets rambunctious, distract him by tossing a toy away from you. If he continues to play too roughly and you sense he’s about to bite, stop interacting with him.
If he does bite, hiss or growl at him, as his mother would, and then ignore him.
One more idea: Visit the shelter and adopt a new best friend for your cat, so he’ll have someone else to play with.