The Chicago Cubs signed pitcher James McDonald to a minor-league contract on Friday, according to a report.

The former Pittsburgh Pirates right-hander received an invitation to join the Cubs in spring training, 670thescore.com reported, and could compete for a spot in Chicago's starting rotation in 2014.

The 29-year-old McDonald started six games in 2013 for the Pirates and went 2-2 with a 5.76 ERA in 29 2/3 innings before a strained shoulder ended his season. He was designated for assignment in September.

In four seasons with the Pirates, McDonald posted a 27-24 record with a 4.21 ERA in 78 games, including 77 starts. He began his big-league career with the Los Angeles Dodgers in 2008 and went 5-6 with a 4.11 ERA in parts of three seasons.