All six players agreed to one-year deals.
Alvarez led the Pirates with 36 homers and 100 runs batted in last season, batting .233 in 152 games while earning his first All-Star nod and Silver Slugger. He also clubbed 30 homers in 2012 and has 86 home runs with 268 RBI in 470 games over four seasons with the Pirates.
Walker, a native of Pittsburgh who watched the Pirates go from basement dwellers to a wild card playoff berth last year, will start his fifth full season with his hometown team in 2014. He hit 16 homers, drove in 53 runs and batted .251 in 133 games last year.
Sanchez, an All-Star with Florida in 2011, has hit 54 homers with 233 runs batted in and a .258 average over six big league seasons. He hit seven homers and knocked in 36 runs over 136 games last year, his first full season with the Pirates.
Melancon took over the closer's role with the Pirates for a portion of last season when Jason Grilli was hurt and finished with 16 saves in 21 chances. He was 3-2 with a 1.39 ERA in 72 appearances in his first season with the Buccos and owns a career mark of 13-9 with a 3.24 ERA in five years with the Yankees, Astros, Red Sox and Pirates.