The Giants didn’t wait until the first official day of the offseason to add to their roster, acquiring lefty Tyler Anderson hours before the start of Wednesday’s Game 7 of the World Series.

Anderson, 29, came in a waiver claim from the Rockies, with whom he spent four seasons and compiled an 18-24 record and 4.69 ERA in 73 games including 71 starts. He’s rehabbing from June knee surgery.

Colorado manager Bud Black said in September that Anderson would hope to return to the mound in the first two months of the 2020 season. The pitcher isn’t necessarily an expensive risk after making $2.63 million last season and remaining under club control through 2021.

Before the complicated surgery to Anderson’s left knee — he was eight weeks on crutches after correcting a chondral defect — he went 0-3 with an 11.76 ERA in five starts, got optioned to the minors (without throwing a pitch) and went on the injured list.

“I would love to be pitching in games in spring and be ready to go,” Anderson said in September, according to the Denver Post. “I don’t think that’s too outside of a chance. That’s possible, but I just have to progress incrementally and see how each step of the rehab process goes.”

President of baseball operations Farhan Zaidi is expected to add options to a rotation that’ll be a work in progress with jobs expected to be up for grabs. Though Johnny Cueto and Jeff Samardzija remain on the payroll, Madison Bumgarner is heading to free agency.

Several young pitchers were shuttled in and out of the rotation throughout the season, and none is guaranteed a spot in 2020.

Anderson’s most productive year was 2018 when he made 32 starts and struck out 164 batters in 176 innings, posting a 4.55 ERA. Although the Coors Field elevation tends to prompt high ERAs, Anderson’s home ERA was better that year, 4.15 compared with 5.02 on the road.

Anderson was the Rockies’ first-round draft pick in 2011 out of Oregon.

To create space on the 40-man roster for Anderson, reliever Kyle Barraclough was designated for assignment. The St. Mary’s alum was claimed in August from the Nationals and sported a 2.25 ERA in 10 outings.

John Shea is The San Francisco Chronicle’s national baseball writer. Email: jshea@sfchronicle.com Twitter: @JohnSheaHey