ESPN's Peter Gammons reports that if Mulder makes 30 starts in 2007 and 2008, incentives can make the deal worth three years and $45 million.
His deal with St. Louis includes a club option for the 2009 season.
"Mulder's return will be a real boost to our rotation," general manager Walt Jocketty said. "We've seen what he is capable of when healthy. Mark is very determined to return to his All-Star form."
Mulder was 6-7 with a 7.14 ERA in 17 starts last year. He was sidelined from June 22 to Aug. 23 with rotator cuff damage and what the team called an impingement in the shoulder, which had caused him to alter his delivery. He went back on the DL on Aug. 31.
Mulder had 88 wins the previous five seasons, tied for the most in the major leagues in that span, including a 16-8 record in his first season with St. Louis in 2005. He has a career record of 103-57 with a 4.11 ERA.
When he returns, he'll bolster a rotation missing several of the pitchers who helped the Cardinals win their first World Series title since 1982. Jeff Suppan signed with the Milwaukee Brewers and Jason Marquis left for the Chicago Cubs.
St. Louis also agreed to a $1 million, one-year deal with right-hander Ryan Franklin and minor-league contracts with outfielder Rick Ankiel and infielder Jolbert Cabrera. Ankiel, a one-time pitching phenom trying to return to the major leagues as an outfielder, missed last season with a knee injury.
Franklin, 34, played for the Philadelphia Phillies and Cincinnati Reds last season and appeared in a career-high 66 games while going 6-7 with a 4.54 ERA in 77 1/3 innings, 10th among NL relievers. He started 30 or more games for the Seattle Mariners from 2003-05 and topped 200 innings in 2003 and '04.
Franklin could make an additional $1 million in bonuses based on starts, getting the full amount if he makes 29.
"Ryan's a durable pitcher who can help us in a number of ways," Jocketty said. "We'll bring him to camp and see where he is best suited to help our staff."
Ankiel, 27, batted .259 with 21 homers and 75 RBI for Double-A Springfield and Class A Quad Cities in his first full season as an outfielder.
Cabrera, 34, has played in Japan the last two seasons and hit .260 with eight homers and 50 RBI last season for the Fukuoka Hawks. He last played in the majors as a reserve with the Mariners in 2004.
Information from The Associated Press was used in this report.