Both players would have been unrestricted free agents next summer.
"Cody has been an Avalanche his entire career," general manager Joe Sakic said in a statement. "He brings grit, energy and passion to the rink every single day. We are excited to have him under contract for another three years."
"Brad is a steady, experienced defenseman who is a solid addition to our blue line," Sakic added in the statement.
Stuart, acquired from San Jose in the offseason, signed a two-year extension worth $3.6 million per season, a source told ESPN.com.
McLeod's deal will pay him $1.5 million next season and then $1.25 million in 2016-17 and 2017-18, a source said.