McMahon finished with two hits, Fernando Abad (1-0) pitched 1 1/3 scoreless innings of relief and Justin Lawrence earned his sixth save for Colorado.
Alex Bregman had two hits for Houston, which suffered just its sixth loss in 27 games to the Rockies, dating back to the start of the 2013 season
The Astros jumped on Colorado reliever Jake Bird, who served as the opener for the Rockies' bullpen game. Bird hit Mauricio Dubon with the first pitch of the game, and he scored on a double by Bregman
Bird struck out the next two batters but then gave up an RBI single to Chas McCormick and a run-scoring double to Yainer Diaz to put Houston ahead 3-0.
Colorado answered in its half of the inning. Jurickson Profar led off with a single and Bryant hit his eighth homer of the season to cut the deficit to 3-2.
McMahon followed with a solo home run, a 461-foot shot to center, to tie the score. It was McMahon's 15th of the season.
The Rockies went ahead in the fourth. C.J. Cron was hit by a pitch leading off the inning. Starter Hunter Brown got the next two batters, but Ezequiel Tovar tripled off the wall in right-center field to make it 4-3
The Astros threatened in the sixth but couldn't score, and Colorado failed to cash in on a great opportunity in the bottom of the inning
McMahon led off with an infield single and Cron doubled to left when McCormick lost his ball in the lights. Brown got Diaz to ground out to a pulled-in infield and was replaced by Ryne Stanek.
Nolan Jones worked the count full on nine pitches but was called out on an automatic strike for the second out. Tovar then fanned to leave runners on second and third.
Brown (6-7) allowed four runs on six hits and struck out seven in 5 1/3 innings.
--Field Level Media