Williams, who was signed by the Cardinals to a Minor League deal in June and went 5-3 with a 4.89 ERA in nine starts for the Redbirds, will provide depth for a Cardinals bullpen that has tossed 20 2/3 innings over the last three days.
"He has the ability to throw a lot of pitches," Cardinals manager Mike Matheny said. "We've obviously been working our guys pretty hard ... and we needed some reinforcements. Hopefully we don't need Jerome. I'd love for our starters to go out there and sail, but the likelihood of needing some arms down there is pretty high, and he's a guy with some experience that has been around a while."
The 34-year-old Williams is 52-66 with a 4.57 ERA in 225 games (149 starts) in 10 seasons with the Giants, Cubs, Nationals, Angels, Astros, Rangers and Phillies.
Mayers was tagged for nine runs on eight hits over 1 1/3 innings in his Major League debut against the Dodgers on Sunday at Busch Stadium.
"I talked to him for a little while after the game and reinforced the kind of season that he's having," Matheny said. "I reminded him of the fact that he started in Double-A this year. That's a big deal to be able to come in for a team that is right in the middle of things and that we think enough about you to let you come in and make a start for us with all the talent that we have.
"That doesn't change with what happened, but then we talked about what he learned, and he had some good observations about how he went about it, how he responded to a couple things and things he needs to work on."
The first-place Cubs, who sat 7 1/2 games ahead of the Cardinals in the National League Central entering Monday's games, acquired left-handed closer Aroldis Chapman from the Yankees on Monday. Chapman has posted 25 straight scoreless appearances against St. Louis, with the club last scoring off him back in 2011, when Tony La Russa was still managing.