Anderson, 29, is 2-4 with a 3.92 ERA in 45 games this season. He made his Major League debut March 28. Richards, 26, is 3-12 across 23 games (20 starts) this season.
The Marlins acquired pitcher Ryne Stanek and Minor League outfielder Jesus Sanchez from the Rays.
Stanek is 0-2 with a 3.40 ERA in 41 games this season. He's started 27 games for the Rays in 2019 as an opener.
Miami dealt another starting pitcher, Zac Gallen, to the Arizona Diamondbacks on Wednesday.
Tampa Bay entered play Wednesday with a 67-39 record. The Rays are 7 1/2 games behind the first-place Yankees in the AL East Division.
Miami is 41-64 this year. The Marlins have the worst record in the National League.