The team announced the move Monday.
Alvarez went 0-4 with a 6.45 ERA in four starts for Miami during a 2015 season shortened by two stints on the disabled list due to injuries to his right shoulder. He had season-ending surgery July 28 and became a free agent early this month, after the Marlins declined to offer him a 2016 contract. Otherwise, he would have been eligible for arbitration.
Alvarez, 25, is 27-34 with a 3.80 ERA in 92 career starts over five seasons with Toronto and Miami. The right-hander tossed a no-hitter on the final day of the 2013 season and had his best year in 2014, when he went 12-7 with a 2.65 ERA in 30 starts and made the National League All-Star team.
Right-hander Arnold Leon was designated for assignment to make room on the roster.