The 25-year-old had been due to become a free agent at the end of the season.
However, under the new terms, the striker has committed himself to the Crown Ground until 2018.
"I've really enjoyed it this year. I'd probably say that it's been my best year in football and that shows because I'm playing with enjoyment every game," he told the club's official website.
"We're all really enjoying it and you can see that. I enjoy coming in every day, I have a smile on my face and I don't think that's been the case for the last six or seven years of my career."
Kee has scored 17 goals for Stanley following his summer arrival from Scunthorpe United.