Former Phillies closer Ryan Madson has agreed to a minor-league contract with the Royals that includes an invitation to major-league spring training camp, a baseball source told ESPN.com.

Madson, 34, is 47-30 with 52 saves in eight career seasons with Philadelphia.