Baltimore Orioles
The Astros traded McDermott to the Baltimore Orioles in a three-team trade on August 1, 2022, in which the Houston Astros acquired Trey Mancini from Baltimore and Jayden Murray from the Tampa Bay Rays, the Rays acquired José Siri from the Houston Astros, and the Orioles also acquired Seth Johnson from the Rays. The Orioles assigned him to the Aberdeen Ironbirds of the High-A South Atlantic League.
On May 19, 2023, while with the Double-A Bowie Baysox, McDermott was part of a combined no-hitter that was thrown against the Altoona Curve. McDermott was the starting pitcher for Bowie, with Nolan Hoffman and Easton Lucas pitching in relief to seal the no-hit bid. He made 26 appearances (20 starts) split between Bowie and the Triple–A Norfolk Tides in 2023, registering an 8–8 record and 3.10 ERA with 152 strikeouts.
McDermott had a career-high eleven strikeouts and took a perfect-game attempt into the seventh inning of a 2–0 Tides away win over the Nashville Sounds on May 3, 2024. It was also the second time in two consecutive years that he started a combined no-hitter, with Hoffman and Kaleb Ort coming out of the bullpen to complete the achievement. In 20 games (19 starts) for Norfolk, he compiled a 3.96 ERA with 129 strikeouts across 91 innings pitched. On July 24, 2024, McDermott was selected to the 40-man roster and promoted to the major leagues for the first time.
McDermott began the 2025 season on the injured list, and went to post a 6.21 ERA for Norfolk over 25 games (10 starts). He made four major league appearances in 2025, posting a 15.58 ERA in 8.2 innings.
Prior to the 2026 season, McDermott was converted into a relief pitcher. He was optioned to Triple-A Norfolk on March 3, 2026, prior to the start of the regular season. After struggling to a 6.75 ERA across five appearances, McDermott was designated for assignment by the Orioles on April 11.