"Our focus obviously is trying to put ourselves in the best position that we can to compete for a World Series this year, and those are two guys that we think can help us get there," Houston general manager James Click said.
The Mancini deal is a three-team trade that also involved the Tampa Bay Rays. Besides Mancini, the Astros received minor league right-hander Jayden Murray from the Rays, who are acquiring outfielder Jose Siri from Houston. The Orioles received minor league right-handers Seth Johnson (from the Rays) and Chayce McDermott (from Houston).
The Red Sox received infielder/outfielder Enmanuel Valdez and minor league outfielder Wilyer Abreu from the Astros in exchange for Vazquez.
Vazquez, 31, has a .759 OPS with 8 home runs and 42 RBIs this season and will provide an immediate upgrade over the Astros' current starting catcher, Martin Maldonado. The Astros also needed depth at catcher with backup Jason Castro out with a knee injury and rookie Korey Lee filling in.
Maldonado has been credited for aiding the success of Houston's mostly young pitching staff, but he's hitting just .173 this season, making Vazquez a significant upgrade offensively.
"He's never the guy that you want coming to the plate when there's runners on," Click said. "He always seems to find a way to put the bat on the ball and get those guys in."
Click said he and manager Dusty Baker would discuss how playing time would be split between Maldonado and Vazquez, but added that Maldonado's workload was just too heavy this season to be sustainable.
Vazquez, who will be a free agent next season, had been with the Red Sox since 2014 and was the longest tenured player in the organization.
Vazquez was in the Red Sox lineup Monday at Houston before being scratched just minutes before the game. Now, he'll move to the other clubhouse at Minute Maid Park where he'll try to help the Astros make another deep playoff push.
"This is one that I know hurts in the clubhouse," Red Sox general manager Chaim Bloom said. "That's something we don't take lightly."
Mancini, 30, is hitting .268 with 10 home runs and 41 RBIs this season, his sixth with the Orioles (51-51), who have surprised this season and are just three games out of the American League's final wild-card spot entering Monday's games.
Mancini has been a bright spot as the Orioles have gone through a difficult rebuild. He earned Comeback Player of the Year honors in the American League last year after missing the 2020 season to be treated for stage 3 colon cancer.
Orioles manager Brandon Hyde said Mancini would be tough to replace on and off the field and that the conversation about the trade was difficult.
"Trey has been such an important part of our lives ... and a big part of Baltimore and a big part of this community," Hyde said. "And you know it's hard to see someone like him go, just a close friend to so many people.
"It wasn't fun, but happy for him and the opportunity he's going to have, but it's hard to say goodbye."
Mancini broke into the majors with Baltimore in 2016 and batted .270 with 117 homers and 350 RBIs in 701 games with the Orioles.
"I always said I wanted to see the rebuild through and I feel like, in a lot of ways, I have,'' Mancini told reporters in Arlington, Texas where the Orioles were playing the Rangers on Monday night. "I think things are only going to get better here, and besides when I'm playing against them, I'm always gonna be rooting for these guys in here.''
Mancini joins an already formidable lineup for the Astros (67-36), who are atop the AL West standings. Houston was in the market for a first baseman with Yuli Gurriel struggling this season. The 38-year-old Gurriel hit .319 to win the American League batting title in 2021, but has hit just .243 with seven homers and 28 RBIs this year.
Mancini, who has been in the lineup at designated hitter 51 times this season, also could fill that role for Houston with Michael Brantley out indefinitely with a shoulder injury.
"That was part of the appeal was that we knew that he could go out to either corner outfield spot, he could play first base, he could DH," Click said. "He's a really valuable bat off the bench. I think one of the most appealing things about him is that he hits lefties and righties very well. And so in a pinch-hit situation late in the game I think he could be a real weapon against both sides."
Mancini has a $7.5 million salary this season as part of a contract that includes a $10 million mutual option for 2023 with a $250,000 buyout.
Siri, 27, is hitting .178 with three home runs and 10 RBIs in 147 plate appearances in the majors for the Astros this season, and .296 with nine homers and 22 RBIs at Triple-A. To make room for him on their 40-man roster, the Rays designated outfielder Brett Phillips for assignment. Phillips, 28, who had a walk-off hit for the Rays in Game 4 of the 2020 World Series, was struggling this season, hitting just .147 with five homers and 14 RBIs.
Murray, 24, who is pitching at Triple-A Durham, is 8-3 with a 4.35 ERA in 17 appearances (16 starts) at two levels of the Rays' minor league system.
Johnson, 23, is 1-1 with a 3.00 ERA in seven starts for High-A Bowling Green this season. He might miss all of next season because of Tommy John surgery.
McDermott, 23, is 6-1 with a 5.50 ERA in 19 appearances (10 starts) for High-A Asheville this season.
Valdez, 23, is batting .327 with a 1.016 OPS in 82 games for Double-A Corpus Christi and Triple-A Sugar Land. He is ranked as the Astros' No. 12 prospect by Baseball America.
Abreu, 23, is batting .249 with a .858 OPS in 89 games with Corpus Christi. He is ranked as the Astros' No. 21 prospect by Baseball America.
ESPN's Jeff Passan and The Associated Press contributed to this report.