After retiring from his career as a footballer, Viviani stayed at Vicenza as part of the coaching staff, serving as caretaker during the 2001–02 season alongside Adelio Moro, and then as youth coach until 2005. He successively left Vicenza in order to follow his mentor Edoardo Reja at Napoli, working alongside him as assistant coach. During the 2009–10 season he then served as head coach of Lega Pro Seconda Divisione club Sambonifacese. On July 2010 he was called to replace Eugenio Corini at Serie B club Portosummaga, being however removed from his managerial duties on 29 November 2010 due to poor results.
On 5 December 2011 he was unveiled as new head coach of Grosseto, until 1 February 2012 when he was sacked.