Right-back Kay, 21, joined the League One club in January and made 22 appearances.
Midfielder Weir, 22, arrived the following month and played 18 times for Les Parry's side.
"Michael did really well for us while he was here and I am delighted he will be with us next season," Parry told the club's official website. "He settled into our back four very comfortably and showed he is more than capable of playing in League One. He has an excellent attitude and a bright future."
On Weir, Parry added: "He is a classy and versatile player who also did really well on loan here. His style of play suits the midfielders we already have at the club.
"He has a great attitude and is a pleasure to work with and he is an excellent addition to the squad."