McDaniels played in 10 games for the Rockets last season after being acquired from the Philadelphia 76ers. The Rockets traded a 2015 second-round pick and Isaiah Canaan to the 76ers for McDaniels, who was a 2014 second-round selection by Philadelphia.
In 52 games with the 76ers, McDaniels averaged 9.2 points per game.
"It's about time we got it done, and I'm just happy to be a part of such a great organization," McDaniels told the Houston Chronicle. "I felt like this was the right place for me because I'm loyal to the team.
"I have a great relationship with the players on the team. The city was great to me. I love the organization. I love the history behind the Rockets and the greats that played there. It's just a blessing."
In free agency, the Rockets have now signed both their restricted free agents. In addition to McDaniels, starting point guard Patrick Beverley signed a four-year deal worth $23 million with $18 million guaranteed earlier this month.
Among the Rockets' unrestricted free agents, only reserve forward Corey Brewer has signed a deal: a three-year, $23.4 million contract last week. The team didn't re-sign power forward Josh Smith, who signed a one-year deal with the Los Angeles Clippers on Thursday.
Only veteran combo guard Jason Terry remains from the Rockets' available free agents. The team is still interested in signing Terry to a deal; however, the Rockets signed veteran shooting guard Marcus Thornton to a one-year deal last week, which could cut into Terry's playing time.
The Rockets didn't have much salary-cap room to make a splash in free agency yet had a productive meeting with free-agent power forward LaMarcus Aldridge, who eventually signed with San Antonio.