Houston also will receive four minor leaguers in the deal -- right-handed pitchers Joe Musgrove and Asher Wojciechowski, left-handed pitcher David Rollins, catcher Carlos Perez and a player to be named later.
"This is a very good deal for us," Houston general manager Jeff Luhnow said. "Once again, we are adding depth to our minor league system with quality young players. We really feel this will help us moving forward and are extremely excited about the players we've added to our organization."
Cordero has 329 career saves, second among active players to the New York Yankees' Mariano Rivera (608). In 794 career relief appearances, the 37-year-old Cordero has a 3.28 ERA and has reached 40 or more saves in three seasons. Cordero is 3-5 with two saves in 41 appearances for Toronto this season.
Francisco is hitting .244 in 23 games for Toronto in 2012. He has a .259 career average with 45 home runs in 483 career games with Cleveland, Philadelphia and Toronto.
Lyon signed a three-year, $15 million contract with the Astros in December 2009. He struggled with tendinitis in his right biceps in 2011 and appeared in only 15 games. He's 0-2 with a 3.25 ERA in 37 appearances this season.
The left-throwing Happ is 7-9 with a 4.83 ERA in 18 starts this season, his third in Houston. Carpenter, playing for the Astros' Triple-A affiliate in Oklahoma City, was 0-2 with a 6.07 ERA in 30 relief appearances for the Astros this season.
"It shows that one we've made the commitment and addressed an area that's needed. It's depth to our overall pitching," Blue Jays manager John Farrell said. "What this means in the next 10, 11 days remains to be seen."
Happ is expected to start in the Blue Jays' bullpen. Carpenter will report to Triple-A Las Vegas.
"In talking with J.A. a couple of times today, it's a natural fit with where we are in the rotation," Farrell said. "We know we've got someone that made 18 starts this year and is a multiyear big league starter."
Lyon is expected to be in a set-up role.
"Brandon's got a lot of experience in that back end," Farrell said. "It gives us a guy with some certainty about him."
The Blue Jays also recalled Travis Snider from Las Vegas.
The Astros are 34-59, the worst record in the majors, and are committed to rebuilding through their minor league system under Luhnow, hired in December by new owner Jim Crane.
Houston has struggled to find an identity in the past few years as star after star has been traded away. First to go were Roy Oswalt and Lance Berkman, and last summer Hunter Pence and Michael Bourn followed. Carlos Lee was traded before the All-Star break, leaving Houston with no position players who were on the team full time before 2010.
Musgrove was Toronto's first pick in the first compensation round of the 2011 draft. In two appearances with rookie level Bluefield in 2012, the 19-year-old Musgrove had a 1.12 ERA with no walks and nine strikeouts. Musgrove made a combined nine appearances (seven starts) with Bluefield and Toronto's Gulf Coast League club in 2011.
Wojciechowski, 23, was Toronto's first pick in the first compensation round of the 2010 draft. He was 7-3 in 18 starts at Class A Dunedin this season with a 3.57 ERA and 76 strikeouts. In his past seven starts, he was 5-1 with a 1.49 ERA.
Rollins, 22, was 6-1 with a 2.78 ERA in 18 starts with Class A Lansing this season with 75 strikeouts in 77 2/3 innings. Drafted in 2011, Rollins has a 10-1 career minor league record in 25 starts with a 2.46 ERA with 104 strikeouts.
Perez, 21, hit .269 in 70 games at Lansing this season with 21 doubles, five triples, five home runs and 40 RBIs. In five minor league seasons, he has a .279 average in 332 games with 70 doubles, 24 triples and 11 home runs.