Klein attended Bloomington High School North in Bloomington, Indiana. As a senior in 2017, he pitched only 17+2⁄3 innings after breaking his thumb, but still struck out thirty batters and compiled a 1.98 ERA.[2] Unselected in the 2017 Major League Baseball draft, he enrolled at Eastern Illinois University where he posted a 6.62 ERA over 17+2⁄3 innings as a freshman, a 5.11 ERA over 24+2⁄3 innings as a sophomore, and a 3.33 ERA with 33 strikeouts as a junior in 2020 before the season was cancelled due to the COVID-19 pandemic.[3]
Klein made his professional debut in 2021 with the Quad Cities River Bandits of the High-A Central.[7] Over 36 relief appearances, he went 7–1 with a 3.20 ERA, 121 strikeouts, and 44 walks over 70+1⁄3 innings pitched.[8] MLB Pipeline named Klein the Royals' Pitching Prospect of the Year following the season's end.[9] He missed the beginning of the 2022 season due to shin splints.[10] He returned to play in mid-May with the Northwest Arkansas Naturals of the Double–ATexas League as a member of their starting rotation, but was later moved to the bullpen.[11] Over thirty games (three starts), he went 1–1 with a 10.51 ERA, 55 strikeouts, and 51 walks over 43+2⁄3 innings.[12] He returned to the Naturals to open the 2023 season.[13] In mid-June, he was promoted to the Omaha Storm Chasers of the Triple-AInternational League.[14] He was selected to represent the Royals at the 2023 All-Star Futures Game.[15] Over 49 appearances between Northwest Arkansas and Omaha, Klein went 1–5 with a 4.62 ERA, 93 strikeouts, and 39 walks over 64+1⁄3 innings.[16]
On November 14, 2023, the Royals added Klein to their 40-man roster to protect him from the Rule 5 draft.[17] He was optioned to Triple–A Omaha to begin the 2024 season.[18] On April 25, 2024, Klein was promoted to the major leagues for the first time following an injury to Alec Marsh.[19] In five appearances for Kansas City, he recorded a 6.35 ERA with six strikeouts across 5+2⁄3 innings pitched.[20]