T.J. McFarland has agreed to a one-year, $2.5 million contract to remain with the St. Louis Cardinals.

McFarland can earn an additional $500,000 for games pitched: $100,000 each for 40, 45, 50, 55 and 60.

The reliever, 32, was 4-1 with a 2.56 ERA in 38 games and 38 2/3 innings.