Anderson had his contract selected by the Pirates on Thursday, Alex Stumpf of DKPittsburghSports.com reports.
The 28-year-old hasn't pitched in the majors yet this season. The reliever had a 6.04 ERA over five innings with the Athletics in 2019, his last season in the majors. Roansy Contreras was optioned to Triple-A Indianapolis on Thursday to make room on the major-league roster.