McHugh has starting and relieving experience, but right now, general manager Jeff Luhnow envisions the right-hander as a starter.
"We like him as a starter, so he will be in the group competing for the rotation," Luhnow said.
McHugh joins a pool of at least seven pitchers vying for five starting jobs. Scott Feldman, who signed a three-year deal as a free agent, tops a list that also includes Brett Oberholtzer, Brad Peacock, Dallas Keuchel, Lucas Harrell, Paul Clemens and Jarred Cosart.
McHugh made seven Major League appearances combined for the Mets and Rockies in 2013, including five starts. He also made 20 Minor League starts combined in the Mets' and Rockies' Minor League systems. McHugh made his big league debut with the Mets in 2012, appearing in eight games that season (four starts).
McHugh was originally selected by the Mets in the 18th round of the 2008 First-Year Player Draft. He has posted a 37-28 record in 126 career Minor League appearances (109 starts), with a 3.34 ERA and 623 strikeouts in 638 2/3 innings.
The Astros' 40-man roster is now at 40.
Alyson Footer is a national correspondent for MLB.com. Follow her on Twitter @alysonfooter. This story was not subject to the approval of Major League Baseball or its clubs.